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

3.4.3 Virtual NIC mode

This section describes how to change the settings for the 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, etc.

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

hanetconfig command (for RHEL9)

Single

Cluster

SHAMACADDR (-s)

6

6

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.

Procedure 2

Perform one of the following procedures after changing settings.

Procedure 3

Perform one of the following procedures after changing settings.

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.

Procedure 6

Perform one of the following procedures after changing settings.

Changing Procedure

The following shows the procedure for changing configuration information. Changes become effective by performing distribution procedures.

  1. Inactivate the target virtual interface using the "stphanet" command. For information, see "7.3 stphanet Command".

  2. Change the configuration information.

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

  1. Stop network monitoring with the hanetpathmon off command.

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

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

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

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.

  1. 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
  2. Stop network monitoring.

    # /opt/FJSVhanet/usr/sbin/hanetpathmon off
  3. 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
  4. 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
  5. 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.

  1. Check the IP address of the virtual interface by using the ip command.

    # /usr/sbin/ip addr show sha0
    sha0      <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
              link/ether XX:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff
              inet 192.168.80.10/24 brd 192.168.80.255 scope global sha0
              valid_lft forever preferred_lft forever
              inet6 fe80::XXXX:XXXX:XXXX:XXXX/64 scope link
              valid_lft forever preferred_lft forever
  2. 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
    +----------+--------+----+----+------------------------------------------------+
  3. Deactivate the virtual interface.

    # /opt/FJSVhanet/usr/sbin/stphanet -n sha0
  4. 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
    +----------+--------+----+----+------------------------------------------------+
  5. Change the IP address of the virtual interface.

    • For RHEL8

      Edit the network setting file of the virtual interface.

      Contents of /etc/sysconfig/network-scripts/ifcfg-sha0

      DEVICE=sha0
      IPADDR=192.168.80.1
      PREFIX=24
      BOOTPROTO=none
      ONBOOT=yes
      TYPE=Ethernet
    • For RHEL9

      Set the following parameters with the "nmcli connection modify" comand.

      • ipv4.method: "manual"

      • ipv4.addresses: "192.168.80.1/24"

  6. 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
  7. 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
    +----------+--------+----+----+------------------------------------------------+
  8. Check the IP address of the virtual interface by using the ip command.

    # /usr/sbin/ip addr show sha0
    sha0      <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
              link/ether XX:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff
              inet 192.168.80.1/24 brd 192.168.80.255 scope global sha0
              valid_lft forever preferred_lft forever
              inet6 fe80::XXXX:XXXX:XXXX:XXXX/64 scope link
              valid_lft forever preferred_lft forever

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

  1. Check the virtual interface connected to the virtual bridge.

    • For RHEL8

      # ip link show master br0
      N: sha0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UP mode DEFAULT group default qlen 1000
          link/ether XX:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff
    • For RHEL9

      Execute the following command to display the virtual bridge interface connected to the virtual interface.

      # nmcli -g connection.master connection show sha0
      br0
  2. 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
    +----------+--------+----+----+------------------------------------------------+
  3. Disconnect the virtual interface from the virtual bridge.

    • For RHEL8

      # ip link set dev sha0 nomaster
    • For RHEL9

      Set the following parameters to the virtual interface with the "nmcli connection modify" command.

      • connection.slave-type: ""

      • connection.master: ""

  4. Check the status of the virtual bridge.

    • For RHEL8

      Execute the following command to make sure that sha0 is not displayed.

      # ip link show master br0
    • For RHEL9

      Execute the following command to make sure that br0 is not displayed.

      # nmcli -g connection.master connection show sha0
  5. Deactivate the virtual interface.

    # /opt/FJSVhanet/usr/sbin/stphanet -n sha0
    # /opt/FJSVhanet/usr/sbin/stphanet -n sha1
  6. 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
    +----------+--------+----+----+------------------------------------------------+
  7. Edit the network setting of the virtual interface.

    • For RHEL8

      • Contents of /etc/sysconfig/network-scripts/ifcfg-sha0

        Delete "BRIDGE=br0", and add "IPADDR", "PREFIX", and similar statements related to the IP address.

        [Before modification]

        DEVICE=sha0
        BOOTPROTO=none
        ONBOOT=yes
        TYPE=Ethernet
        BRIDGE=br0

        [After modification]

        DEVICE=sha0
        IPADDR=192.168.80.10
        PREFIX=24
        BOOTPROTO=none ONBOOT=yes TYPE=Ethernet
      • Contents of /etc/sysconfig/network-scripts/ifcfg-sha1

        Delete "IPADDR", "PREFIX", and similar statements related to the IP address, and add "BRIDGE=br0".

        [Before modification]

        DEVICE=sha1
        IPADDR=192.168.81.10
        PREFIX=24
        BOOTPROTO=none ONBOOT=yes TYPE=Ethernet

        [After modification]

        DEVICE=sha1
        BOOTPROTO=none
        ONBOOT=yes
        TYPE=Ethernet
        BRIDGE=br0
    • For RHEL9

      Set the following parameters to the virtual interfaces with the "nmcli connection modify" command.

      [sha0]
      • connection.slave-type: ""

      • connection.master: ""

      • ipv4.method: "manual"

      • ipv4.addresses: "192.168.80.10/24"

      [sha1]
      • connection.slave-type: "bridge"

      • connection.master: "br0"

      • ipv4.method: "disabled"

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

  9. 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
    +----------+--------+----+----+------------------------------------------------+
  10. Check the virtual interface connected to the virtual bridge.

    • For RHEL8

      # ip link show master br0
      N: sha1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UP mode DEFAULT group default qlen 1000
          link/ether XX:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff
    • For RHEL9

      # nmcli -g connection.master connection show sha1
      br0

