Top
PRIMECLUSTER Global Link Services Configuration and AdministrationGuide 4.6Redundant Line Control Function
FUJITSU Software

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

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.

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.

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. Edit the network setting file of the virtual interface to change the IP address.

    • For RHEL7

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

      DEVICE=sha0
      IPADDR=192.168.80.1
      NETMASK=255.255.255.0 BOOTPROTO=static ONBOOT=yes DEVICETYPE=sha HOTPLUG=no
    • For RHEL8 or later

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

      DEVICE=sha0
      IPADDR=192.168.80.1
      PREFIX=24
      BOOTPROTO=none
      ONBOOT=yes
      TYPE=Ethernet
  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 RHEL7

      # /usr/sbin/brctl show
      bridge name     bridge id               STP enabled     interfaces
      br0             8000.************       no              sha0
    • For RHEL8 or later

      # 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
  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 RHEL7

      # /usr/sbin/brctl delif br0 sha0
    • For RHEL8 or later

      # ip link set dev sha0 nomaster
  4. Check the status of the virtual bridge.

    • For RHEL7

      # /usr/sbin/brctl show
      bridge name     bridge id               STP enabled     interfaces
      br0             8000.000000000000       no
    • For RHEL8 or later

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

      # ip link show master br0
  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 file of the virtual interface.

    • For RHEL7

      • 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
        NETMASK=
        255.255.255.0
        BOOTPROTO=static ONBOOT=yes DEVICETYPE=sha HOTPLUG=no
      • 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
        NETMASK=
        255.255.255.0 BOOTPROTO=static ONBOOT=yes DEVICETYPE=sha HOTPLUG=no

        [After modification]

        DEVICE=sha1
        BOOTPROTO=static
        ONBOOT=yes
        DEVICETYPE=sha
        HOTPLUG=no
        BRIDGE=br0
    • For RHEL8 or later

      • 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
  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 RHEL7

      # /usr/sbin/brctl show
      bridge name     bridge id               STP enabled     interfaces
      br0             8000.************       no              sha1
    • For RHEL8 or later

      # 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

[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. Edit the network setting file of the virtual interface to change the IP address.

    • For RHEL7

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

      DEVICE=sha0
      IPADDR=192.168.20.10
      NETMASK=255.255.255.0 BOOTPROTO=static ONBOOT=yes DEVICETYPE=sha HOTPLUG=no
    • For RHEL8 or later

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

      DEVICE=sha0
      IPADDR=192.168.20.10
      PREFIX=24
      BOOTPROTO=none
      ONBOOT=yes
      TYPE=Ethernet
  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.