This section describes how to change the settings for Virtual NIC mode. After changing the settings, you need to reflect the changes in the operations following some procedures. Note that the change distribution procedures vary depending on the command used for changing the settings, and whether the settings were changed in a single system configuration (no cluster is used), or in a cluster configuration.
Distribution Procedure
Network configuration file of virtual interface | Single | Cluster |
---|---|---|
/etc/sysconfig/network-scripts/ifcfg-shaX | 1 | 1 |
hanetpathmon command | Single | Cluster |
---|---|---|
Monitored IP (target -p) | 2 | 3 |
Monitored IP VLAN (target -v) | 2 | 3 |
Automatic start of monitoring (param -a) | 2 | 3 |
Monitoring period (param -s) | 2 | 3 |
The number of monitoring (param -c) | 2 | 3 |
The number of recovery monitoring (param -r) | 2 | 3 |
Link up waiting period (param -p) | 2 | 3 |
Automatic fail-back (param -q) | 2 | 3 |
Failover (param -f) | None | 3 |
hanethvrsc command | Single | Cluster |
---|---|---|
Takeover virtual IP address (-i) | None | 4 |
hanetparam command | Single | Cluster |
---|---|---|
Link down detection timer (-q) | 4 | 4 |
Link up detection timer (-r) | 4 | 4 |
Link status monitoring standby timer (-g) | 4 | 4 |
Network configuration file of OS | Single | Cluster |
---|---|---|
Network configuration file (/etc/sysconfig/network-scripts/ifcfg-ethX, /etc/sysconfig/network, /etc/hosts) etc. | 5 | 5 |
Procedure 1
Perform one of the following procedures after changing settings.
Activate the target virtual interface.
Reboot the system
Procedure 2
Perform one of the following procedures after changing settings.
Enable the monitoring (activating).
Reboot the system.
Execute the resethanet -s command.
Procedure 3
Perform one of the following procedures after changing settings.
Enable the monitoring (activating).
Reboot the system
Procedure 4
Changed settings are immediately reflected in the operations after changing settings. No distribution procedure is required.
Procedure 5
If you modified the network configuration file for the operating system, you must reboot the system instead of manually restarting the network service (/etc/init.d/network restart, service network restart).
Changing Procedure
The following shows the procedure for changing configuration information. Changes become effective by performing distribution procedures.
Inactivate the target virtual interface using the "stphanet" command. For information, see "7.3 stphanet Command".
Change the configuration information.
After changing the configuration information, activate the target virtual interface using the "strhanet" command. For information, see "7.2 strhanet Command".
The following shows the procedure for changing information of network monitoring. Changes become effective by performing distribution procedures.
Stop network monitoring with the hanetpathmon off command.
Change the monitoring target with the hanetpathmon target command.
Change the following monitoring parameters with the hanetpathmon param command:
Automatic start of monitoring
Monitoring period
The number of monitoring
The number of recovery monitoring
Link up waiting period
Automatic fail-back
Cluster switching
Start network monitoring with the hanetpathmon on command.
For details, see "7.12 hanetpathmon Command".
The following shows the procedure for changing link status monitoring parameters. Changes become effective by performing distribution procedures.
Change the following link status monitoring parameters with the hanetparam command:
Link down detection timer
Link up detection timer
Link status monitoring standby timer
For details, see "7.6 hanetparam Command".
The following lists the information that can be changed for Virtual NIC mode. No information can be changed besides the information listed below. Delete the target definition and add it again.
Configuration definition information
You can change the information such as IP addresses and a subnet mask by editing the network setting file (/etc/sysconfig/network-scripts/ifcfg-shaX) of the virtual interface. For details, see "3.3.3 Virtual NIC mode".
Network monitoring information
The following information can be changed with the hanetpathmon command. For details, see "7.12 hanetpathmon Command".
Monitored IP (primary monitored remote system IP address and secondary monitored remote system IP address)
Monitored IP VLAN (primary monitored remote system IP address and secondary monitored remote system IP address)
Automatic start of monitoring
Monitoring period
The number of monitoring
The number of recovery monitoring
Link up waiting period
Automatic fail-back
Cluster switching (failover)
Information of link status monitoring parameter
The following information can be changed with the hanetparam command. For details, see "7.6 hanetparam Command".
Link down detection timer
Link up detection timer
Link status monitoring standby timer
Note
If a virtual bridge is connected to a virtual interface of the Virtual NIC mode, the virtual interface cannot be deactivated. Deactivate it after disconnecting the virtual interface from the virtual bridge.
[Example 1]
The following shows the procedure for changing the monitoring target and monitoring period of network monitoring during single system or cluster operation.
Check the setting.
# /opt/FJSVhanet/usr/sbin/hanetpathmon target [Target List] Name VID Target +-------+----+----------------------------------------------------------+ sha0 - 192.168.10.250,192.168.10.251 # /opt/FJSVhanet/usr/sbin/hanetpathmon param [Parameter List] Name Monitoring Parameter +-------+----------------------------------------------------------+ sha0 auto_startup = yes interval = 3 sec times = 5 times repair_times = 2 times idle = 45 sec Auto fail-back = no FAILOVER Status = yes |
Stop network monitoring.
# /opt/FJSVhanet/usr/sbin/hanetpathmon off |
Change the monitoring target and monitoring period.
# /opt/FJSVhanet/usr/sbin/hanetpathmon target -n sha0 -p 192.168.10.150,192.168.10.251 # /opt/FJSVhanet/usr/sbin/hanetpathmon param -n sha0 -s 5 |
Check the changed setting.
# /opt/FJSVhanet/usr/sbin/hanetpathmon target [Target List] Name VID Target +-------+----+----------------------------------------------------------+ sha0 - 192.168.10.150,192.168.10.251 # /opt/FJSVhanet/usr/sbin/hanetpathmon param [Parameter List] Name Monitoring Parameter +-------+----------------------------------------------------------+ sha0 auto_startup = yes interval = 5 sec times = 5 times repair_times = 2 times idle = 45 sec Auto fail-back = no FAILOVER Status = yes |
Distribute the changes. Perform the "enable the monitoring (activating)" procedure, "reboot the system" procedure, or "execute the resethanet -s command (in the single configuration)" procedure according to Procedure 2 or 3. The following is an execution example in which the "enable the monitoring (activating)" procedure is used.
# /opt/FJSVhanet/usr/sbin/hanetpathmon on |
[Example 2]
The following shows the procedure for changing the virtual IP address for a virtual interface in single system operation.
Check the virtual interface.
# /sbin/ifconfig sha0 sha0 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX inet addr:192.168.80.10 Bcast:192.168.80.255 Mask:255.255.255.0 inet6 addr: fe80::XXXX:XXXX:XXXX:XXXX/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:372 errors:0 dropped:0 overruns:0 frame:0 TX packets:1314 errors:0 dropped:11 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:30500 (29.7 KiB) TX bytes:124151 (121.2 KiB) |
Check the status of the virtual interface.
# /opt/FJSVhanet/usr/sbin/dsphanet
[IPv4,Patrol / Virtual NIC]
Name Status Mode CL Device
+----------+--------+----+----+------------------------------------------------+
sha0 Active v OFF eth1(ON),eth2(OFF)
[IPv6]
Name Status Mode CL Device
+----------+--------+----+----+------------------------------------------------+ |
Deactivate the virtual interface.
# /opt/FJSVhanet/usr/sbin/stphanet -n sha0 |
Check the status of the virtual interface.
# /opt/FJSVhanet/usr/sbin/dsphanet
[IPv4,Patrol / Virtual NIC]
Name Status Mode CL Device
+----------+--------+----+----+------------------------------------------------+
sha0 Inactive v OFF eth1(OFF),eth2(OFF)
[IPv6]
Name Status Mode CL Device
+----------+--------+----+----+------------------------------------------------+ |
Edit the network setting file of the virtual interface to change the IP address.
Contents of /etc/sysconfig/network-scripts/ifcfg-sha0
DEVICE=sha0 IPADDR=192.168.80.1 |
Distribute the changes. Because the "network setting file of the virtual interface" was changed, perform the "activate the target virtual interface" procedure or "reboot the system" procedure according to Procedure 1. The following is an execution example in which the "activate the target virtual interface" procedure is used.
# /opt/FJSVhanet/usr/sbin/strhanet -n sha0 |
Check the status of virtual interface.
# /opt/FJSVhanet/usr/sbin/dsphanet
[IPv4,Patrol / Virtual NIC]
Name Status Mode CL Device
+----------+--------+----+----+------------------------------------------------+
sha0 Active v OFF eth1(ON),eth2(OFF)
[IPv6]
Name Status Mode CL Device
+----------+--------+----+----+------------------------------------------------+ |
Check the virtual interface.
# /sbin/ifconfig sha0 sha0 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX inet addr:192.168.80.1 Bcast:192.168.80.255 Mask:255.255.255.0 inet6 addr: fe80::XXXX:XXXX:XXXX:XXXX/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:20 errors:0 dropped:7 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:4505 (4.3 KiB) |
[Example 3]
The following shows the procedure for changing the virtual interface connected to the virtual bridge during the operation process in a virtual machine environment.
Check the virtual interface connected to the virtual bridge.
# /usr/sbin/brctl show
bridge name bridge id STP enabled interfaces
br0 8000.************ no sha0 |
Check the status of the virtual interface.
# /opt/FJSVhanet/usr/sbin/dsphanet [IPv4,Patrol / Virtual NIC] Name Status Mode CL Device +----------+--------+----+----+------------------------------------------------+ sha0 Active v OFF eth1(ON),eth2(OFF) sha1 Active v OFF eth3(ON),eth4(OFF) [IPv6] Name Status Mode CL Device +----------+--------+----+----+------------------------------------------------+ |
Disconnect the virtual interface from the virtual bridge.
# /usr/sbin/brctl delif br0 sha0 |
Check the status of the virtual bridge.
# /usr/sbin/brctl show bridge name bridge id STP enabled interfaces br0 8000.000000000000 no |
Deactivate the virtual interface.
# /opt/FJSVhanet/usr/sbin/stphanet -n sha0 # /opt/FJSVhanet/usr/sbin/stphanet -n sha1 |
Check the status of the virtual interface.
# /opt/FJSVhanet/usr/sbin/dsphanet [IPv4,Patrol / Virtual NIC] Name Status Mode CL Device +----------+--------+----+----+------------------------------------------------+ sha0 Inactive v OFF eth1(OFF),eth2(OFF) sha1 Inactive v OFF eth3(OFF),eth4(OFF) [IPv6] Name Status Mode CL Device +----------+--------+----+----+------------------------------------------------+ |
Edit the network setting file of the virtual interface.
Contents of /etc/sysconfig/network-scripts/ifcfg-sha0
Delete "BRIDGE=br0" and add "IPADDR", "NETMASK", and similar statements related to the IP address.
[Before modification]
DEVICE=sha0 BOOTPROTO=static ONBOOT=yes DEVICETYPE=sha HOTPLUG=no BRIDGE=br0 |
[After modification]
DEVICE=sha0 IPADDR=192.168.80.10 |
Contents of /etc/sysconfig/network-scripts/ifcfg-sha1
Delete "IPADDR", "NETMASK", and similar statements related to the IP address and add "BRIDGE=br0".
[Before modification]
DEVICE=sha1 IPADDR=192.168.81.10 |
[After modification]
DEVICE=sha1 BOOTPROTO=static ONBOOT=yes DEVICETYPE=sha HOTPLUG=no BRIDGE=br0 |
Distribute the changes. Because the "network setting file of the virtual interface" was changed, perform the "activate the target virtual interface" procedure or "reboot the system" procedure according to Procedure 1. The following is an execution example in which the "activate the target virtual interface" procedure is used.
# /opt/FJSVhanet/usr/sbin/strhanet -n sha0 # /opt/FJSVhanet/usr/sbin/strhanet -n sha1 |
Changed virtual interface is connected to the virtual interface by activating the virtual interface.
Check the status of the virtual interface.
# /opt/FJSVhanet/usr/sbin/dsphanet [IPv4,Patrol / Virtual NIC] Name Status Mode CL Device +----------+--------+----+----+------------------------------------------------+ sha0 Active v OFF eth1(ON),eth2(OFF) sha1 Active v OFF eth3(ON),eth4(OFF) [IPv6] Name Status Mode CL Device +----------+--------+----+----+------------------------------------------------+ |
Check the virtual interface connected to the virtual bridge.
# /usr/sbin/brctl show
bridge name bridge id STP enabled interfaces
br0 8000.************ no sha1 |
[Example 4]
The following shows the procedure for changing the takeover virtual IP for the virtual interface in cluster operation.
Check the setting.
# /opt/FJSVhanet/usr/sbin/hanethvrsc print
ifname takeover-ipv4 takeover-ipv6 vlan-id/logical ip address list
+----------+----------------+----------------+--------------------------------+
sha0:65 192.168.20.102 - - |
Stop the cluster operation. Also delete the setting for Gls resources from cluster applications.
Delete the virtual interface once, and then reconfigure it.
# /opt/FJSVhanet/usr/sbin/hanethvrsc delete -n sha0:65 # /opt/FJSVhanet/usr/sbin/hanethvrsc create -n sha0 -i 192.168.10.101 |
Check the setting after reconfiguring.
# /opt/FJSVhanet/usr/sbin/hanethvrsc print ifname takeover-ipv4 takeover-ipv6 vlan-id/logical ip address list +----------+----------------+----------------+--------------------------------+ sha0:65 192.168.10.101 - - |
Distribute the changes. Because the "takeover IP address" was changed, no distribution procedure is required according to Procedure 4.
Create the Gls resource setting on cluster applications.
Start the cluster operation.
[Example 5]
The following shows the procedure for changing the virtual IP address for a virtual interface in cluster operation.
Stop the cluster operation.
Check the virtual interface.
# /sbin/ifconfig sha0 sha0 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX inet addr:192.168.20.20 Bcast:192.168.80.255 Mask:255.255.255.0 inet6 addr: fe80::XXXX:XXXX:XXXX:XXXX/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:372 errors:0 dropped:0 overruns:0 frame:0 TX packets:1314 errors:0 dropped:11 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:30500 (29.7 KiB) TX bytes:124151 (121.2 KiB) |
Check the status of the virtual interface.
# /opt/FJSVhanet/usr/sbin/dsphanet
[IPv4,Patrol / Virtual NIC]
Name Status Mode CL Device
+----------+--------+----+----+------------------------------------------------+
sha0 Active v ON eth1(ON),eth2(OFF)
[IPv6]
Name Status Mode CL Device
+----------+--------+----+----+------------------------------------------------+ |
Deactivate the virtual interface.
# /opt/FJSVhanet/usr/sbin/stphanet -n sha0 |
Edit the network setting file of the virtual interface to change the IP address.
Contents of /etc/sysconfig/network-scripts/ifcfg-sha0
DEVICE=sha0 IPADDR=192.168.20.10 |
Distribute the changes. Because the "network setting file of the virtual interface" was changed, perform the "activate the target virtual interface" procedure or "reboot the system" procedure according to Procedure 1. The following is an execution example in which the "activate the target virtual interface" procedure is used.
# /opt/FJSVhanet/usr/sbin/strhanet -n sha0 |
Check the status of the virtual interface.
# /opt/FJSVhanet/usr/sbin/dsphanet
[IPv4,Patrol / Virtual NIC]
Name Status Mode CL Device
+----------+--------+----+----+------------------------------------------------+
sha0 Active v ON eth1(ON),eth2(OFF)
[IPv6]
Name Status Mode CL Device
+----------+--------+----+----+------------------------------------------------+ |
Check the virtual interface.
# /sbin/ifconfig sha0 sha0 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX inet addr:192.168.20.10 Bcast:192.168.80.255 Mask:255.255.255.0 inet6 addr: fe80::XXXX:XXXX:XXXX:XXXX/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:20 errors:0 dropped:7 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:4505 (4.3 KiB) |
Start the cluster operation.