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

3.3.3 Virtual NIC mode

The following shows the procedure to add the configuration information.

  1. Set up a virtual interface using the "hanetconfig create" command. For information, see "7.1 hanetconfig Command".

  2. Edit the interface setting file of the virtual interface to set the IP address or netmask.

    The interface setting file of the virtual interface is created when the virtual interface is set by the "hanetconfig create" command.

  3. Set up the monitoring destination information by using the "hanetpathmon target" command. For details, see "7.12 hanetpathmon Command".

  4. When setting the tagged VLAN interface on the virtual interface in RHEL8 or later, describe the tagged VLAN interface name in /etc/NetworkManager/NetworkManager.conf.

    Then, execute systemctl reload NetworkManager.service.

Configuration of virtual interface

Edit the setting (/etc/sysconfig/network-scripts/ifcfg-shaX file) for a virtual interface as follows:

The descriptions vary depending the OS. See "Table 3.12 Configuration of virtual interface (RHEL7)" ,"Table 3.13 Configuration of virtual interface (RHEL8 or later)", and "Table 3.14 Configuration of tagged VLAN interface set on virtual interface (RHEL8 or later)" for the differences in descriptions.

For RHEL7
Table 3.12 Configuration of virtual interface (RHEL7)

Item

Value (Example)

Description

DEVICE

shaX

Specify the device name. Set "shaX".

IPADDR

192.168.1.1

Specify the IPv4 address.

IPADDR1

192.168.1.2

Specify this item when using multiple IPv4 addresses.
IPADDR1 is the second IP address. When setting more addresses, specify this item as IPADDR2, IPADDR3.

NETMASK

255.255.255.0

Specify the subnet mask for an IPv4 address.

Set either NETMASK or PREFIX.

PREFIX

24

NETMASK1

255.255.255.0

Specify these items when using subnet masks for multiple IPv4 addresses.
NETMASK1 or PREFIX1 is a subnet mask for IPADDR1. When setting more subnet masks, specify these items as NETMASK2, NETMASK3.

PREFIX1

24

NETWORK

192.168.1.0

Specify the network address.

Omit this item if PREFIX is specified.

BROADCAST

192.168.1.255

Specify the broadcast address.

Omit this item if PREFIX is specified.

BOOTPROTO

static

Specify the protocol when getting the IP address. Set "static" or "none".

ONBOOT

yes

Select whether to start the virtual interface on startup of the OS. Set "yes".
When the virtual interface is registered as a cluster resource, it is started regardless of this setting.

DEVICETYPE

sha

Specify the type of the device. Set "sha".

HOTPLUG

no

Specify the use of hotplug. Set "no".

GATEWAY

192.168.1.254

Specify the IPv4 address when setting the default gateway of IPv4.

IPV6INIT

yes

Specify "yes" when assigning the IPv6 address.

IPV6ADDR

fec0:1::1/64

Specify the IPv6 address.

IPV6_DEFAULTGW

fec0:1::2

Specify the IPv6 address when setting the default gateway of IPv6.

BRIDGE

br0

Specify the name of the virtual bridge which is to be connected to the virtual interface.

MTU

9000

Specify the length of MTU.
When specifying the length of MTU, set the same value for the configuration file (ifcfg-ethX) of the primary interface and the secondary interface, and for the virtual interface configuration file (ifcfg-shaX).

SHAMACADDR

XX:XX:XX:XX:XX:XX

Specify the MAC address.

  • If specifying the MAC address
    The specified address is set.

  • If specifying "auto"
    A local address is automatically created.

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

[For IPv4]

DEVICE=sha0
IPADDR=192.168.1.1
NETMASK=255.255.255.0
BOOTPROTO=static
ONBOOT=yes
DEVICETYPE=sha
HOTPLUG=no

[For IPv6]

DEVICE=sha0
IPV6INIT=yes
IPV6ADDR=fec0:1::1/64
BOOTPROTO=static
ONBOOT=yes
DEVICETYPE=sha
HOTPLUG=no

[For DualStack]

DEVICE=sha0
IPADDR=192.168.1.1
NETMASK=255.255.255.0
IPV6INIT=yes
IPV6ADDR=fec0:1::1/64
BOOTPROTO=static
ONBOOT=yes
DEVICETYPE=sha
HOTPLUG=no

[When using a local address created automatically and IPv4 for the MAC address]

DEVICE=sha0
IPADDR=192.168.1.1
NETMASK=255.255.255.0
BOOTPROTO=static
ONBOOT=yes
DEVICETYPE=sha
HOTPLUG=no
SHAMACADDR=auto

When creating a tagged VLAN interface (shaX.Y) of which VLAN-ID is Y on a virtual interface (shaX), edit the setting file (/etc/sysconfig/network-scripts/ifcfg-shaX.Y) for a tagged VLAN interface as follows. The effective range of VLAN-ID which can be specified is from 1 to 4094.

/etc/sysconfig/network-scripts/ifcfg-eth0.2

[For IPv4]

DEVICE=sha0.2
IPADDR=192.168.100.1
NETMASK=255.255.255.0
BOOTPROTO=static
ONBOOT=yes
DEVICETYPE=sha