[Example 4]

The following shows the procedure for changing the takeover virtual IP for the virtual interface in cluster operation.

  1. 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   -                -
  2. Stop the cluster operation. Also delete the setting for Gls resources from cluster applications.

  3. 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
  4. 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   -                -
  5. Distribute the changes. Because the "takeover IP address" was changed, no distribution procedure is required according to Procedure 4.

  6. Create the Gls resource setting on cluster applications.

  7. Start the cluster operation.

[Example 5]

The following shows the procedure for changing the virtual IP address for a virtual interface in cluster operation.

  1. Stop the cluster operation.

  2. Check the IP address of the virtual interface by using the ip command.

    # /usr/sbin/ip addr show sha0
    sha0      <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
              link/ether XX:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff
              inet 192.168.20.20/24 brd 192.168.20.255 scope global sha0
              valid_lft forever preferred_lft forever
              inet6 fe80::XXXX:XXXX:XXXX:XXXX/64 scope link
              valid_lft forever preferred_lft forever
  3. 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
    +----------+--------+----+----+------------------------------------------------+
  4. Deactivate the virtual interface.

    # /opt/FJSVhanet/usr/sbin/stphanet -n sha0
  5. Change the IP address of the virtual interface.

    • For RHEL8

      Edit the network setting file of the virtual interface.

      Contents of /etc/sysconfig/network-scripts/ifcfg-sha0

      DEVICE=sha0
      IPADDR=192.168.20.10
      PREFIX=24
      BOOTPROTO=none
      ONBOOT=yes
      TYPE=Ethernet
    • For RHEL9

      Set the following parameters with the "nmcli connection modify" command.

      • ipv4.method: "manual"

      • ipv4.addresses: "192.168.20.10/24"

  6. 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
  7. 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
    +----------+--------+----+----+------------------------------------------------+
  8. Check the IP address of the virtual interface by using the ip command.

    # /usr/sbin/ip addr show sha0
    sha0      <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
              link/ether XX:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff
              inet 192.168.20.10/24 brd 192.168.20.255 scope global sha0
              valid_lft forever preferred_lft forever
              inet6 fe80::XXXX:XXXX:XXXX:XXXX/64 scope link
              valid_lft forever preferred_lft forever
  9. Start the cluster operation.

[Example 6]

The following shows the procedure for changing SHAMACADDR of a virtual interface for RHEL9.

  1. 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
    +----------+--------+----+----+------------------------------------------------+
  2. Deactivate the virtual interface.

    # /opt/FJSVhanet/usr/sbin/stphanet -n sha0
  3. 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
    +----------+--------+----+----+------------------------------------------------+
  4. Change SHAMACADDR of the virtual interface with “hanetconfig modify” command.

    # /opt/FJSVhanet/usr/sbin/hanetconfig modify -n sha0 -s auto
  5. Confirm that the change is applied.

    # /opt/FJSVhanet/usr/sbin/hanetconfig print -s
    [IPv4,Patrol / Virtual NIC]
     Name        Hostname        Mode Physical ipaddr   SHAMACADDR          Interface List
    +-----------+---------------+----+-----------------+-------------------+---------------------------
     sha0                         v                     auto                eth1,eth2
  6. Activate the virtual interface.

    # /opt/FJSVhanet/usr/sbin/strhanet -n sha0