virtualip add
Adds a virtual IP address.
Permissions Required
fc
or a
on the cluster.
Syntax
- CLI
-
maprcli virtualip add [ -cluster <cluster> ] [ -gateway <gateway> ] [ -macs <MAC address> ] -netmask <netmask> -virtualip <virtualip> [ -virtualipend <virtual IP range end> ] [ -preferredmac <MAC address> ] [ -service nfs3|nfs4 ]
- REST
Request Type POST Request URL http[s]://<host>:<port>/rest/virtualip/add?<parameters>
Parameters
Parameter | Description |
---|---|
cluster |
The cluster on which to run the command. |
gateway |
The NFS gateway IP or address |
macs |
A list of the MAC addresses that represent the NICs on the nodes that
the VIPs in the VIP range can be associated with. Use this list to limit VIP
assignment to NICs on a particular subnet when your NFS server is part of
multiple
subnets. NOTE When
adding VIPs with the -preferredmac and
-macs options, include the preferred MAC in the MAC
pool. Otherwise, VIPs will be distributed among the MACs instead of being
assigned to the preferred MAC node. |
netmask
|
The netmask of the virtual IP. |
preferredmac |
The preferred MAC for this virtual IP. When an NFS server restarts,
Data Fabric attempts to move all of the
virtual IP addresses that list a MAC address on this node as a preferred MAC
to this node. If the new value is null, this parameter resets the preferred
MAC
value. NOTE When
adding VIPs with the -preferredmac and
-macs options, include the preferred MAC in the MAC
pool. Otherwise, VIPs will be distributed among the MACs instead of being
assigned to the preferred MAC node. |
service |
The service to assign VIPs to. Value can be one of the following:
nfs3 , which is used if this
option is not specified. You must specify the MAC addresses
(macs ) with this option. |
virtualip
|
The virtual IP, or the start of the virtual IP range. |
virtualipend |
The end of the virtual IP range. |
Example
Add VIP for NFSv3 node:
maprcli virtualip add
-cluster mycluster.402.source
-macs "09:0C:29:3C:47:AB 03:3C:34:76:CF:21 02:0E:22:71:AD:34"
-netmask 255.255.255.0
-virtualip 10.1.1.5
-preferredmac "02:0E:22:71:AD:34"
curl -X POST 'https://server.sj.us:8443/rest/virtualid/add?cluster=mycluster.402.source&macs=%2209%3A0C%3A29%3A3C%3A47%3AAB%2003%3A3C%3A34%3A76%3ACF%3A21%2002%3A0E%3A22%3A71%3AAD%3A34%22&netmask=255.255.255.0&virtualid=10.1.1.5&preferredmac=%2202%3A0E%3A22%3A71%3AAD%3A34%22' --user <username>:<password>
Add VIP range for NFSv3 nodes:
maprcli virtualip add
-cluster mycluster.402.source
-service nfs3
-macs "09:0C:29:3C:47:AB 03:3C:34:76:CF:21 02:0E:22:71:AD:34"
-netmask 255.255.255.0
-virtualip 10.1.1.5
-virtualipend 10.1.1.7
-preferredmac "02:0E:22:71:AD:34"
curl -X POST 'https://server.sj.us:8443/rest/virtualid/add?cluster=mycluster.402.source&service=nfs3&macs=%2209%3A0C%3A29%3A3C%3A47%3AAB%2003%3A3C%3A34%3A76%3ACF%3A21%2002%3A0E%3A22%3A71%3AAD%3A34%22&netmask=255.255.255.0&virtualid=10.1.1.5&virtualipend=10.1.1.7&preferredmac=%2202%3A0E%3A22%3A71%3AAD%3A34%22' --user <username>:<password>
Add VIP for NFSv4 node:
maprcli virtualip add
-cluster mycluster.402.source
-service nfs4
-macs "09:0C:29:3C:47:AB 03:3C:34:76:CF:21 02:0E:22:71:AD:37"
-netmask 255.255.255.0
-virtualip 10.1.2.7
-preferredmac "02:0E:22:71:AD:37"
curl -X POST 'https://server.sj.us:8443/rest/virtualid/add?cluster=mycluster.402.source&service=nfs4&macs=%2209%3A0C%3A29%3A3C%3A47%3AAB%2003%3A3C%3A37%3A76%3ACF%3A21%2002%3A0E%3A22%3A71%3AAD%3A34%22&netmask=255.255.255.0&virtualid=10.1.2.7&preferredmac=%2202%3A0E%3A22%3A71%3AAD%3A37%22' --user <username>:<password>