[For IPv6]

DEVICE=sha0.2
IPV6INIT=yes
IPV6ADDR=fec0:100::1/64
BOOTPROTO=static
ONBOOT=yes
DEVICETYPE=sha

[For DualStack]

DEVICE=sha0.2
IPADDR=192.168.100.1
NETMASK=255.255.255.0
IPV6INIT=yes
IPV6ADDR=fec0:100::1/64
BOOTPROTO=static
ONBOOT=yes
DEVICETYPE=sha
For RHEL8 or later
Table 3.13 Configuration of virtual interface (RHEL8 or later)

Item

Value (Example)

Description

DEVICE

ethX

Specify the device name. Set "ethX".

IPADDR

192.168.1.1

Specify the IPv4 address.

IPADDR1

192.168.1.2

Specify this item when using multiple IPv4 addresses.
IPADDR1 is the second IP address. When setting more addresses, specify this item as IPADDR2, IPADDR3.

PREFIX

24

Specify the prefix for the IPv4 address.

PREFIX1

24

Specify this item when using prefixes for multiple IPv4 addresses.
PREFIX1 is the prefix for IPADDR1. When setting more prefixes, specify this item as PREFIX2, PREFIX3.

BOOTPROTO

none

Specify the protocol when getting the IP address. Set "none" or "static".

ONBOOT

yes

Select whether to start the virtual interface on startup of the OS. Set "yes".
When the virtual interface is registered as a cluster resource, it is started regardless of this setting.

TYPE

Ethernet

Specify the device type. Set "Ethernet".

GATEWAY

192.168.1.254

Specify the IP address when setting the default gateway.

IPV6INIT

yes

Specify "yes" when assigning the IPv6 address.

IPV6_AUTOCONF

yes or no

Specify "yes" when the IPv6 address is automatically configured.
Specify "no" when the IPv6 address is not automatically configured.

IPV6ADDR

fec0:1::1/64

Specify the IPv6 address.

IPV6ADDR_SECONDARIES

fec0:1::2/64

Specify this item when using multiple IPv6 addresses.
When using two or more IPv6 addresses, specify this item as follows.
IPV6ADDR_SECONDARIES="fec0:1::2/64 fec0:1::3/64"

IPV6_DEFAULTGW

fec0:1::3

Specify the IPv6 address when setting the default gateway of IPv6.

BRIDGE

br0

Specify the name of the virtual bridge which is to be connected to the virtual interface.

MTU

9000

Specify the length of MTU.
When specifying the length of MTU, set the same value for the configuration file (ifcfg-ethX) of the primary interface and the secondary interface, and for the virtual interface configuration file (ifcfg-shaX).

SHAMACADDR

XX:XX:XX:XX:XX:XX

Specify the MAC address.

  • If specifying the MAC address
    The specified address is set.

  • If specifying "auto"
    A local address is automatically created.

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

[For IPv4]

DEVICE=sha0
IPADDR=192.168.1.1
PREFIX=24
BOOTPROTO=none
ONBOOT=yes
TYPE=Ethernet

[For IPv6]

DEVICE=sha0
IPV6INIT=yes
IPV6ADDR=fec0:1::1/64
BOOTPROTO=none
ONBOOT=yes
TYPE=Ethernet

[For DualStack]

DEVICE=sha0
IPADDR=192.168.1.1
PREFIX=24
IPV6INIT=yes
IPV6ADDR=fec0:1::1/64
BOOTPROTO=none
ONBOOT=yes
TYPE=Ethernet

[When using a local address created automatically and IPv4 for the MAC address]

DEVICE=sha0
IPADDR=192.168.1.1
PREFIX=24
BOOTPROTO=none
ONBOOT=yes
TYPE=Ethernet
SHAMACADDR=auto

When creating a tagged VLAN interface (shaX.Y) of which VLAN-ID is Y on a virtual interface (shaX), edit the setting file (/etc/sysconfig/network-scripts/ifcfg-shaX.Y) for a tagged VLAN interface as follows. The effective range of VLAN-ID which can be specified is from 1 to 4094.

Table 3.14 Configuration of tagged VLAN interface set on virtual interface (RHEL8 or later)

Item

Value (Example)

Description

VLAN

yes

Specify this item when using VLAN. Set "yes".

TYPE

Vlan

Specify the device name. Set "Vlan".

PHYSDEV

sha0

Specify the interface to which VLAN is assigned.
Specify the virtual interface of GLS.

VLAN_ID

2

Specify VLAN_ID.

IPADDR

192.168.1.1

Specify the IPv4 address.

IPADDR1

192.168.1.2

Specify this item when using multiple IPv4 addresses.
IPADDR1 is the second IP address. When setting more addresses, specify this item as IPADDR2, IPADDR3.

PREFIX

24

Specify the prefix.

PREFIX1

24

Specify this item when using prefixes for multiple IPv4 addresses.
PREFIX1 is the prefix for IPADDR1. When setting more prefixes, specify this item as PREFIX2, PREFIX3.

BOOTPROTO

none

