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

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, describe the tagged VLAN interface name in /etc/NetworkManager/NetworkManager.conf.

    Then, execute systemctl reload NetworkManager.service.

Configuration of virtual interface
For RHEL8

Edit the setting (/etc/sysconfig/network-scripts/ifcfg-shaX file) for a virtual interface. See "Table 3.11 Configuration of virtual interface (RHEL8)", and "Table 3.12 Configuration of tagged VLAN interface set on virtual interface (RHEL8)."

Table 3.11 Configuration of virtual interface (RHEL8)

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.12 Configuration of tagged VLAN interface set on virtual interface (RHEL8)

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
For RHEL9

Edit the setting for a virtual interface (shaX) with the nmcli command. See "Table 3.13 Configuration of virtual interface (RHEL9)", and "Table 3.14 Configuration of tagged VLAN interface on virtual interface (RHEL9)."

Table 3.13 Configuration of virtual interface (RHEL9)

Item

Value (Example)

Description

connection.id
connection.interface-name

shaX

Specify the device name. Set “shaX”.

connection.autoconnect

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.

connection.type

802-3-ethernet

Specify the device type. Set ”802-3-ethernet”.

connection.master

br0

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

connection.slave-type

bridge

Set “bridge” if the virtual bridge is to be connected to the virtual interface, otherwise, empty.

802-3-ethernet.mtu

9000

Specify the length of MTU.
When specifying the length of MTU, set the same value for the configuration of primary, secondary, and virtual interface.

ipv4.method

manual

Specify the protocol when getting the IP address. Set ”manual” or ”disabled”.

ipv4.addresses

192.168.1.1/24, 192.168.1.2/24

Specify the pairs of IPv4 address and prefix.

ipv4.gateway

192.168.1.254

Specify the IP address when setting the default gateway.

ipv6.method

manual

Specify the protocol when getting the IPv6 address. Set ”manual” or ”disabled”.

ipv6.addresses

fec0:1::1/64, fec0:1::2/64

Specify the pairs of IPv6 address and prefix.

ipv6.gateway

fec0:1::3

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

When creating a tagged VLAN interface (shaX.Y) of which VLAN-ID is Y on a virtual interface (shaX), edit the setting for a tagged VLAN interface (shaX.Y) with the nmcli command. The effective range of VLAN-ID which can be specified is from 1 to 4094.

Table 3.14 Configuration of tagged VLAN interface on virtual interface (RHEL9)

Item

Value (Example)

Description

connection.interface-name

sha0.2

Specify the device name. Set “shaX.Y”.

connection.autoconnect

yes

Select whether to start the tagged VLAN interface on startup of the OS. Set "yes".

connection.type

vlan

Specify the device type. Set ”vlan”.

vlan.parent

sha0

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

vlan.id

2

Specify VLAN ID. Set “Y”.

ipv4.method

manual

Specify the protocol when getting the IP address. Set ”manual” or ”disabled”.

ipv4.addresses

192.168.1.1/24, 192.168.1.2/24

Specify the pairs of IPv4 address and prefix.

ipv6.method

manual

Specify the protocol when getting the IPv6 address. Set ”manual” or ”disabled”.

ipv6.addresses

fec0:1::1/64, fec0:1::2/64

Specify the pairs of IPv6 address and prefix.

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

  • For RHEL9, use the "hanetconfig" command to specify SHAMACADDR. See "7.1 hanetconfig Command” for more information.

  • For RHEL9, do not directly edit the virtual interface configuration file (/etc/NetworkManager/system-connections/shaX.nmconnection). Use the nmcli command to edit the settings.

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

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