Top
PRIMECLUSTER Global Link Services Configuration and AdministrationGuide 4.3Redundant Line Control Function

7.5 hanetmask Command

[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

print

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

-i network_address:

Specifies a network address of a virtual IP to set a subnet mask value in decimal dotted notation.


-m netmask:

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.....]]

-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

-i network_address:

Specifies a network address of subnet mask information to modify in decimal dotted notation.


-m netmask:

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}

-i network_address1[,network_address2.....]:

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.


-i all:

Deletes all subnet mask information set at present.

[Notes]

[Examples]

(1) create command

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

(2) print command

Prints a list of subnet mask information.

# /opt/FJSVhanet/usr/sbin/hanetmask print

(3) modify command

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

(4) delete command

Deletes all subnet mask information.

# /opt/FJSVhanet/usr/sbin/hanetmask delete -i all