Specify the protocol when getting the IP address. Set "none" or "static".

IPV6INIT

yes

Specify "yes" when assigning the IPv6 address.

IPV6_AUTOCONF

yes or no

Specify "yes" when the IPv6 address is automatically configured.
Specify "no" when the IPv6 address is not automatically configured.

IPV6ADDR

fec0:1::1/64

Specify the IPv6 address.

IPV6ADDR_SECONDARIES

fec0:1::2/64

Specify this item when using multiple IPv6 addresses.
When using two or more IPv6 addresses, specify this item as follows.
IPV6ADDR_SECONDARIES="fec0:1::2/64 fec0:1::3/64"

/etc/sysconfig/network-scripts/ifcfg-eth0.2

[For IPv4]

VLAN=yes
TYPE=Vlan
PHYSDEV=sha0
VLAN_ID=2
IPADDR=192.168.100.1
PREFIX=24
BOOTPROTO=none

[For IPv6]

VLAN=yes
TYPE=Vlan
PHYSDEV=sha0
VLAN_ID=2
IPV6INIT=yes
IPV6ADDR=fec0:100::1/64
BOOTPROTO=none

[For DualStack]

VLAN=yes
TYPE=Vlan
PHYSDEV=sha0
VLAN_ID=2
IPADDR=192.168.100.1
PREFIX=24
IPV6INIT=yes
IPV6ADDR=fec0:100::1/64
BOOTPROTO=none

Describe the tagged VLAN interface name in /etc/NetworkManager/NetworkManager.conf.

Example of /etc/NetworkManager/NetworkManager.conf

[main]
...
ignore-carrier=sha0.1, sha0.2, sha0.3

Note

  • In the Virtual NIC mode, you cannot share physical interfaces with other virtual interfaces.

  • Just as for the standard interface of the operating system, define the settings of the IP address and the netmask in the interface setting file (/etc/sysconfig/network-scripts/ifcfg-shaX) in the Virtual NIC mode. Subnet mask settings by the hanetmask command are only necessary when the cluster takeover IP address is set by the hanethvrsc command.

  • For implementing tagged VLAN communication in the Virtual NIC mode, generate a tagged VLAN interface on the virtual interface. The procedure for generation is the same as for the standard tagged VLAN interface of the operating system.

  • Do not delete a file or change a file name for the interface setting file of the virtual interface (/etc/sysconfig/network-scripts/ifcfg-shaX). If you change or delete a file name, the interface setting file is omitted from the backup target when you back up configuration files by the "hanetbackup" command.

  • Directly edit the interface setting file (/etc/sysconfig/network-scripts/ifcfg-shaX) for a virtual interface and the setting file (/etc/sysconfig/network-scripts/ifcfg-shaX.Y) for a tagged VLAN interface by using an editor such as vi. You cannot make any settings by using the network configuration function provided by GUI or other interfaces of the operating system.

  • When using the Virtual NIC mode on a guest OS in VMware or Hyper-V, specify the MAC address or "auto" to SHAMACADDR.

  • Set [Accept] for [Promiscuous Mode] under [Security] for each virtual switch in VMware.

  • When using the Virtual NIC mode on a VMware guest OS, a tagged VLAN interface is not usable. For a tagged VLAN connection, set the VLAN ID for a port group of VMware.

  • When using the Virtual NIC mode on the guest OS of Hyper-V, check [Enable MAC address spoofing] when creating network adapters bundled by GLS on the Hyper-V Manager.

  • When using the Virtual NIC mode on the guest OS of Hyper-V, a tagged VLAN interface cannot be used. For a tagged VLAN connection, specify the VLAN ID when setting the network adapter of a guest OS.

  • Specifying with SHAMACADDR is applied only to the virtual interface. Not applied to the physical interface.

  • Do not use MACADDR that is a standard configuration item of the operating system.

  • SHAMACADDR cannot be used for the configuration file for a tagged VLAN interface (ifcfg-shaX.Y).

  • When using SHAMACADDR to set the MAC address in RHEL7, the virtual bridge cannot be connected to a tagged VLAN interface created on the virtual interface.

  • In the Virtual NIC mode in RHEL7, the bonding interface (bondX) can be bundled. To do so, pay attention to the following points:
    In the Virtual NIC mode in RHEL8 or later, the bonding interface (bondX) cannot be bundled.

    • Specify the MAC address or "auto" to SHAMACADDR.

    • A link down may not be detected depending on the bonding specification. Make sure to set the monitoring target IP.

    • When using mode=4(802.3ad), set its switch so that untagged LACPDU can be transmitted.

    • A tagged VLAN interface is not available.

    • ARP monitoring for bonding is not available.

  • The setting of /etc/NetworkManager/NetworkManager.conf is required to control the processing of NetworkManager for tagged VLAN interfaces and manage the processing in GLS. Make sure to set /etc/NetworkManager/NetworkManager.conf, which is not required in RHEL7.

  • When modifying MTU, make sure to set 1280 or more.

  • When setting a takeover IP address by using the hanethvrsc command, the name format "shaX-NN" cannot be used for the host name. (Example: sha0-65)