PRIMECLUSTER Global Link Services Configuration and Administration Guide: Redundant Line Control Function 4.1 (for Solaris(TM) Operating System) |
Contents
Index
![]() ![]() |
Chapter 7 Command reference |
hanetconfig - Setting, modifying, deleting, and displaying a configuration definition of Redundant Line Control function
/opt/FJSVhanet/usr/sbin/hanetconfig command [args]
The hanetconfig command defines configuration information required for the operation of Redundant Line Control function. This command also modifies, deletes, and displays a setting.
Command |
Process outline |
Authority |
create |
Creates configuration information |
Super user |
copy |
Copies configuration information |
Super user |
|
Displays configuration information |
General user |
modify |
Modifies configuration information |
Super user |
delete |
Deletes configuration information |
Super user |
version |
Displays the version |
General user |
Configuration information must be defined for a virtual interface before Redundant Line Control function can be operated. Use the create command to create a definition of configuration information. The create command can also create definitions of more than one logical virtual interface on the virtual interface. The following is the command format for building a virtual interface:
- When creating a virtual interface
Fast switching mode (IPv4): Fast switching mode (IPv6): RIP mode or Fast switching/RIP mode: GS/SURE linkage mode (physical interface definition): GS/SURE linkage mode (virtual interface definition): NIC switching mode (IPv4: logical IP address takeover function): NIC switching mode (IPv6: logical IP address takeover function): NIC switching mode (physical IP address takeover function): Standby patrol function (automatic failback if a failure occurs / immediate automatic failback): |
- When creating a logical virtual interface
Fast switching mode, RIP mode and Fast switching/RIP mode (IPv4): Fast switching mode (IPv6): |
Specify an IP address form to set to a virtual interface.
inet |
: IPv4 address |
When omitted, it is dealt with as specified inet. It is necessary to specify this option first (immediately after a string of "create") before other options.
This option can be specified only when using Fast switching mode or NIC switching mode (a logical IP address takeover function).
Specify the name of a virtual interface or logical virtual interface for which the configuration information should be set. Specify the virtual interface name with a string that begins with "sha" and is followed by a value (0 to 255) (such as sha0 and sha10). Specify the logical virtual interface name as "virtual-interface-name: value (2 to 64)" (such as sha0:2 and sha10:5). If you specify a virtual interface or logical virtual interface in any other format, an error message is output and this command terminates abnormally. In addition, Logical virtual interface can only be configured on operation mode "t".
Specify an operation mode. If devicename is a logical virtual interface, specify the operation mode of a corresponding virtual interface.
t: Fast switching mode
Specify this parameter to use the Redundant Line Control function in Fast switching mode.
r: RIP mode
Specify this parameter to use the Redundant Line Control function in RIP mode.
b: Fast switching/RIP mode
Specify this parameter to use the Redundant Line Control function in Fast switching/RIP mode.
n: GS/SURE linkage mode (physical interface definition)
Specify this parameter to use the Redundant Line Control function in GS/SURE linkage mode. A physical interface used to actually perform communication is created.
c: GS/SURE linkage mode (virtual interface definition)
Specify this parameter to use the Redundant Line Control function in GS/SURE linkage mode. A virtual interface that bundles physical interfaces defined in operation mode n to perform communication is created.
d: NIC switching mode (logical IP address takeover function)
Specify this parameter to use the Redundant Line Control function in NIC switching mode. This mode activates logical interface and physical interface.
e: NIC switching mode (physical IP address takeover function)
Specify this parameter to use the Redundant Line Control function in NIC switching mode. This mode activates only physical interface.
p: Standby patrol function (automatic failback if a failure occurs)
Specify this parameter to use the Redundant Line Control function in NIC switching mode and monitor the status of the standby NIC. If the standby NIC is communicating due to a failure and the active NIC recovers, no failback occurs until the currently used NIC encounters a failure.
q: Standby patrol function (immediate automatic failback)
Specify this parameter to use the Redundant Line Control function in NIC switching mode and monitor the status of the standby NIC. If the standby NIC is communicating due to a failure and the active NIC recovers, a failback immediately occurs.
The following table lists options that can be specified in each operation mode.
Specifiable parameter |
inet | inet6 |
-n |
-i |
-e |
-a |
-t |
't' (Fast switching mode) |
Support |
O |
O (*8) |
X |
X |
O (*1) |
'r' (RIP mode) |
Not support |
O |
O |
X |
X |
O (*1) |
'b' (Fast switching/RIP mode) |
Not support |
O |
O |
X |
X |
O (*1) |
'n' (GS/SURE linkage mode (physical interface definition)) |
Not support |
O |
O |
X |
X |
O (*2) |
'c' (GS/SURE linkage mode (virtual interface definition)) |
Not support |
O |
O |
X |
X |
O (*3) |
'd' (NIC switching mode (logical IP address takeover function)) |
Support |
O |
O |
O (*6) |
X |
O (*4) |
'e' (NIC switching mode (physical IP address takeover function)) |
Not support |
O |
O |
O (*7) |
X |
O (*4) |
'p' (Standby patrol function (automatic failback if a failure occurs)) |
Not support |
O |
X |
X |
O |
O (*5) |
'q' (Standby patrol function (immediate automatic failback)) |
Not support |
O |
X |
X |
O |
O (*5) |
[Meaning of the symbols] 0: Required, X: Not required
*1 Specify a physical interface (The same physical interface can be specified if the operation mode is "t", "r", or "b"). 1 to 8 physical interfaces can be assigned.
*2 Specify one physical interface that is not specified in any other operation mode. Only one physical interface can be assigned.
*3 Specify a virtual interface created in operation mode "n". Two interfaces can be assigned.
*4 Specify a physical interface that is not specified in any other operation mode. One or two physical interface can be assigned.
*5 Specify a virtual interface specified in the operation mode "d" or "e". Only one interface can be assigned.
*6 It is not possible to specify this parameter when set inet6 to an address form.
*7 This parameter may be omitted if the physical IP address takeover function II is used (not activating an interface on the standby node in the cluster system).
*8 It can specify, only when creating logical virtual interface.
ipaddress1
Specify a host name or an IP address to assign to a virtual interface or a logical virtual interface (devicename specified by -n option). The specified IP address or host must be defined in an /etc/inet/hosts file (IPv4) or an /etc/inet/ipnodes file (IPv4,IPv6). When assigning an IP address to a logical virtual interface, it is necessary to specify the same subnet as that of a virtual interface. If specified a different subnet, occasionally it is not possible to communicate.
[/prefix]
Specify the length of a prefix of ipaddress1 following "/" (slash). The range possible to specify is between zero to 128. This parameter is required only when specifying an IPv6 address to ipaddress1 or a host name defined in an /etc/inet/ipnodes file. It is not possible to specify for an IPv4 address.
Specify an IP address or a host name to assign to a physical interface. It is possible to set an IP address or a host name in an IPv4 form only and must be defined in an /etc/inet/hosts and /etc/inet/ipnodes files. It is possible to specify this option only when specified inet for an address form. (When specified inet6, a link local address is automatically assigned.) It is necessary to set this option in NIC switching mode (operation mode is "d" or "e"). In cluster operation, it is possible to omit this option if an interface of NIC switching mode (operation mode is "e") is not activated by a standby node.
Specify interface names to be bundled by a virtual interface, by listing them delimited with a comma (,).
Specify virtual interface names (such as sha1 and sha2) for GS/SURE linkage mode (operation mode "c") or standby patrol function (operation mode "p" or "q").
To configure other than GS/SURE linkage mode (operation mode "c") or standby patrol function (operation mode "p" or "q"), specify the name of physical interface (such as eri0 or hme0) or the name of tagged VLAN interface (such as ce1000 or fjgi1000).
Specify a local MAC address to be allocated to the standby NIC as 02:XX:XX:XX:XX:XX (X represents a hexadecimal from 0 to F). "02" in the beginning indicates that this is a local MAC address. Any value may be specified. However, manage the address to prevent duplication of addresses with other NICs connected on the same LAN. No normal operation is guaranteed if duplicate addresses are used.
This parameter must be set only if the standby patrol function (operation mode "p" or "q") is used.
Use the copy command to create different configuration information while sharing an NIC used in other configuration information (virtual interface in NIC switching mode (operation mode "d")). This command thus allows configuration information to be automatically created by using the copy source information and without requiring you to specify an IP address to be attached to a physical interface, interface names to be bundled by a virtual interface, and an operation mode. This command realizes simpler operation than directly executing the hanetconfig create command.
In addition, this command can copy only virtual interface of NIC switching mode (operation mode "d").
The following is the command format for copying a virtual interface:
- When duplicating a virtual interface of IPv4 from a virtual interface of IPv4
/opt/FJSVhanet/usr/sbin/hanetconfig copy [inet] -n devicename1,devicename2 -i ipaddress |
- When duplicating a virtual interface of IPv4 from a virtual interface of IPv6 (dual stack configuration)
/opt/FJSVhanet/usr/sbin/hanetconfig copy [inet] -n devicename1,devicename1 -i ipaddress1 -e ipaddress2 |
- When duplicating a virtual interface of IPv6 from a virtual interface of IPv6
/opt/FJSVhanet/usr/sbin/hanetconfig copy inet6 -n devicename1,devicename2 -i ipaddress/prefix |
- When duplicating a virtual interface of IPv6 from a virtual interface of IPv4 (dual stack configuration)
/opt/FJSVhanet/usr/sbin/hanetconfig copy inet6 -n devicename1,devicename1 -i ipaddress/prefix |
Specify an IP address form to set to a copy-to virtual interface.
inet |
: IPv4 address |
When omitted, it is dealt with as specified inet. It is necessary to specify this option first (immediately after a strings of copy) before other options.
devicename1:
Specify a copy-from virtual interface name. It is possible to specify only a virtual interface name of NIC switching mode (operation mode is "d").
devicename2:
Specify a copy-to virtual interface name. When configuring IPv4/IPv6 dual stack, specify the same virtual interface name (devicename1) as that of copy-from.
Specify a host name or an IP address to assign to a copy-to virtual interface specified by devicename2. See -i option of a create command for the detail of how to set.
Specify an IP address or a host name to assign to a physical interface. This option is required to duplicate a virtual interface of IPv4 from that of IPv6 (dual stack configuration). See -e option of a create command for the detail of how to set.
Use the print command to display the current configuration information. The following is the format of the print command.
/opt/FJSVhanet/usr/sbin/hanetconfig print [-n devicename1[,devicename2,...]] |
Specify the name of a virtual interface or logical virtual interface whose configuration information should be displayed. If this option is not specified, the print command displays all the configuration information for the currently set virtual interfaces and logical virtual interfaces.
The following shows an example of displaying configuration information.
Item |
Explanation |
|
[IPv4,Patrol] |
The information of an IPv4 virtual interface and standby patrol |
|
[IPv4,Patrol] |
Name |
Outputs a virtual interface name. |
Hostname |
Outputs the host name or virtual IP address of a virtual interface. |
|
Mode |
Outputs the operation mode of a virtual interface. (For details, please refer to "-m" option of the create command.) |
|
MAC Adder/Phys ip |
Outputs a MAC local address used by standby patrol mode, or physical IP address defined as the virtual interface. |
|
Interface List |
Outputs a virtual interface name in GS/SURE linkage mode (operation mode "c") or standby patrol function (operation mode "p" or "q"). Outputs a physical interface name (such as le0 and hme0) in any other mode than GS/SURE linkage mode (operation mode "c") or standby patrol function (operation mode "p" or "q"). |
|
[IPv6] |
The information of an IPv6 virtual interface |
|
[IPv6] |
Name |
Outputs a virtual interface name. |
Hostname/prefix |
A host name or an IP address and a prefix value of a virtual interface |
|
Mode |
Outputs the operation mode of a virtual interface. |
|
Interface List |
Outputs a virtual interface name in GS/SURE linkage mode (operation mode "c") or standby patrol function (operation mode "p" or "q"). Outputs a physical interface name (such as le0 and hme0) in any other mode than GS/SURE linkage mode (operation mode "c") or standby patrol function (operation mode "p" or "q"). |
Use the modify command to modify the configuration of Redundant Line Control function.
The following is the format of the modify command that modifies configuration information for a virtual interface:
- When changing configuration information of a virtual interface
Fast switching mode (IPv4): Fast switching mode (IPv6): RIP mode or Fast switching/RIP mode: GS/SURE linkage mode (physical interface definition): GS/SURE linkage mode (virtual interface definition): NIC switching mode (IPv4: logical IP address takeover function): NIC switching mode (IPv6: logical IP address takeover function): NIC switching mode (physical IP address takeover function): Standby patrol function: |
- When changing configuration information of a virtual interface
Fast switching mode, RIP mode and Fast switching/RIP mode (IPv4): Fast switching mode (IPv6): |
Specify an IP address form to set to a changing virtual interface.
inet |
: IPv4 address |
When omitted, it is dealt with as specified inet. It is necessary to specify this option first (immediately after a string of modify) before other options.
This option can be specified only when using Fast switching mode or NIC switching mode (a logical IP address takeover function).
Specify the name of a virtual interface or logical virtual interface whose configuration information should be modified. This parameter is required.
Specify this parameter to change the operation mode (Fast switching mode, RIP mode, or Fast switching/RIP mode) of a virtual interface to be modified. One of Fast switching mode, RIP mode, or Fast switching/RIP mode can be selected ("t" indicates Fast switching mode, "r" indicates RIP mode, and "b" indicates Fast switching/RIP mode).
Specify a host name or IP address to be attached to a virtual or logical virtual interface (devicename specified by -n option) to be used for Redundant Line Control function. This host name must correspond to an IP address in a network database such as the /etc/inet/hosts and /etc/inet/ipnodes files. You can directly specify an IP address instead of a host name. In this case, you must specify the IP address in dotted decimal notation. When you specify address information for a logical virtual interface, be sure to specify an address in the same subnet as the address of a corresponding virtual interface. Communication may be disabled if any other subnet is specified.
Specify an IP address to be attached to a physical interface. This host name must correspond to an IP address in a network database such as the /etc/inet/hosts and /etc/inet/ipnodes files. You can directly specify an IP address instead of a host name. In this case, you must specify the IP address in dotted decimal notation.
This parameter can be modified only if the operation mode of a virtual interface to be modified is NIC switching mode (operation mode "d" or "e").
Specify interface names to be bundled by a virtual interface, by listing them delimited with a comma (,).
Specify virtual interface names (such as sha1 and sha2) if the operation mode of a virtual interface to be modified is GS/SURE linkage mode (operation mode "c") or standby patrol function (operation mode "p" or "q").
Specify physical interface names (such as le0 and hme0) if the operation mode of a virtual interface to be modified is not GS/SURE linkage mode (operation mode "c") or standby patrol function (operation mode "p" or "q").
This parameter can be changed only if the operation mode of a virtual interface to be modified is standby patrol function (operation mode "p" or "q").
Use the delete command to delete the configuration of Redundant Line Control function. The following is the format of the delete command:
/opt/FJSVhanet/usr/sbin/hanetconfig delete [inet | inet6] -n {devicename1[,devicename2,...] | all} |
Specify an IP address form of a deleting virtual interface.
inet |
: IPv4 address |
When omitted, it is dealt with as specified inet. It is necessary to specify this option first (immediately after a string of delete) before other options.
This option can be specified only when using Fast switching mode or NIC switching mode (a logical IP address takeover function).
Specify the names of virtual interfaces (such as sha0 and sha1) or logical virtual interfaces (such as sha0:2 and sha1:10) whose configuration information should be deleted.
Specify this parameter to delete all the defined virtual and logical interfaces. In addition, the definition of IPv4 interface and IPv6 interface cannot be deleted simultaneously. Please specify IPv4 interface and IPv6 interface individually, respectively and delete them.
The version of this product is displayed. The following is the format of the version command.
/opt/FJSVhanet/usr/sbin/hanetconfig version |
The following shows an example of displaying version information.
HA-Net version 2.7 |
The following shows an example of the setting command used in Fast switching mode to bundle two physical interfaces (hme0 and hme1) as the virtual interface host "hahost" to duplicate the virtual interface sha0.
# /opt/FJSVhanet/usr/sbin/hanetconfig create -n sha0 -m t -i hahost -t hme0,hme1 |
The following shows an example of the setting command used in RIP mode to have each of two virtual interfaces (sha0 and sha1) bundle two of four physical interfaces (hme0, hme1, hme2, and hme3).
# /opt/FJSVhanet/usr/sbin/hanetconfig create -n sha0 -m r -i hosta -t hme0,hme1 |
The following shows an example of the setting command used to operate the virtual interface (sha0) both in Fast switching and RIP modes at the same time.
# /opt/FJSVhanet/usr/sbin/hanetconfig create -n sha0 -m b -i hostc -t hme0,hme1 |
The following shows an example of the setting command used in RIP mode to have each of two virtual interfaces (sha0 and sha1) bundle two of three physical interfaces (hme0, hme1, and hme2) and share one physical interface (hme1) between two virtual interfaces.
# /opt/FJSVhanet/usr/sbin/hanetconfig create -n sha0 -m r -i hostd -t hme0,hme1 |
The following shows an example of the setting command used to define two logical virtual interfaces (sha0:2 and sha0:3) on the virtual interface (sha0).
# /opt/FJSVhanet/usr/sbin/hanetconfig create -n sha0 -m t -i hostf -t hme0,hme1 |
The following shows an example of the setting command used to have the virtual interface (sha0) bundle only one physical interface (hme0).
# /opt/FJSVhanet/usr/sbin/hanetconfig create -n sha0 -m t -i hosti -t hme0 |
The following shows an example of the setting command used in NIC switching mode to set two physical interfaces (hme0 and hme1) and use the logical IP address takeover function and the standby patrol function (operation mode "p"). Before NIC switching mode can be used, the router/HUB monitoring function must be set.
# /opt/FJSVhanet/usr/sbin/hanetconfig create -n sha0 -m d -i hostg -e hosth -t hme0,hme1 |
The following shows an example of the setting command used in NIC switching mode to set two physical interfaces (hme0 and hme1) and use the physical IP address takeover function and the standby patrol function (operation mode "p"). Before NIC switching mode can be used, the router/HUB monitoring function must be set.
# /opt/FJSVhanet/usr/sbin/hanetconfig create -n sha0 -m e -i hosti -t hme0,hme1 |
The following shows an example of the setting command used in GS/SURE linkage mode to have two physical interfaces (hme0 and hme1) bundled. For this purpose, first set the physical interfaces in GS/SURE linkage mode (operation mode "n"), then create virtual interfaces in GS/SURE linkage mode (operation mode "n"), and have the virtual interfaces bundled to set GS/SURE linkage mode (operation mode "c").
# /opt/FJSVhanet/usr/sbin/hanetconfig create -n sha1 -m n -i hostd -t hme0 |
The following is an example that set two physical interfaces (hme0 and hme1) to use a logical IP address takeover function by an IPv6 address in NIC switching mode. It is necessary to set a router/HUB monitoring function other than this setting.
# /opt/FJSVhanet/usr/sbin/hanetconfig inet6 create -n sha0 -m d -i fec0:1::1/64 -t hme0,hme1 |
The following is an example of configuring two physical interfaces (hme0 and hme1) and creating a virtual interface (sha0) using IPv6 address.
# /opt/FJSVhanet/usr/sbin/hanetconfig create inet6 -n sha0 -m t -t hme0,hme1 |
The following shows an example of the setting command used in NIC switching mode to set two VLAN interfaces (fjgi1000 and fjgi1001) and use the logical IP address takeover function and the standby patrol function (operation mode "p"). Before NIC switching mode can be used, the router/HUB monitoring function must be set.
# /opt/FJSVhanet/usr/sbin/hanetconfig create -n sha0 -m d -i hostg -e hosth -t fjgi1000,fjgi1001 |
The following is an example of modifying bundled physical interfaces (hme0 and hme1) in the virtual interface (sha0) to different physical interfaces (hme2 and hme3).
# /opt/FJSVhanet/usr/sbin/hanetconfig modify -n sha0 -t hme2,hme3 |
The following is an example of modifying the virtual IP address defined in the virtual interface (sha0).
# /opt/FJSVhanet/usr/sbin/hanetconfig modify -n sha0 -i hostc |
The following is an example of modifying the virtual interface (sha0) to use Fast switching mode and RIP mode concurrently. (This modification is only allowed for Fast switching mode or RIP mode)
# /opt/FJSVhanet/usr/sbin/hanetconfig modify -n sha0 -m b |
The following is an example of modifying the value of the local MAC address to be allocated in the standby NIC used in NIC switching mode.
# /opt/FJSVhanet/usr/sbin/hanetconfig modify -n sha1 -a 02:00:00:00:00:01 |
The following is an example of sharing the NIC, used in the virtual interface (sha0 for IPv4) for NIC switching mode (operation mode "d"), with another virtual interface (sha2 for IPv4).
# /opt/FJSVhanet/usr/sbin/hanetconfig copy -n sha0,sha2 -i host4 |
The following is an example of sharing the NIC, used in the virtual interface (sha0 for IPv6) for NIC switching mode (operation mode "d"), with another virtual interface (sha2 for IPv4).
# /opt/FJSVhanet/usr/sbin/hanetconfig copy -n sha0,sha0 -i host4 e hostp |
The following is an example of sharing the NIC, used in the virtual interface (sha0 for IPv6) for NIC switching mode (operation mode "d"), with another virtual interface (sha2 for IPv6).
# /opt/FJSVhanet/usr/sbin/hanetconfig copy inet6 -n sha0,sha2 -i host6/64 |
The following is an example of sharing the NIC, used in the virtual interface (sha0) for IPv4) for NIC switching mode (operation mode "d"), with another virtual interface (sha2 for IPv6).
# /opt/FJSVhanet/usr/sbin/hanetconfig copy inet6 -n sha0,sha0 -i host6/64 |
The following is an example of deleting the virtual interface (sha2 for IPv4).
# /opt/FJSVhanet/usr/sbin/hanetconfig delete -n sha2 |
The following is an example of deleting the virtual interface (sha2 for IPv6).
# /opt/FJSVhanet/usr/sbin/hanetconfig delete inet6 -n sha2 |
The following is an example of deleting the logical virtual interface (sha0:2).
# /opt/FJSVhanet/usr/sbin/hanetconfig delete -n sha0:2 |
The following is an example of deleting the logical virtual interface (sha0:2 for IPv6).
# /opt/FJSVhanet/usr/sbin/hanetconfig delete inet6 -n sha0:2 |
Contents
Index
![]() ![]() |