[Name]
hanetmask - Sets, modifies, deletes, and prints a subnet mask.
[Synopsis]
/opt/FJSVhanet/usr/sbin/hanetmask command [args]
[Feature description]
This hanetmask command sets/modifies/deletes/prints a subnet mask value to specify when activating a virtual IP address. For virtual IP addresses used in Virtual NIC mode, use ifcfg-shaX to set the subnet mask value instead of this command.
Command | Process outline | Authority |
---|---|---|
create | Sets a subnet mask. | Super user |
Prints a subnet mask. | General user | |
modify | Modifies a subnet mask. | Super user |
delete | Deletes a subnet mask. | Super user |
(1) create command
Sets a subnet mask value to a virtual IP address defined by a hanetconfig command. A form of a create command is as follows:
# /opt/FJSVhanet/usr/sbin/hanetmask create -i network_address -m netmask |
Specifies a network address of a virtual IP to set a subnet mask value in decimal dotted notation.
Specifies a subnet mask value to a network address specified by -i in decimal dotted notation.
(2) print command
It is possible to print current information of a subnet mask by a print command. A form of a print command is as follows:
/opt/FJSVhanet/usr/sbin/hanetmask print [-i network_address1[,network_address2.....]] |
It is possible to specify a network address to print dividing by a comma (","). Here it specifies a network address specified by -i of a create command.
When not specified a -i option, all subnet mask information set at present is printed. An example of printing subnet mask information is as follows:
Display | Contents |
---|---|
network-address | A network address of a virtual IP. |
netmask | A subnet mask value to set to a network address. |
(3) modify command
When modifying a subnet mask value created by a create command, use a modify command. A form of a modify command is as follows:
# /opt/FJSVhanet/usr/sbin/hanetmask modify -i network_address -m netmask |
Specifies a network address of subnet mask information to modify in decimal dotted notation.
Specifies a modified subnet mask value to a network address specified by -i in decimal dotted notation.
(4) delete command
When deleting a subnet mask value created by a create command, use a delete command. A form of a delete command is as follows:
/opt/FJSVhanet/usr/sbin/hanetmask delete -i {network_address1[,network_address2.....] | all} |
It is possible to specify a network address to delete dividing by a comma (","). Here it specifies a network address specified by -i of a create command.
Deletes all subnet mask information set at present.
[Notes]
When dividing a network, which a virtual interface belongs to, into a subnet, set a subnet mask value by this command without fail. If not set, it is not possible to communicate with other systems. It is not necessary to execute this command if not divide into a subnet.
Set the same subnet mask value without fail in a system connected to the same network.
In NIC switching mode, set the same subnet mask value as that set to a physical IP address (a value set in /etc/sysconfig/network-scripts/ifcfg-ethX file) to a network address of a virtual IP.
The setting by this command is required in the following cases: when NIC switching mode, Fast switching mode, or GS linkage mode is used in the IPv4 configuration, when NIC switching mode or Fast switching mode is used in the dual configuration, or when the cluster takeover IP of IPv4 is used in Virtual NIC mode.
This configuration is not required for IPv6 configuration. The configured subnet mask assigned to a physical interface is subject to the address of the virtual interface of Fast switching mode, logical virtual interface, virtual interface of NIC switching mode and physical interface.
[Examples]
An example to define a subnet mask 255.255.255.0 to a network address 10.34.151.0 is as follows:
# /opt/FJSVhanet/usr/sbin/hanetmask create -i 10.34.151.0 -m 255.255.255.0 |
Prints a list of subnet mask information.
# /opt/FJSVhanet/usr/sbin/hanetmask print |
An example to modify a subnet mask, set to an already defined network address 10.34.0.0, to 255.255.0.0 is as follows:
# /opt/FJSVhanet/usr/sbin/hanetmask modify -i 10.34.0.0 -m 255.255.0.0 |
Deletes all subnet mask information.
# /opt/FJSVhanet/usr/sbin/hanetmask delete -i all |