(1) Physical interface settings
Set up physical interfaces to be used for the Redundant Line Control Function.
The physical interface settings vary depending on redundant network methods and configurations. For details on the differences of each setting, see the following Table 3.8 Physical interface settings (RHEL7) and Table 3.9 Physical interface settings (RHEL8 or later).
Point
For RHEL 7 or later, the naming conventions for NIC names are changed to generate device names based on the hardware locations of NICs (Predictable Network Interface Names).
In an environment where Predictable Network Interface Names are enabled, interface names are displayed as enXXXXX. In an environment where Predictable Network Interface Names are disabled, interface names are displayed as ethX.
Replace the interface name (ethX) described in this manual with the interface name suitable for your environment. Replace the ifcfg-ethX file name with the file name suitable for your environment as well.
Only the required parameters in the Redundant Line Control Function are described for the configuration file (ifcfg-ethX) of the network interface in this manual. Set other parameters according to your environment.
For RHEL7
Redundant network methods | Tagged VLAN disabled | Tagged VLAN enabled | |
---|---|---|---|
Fast switching mode (IPv4) | |||
Fast switching mode (IPv6) | |||
Fast switching mode (Dual) | |||
NIC switching mode (IPv4) | Primary interface | ||
Secondary interface | |||
NIC switching mode (IPv6) | Primary interface | ||
Secondary interface | |||
NIC switching mode (Dual) | Primary interface | ||
Secondary interface | |||
Virtual NIC mode | |||
GS linkage mode | Not supported |
Note
For RHEL 7 or later, the naming conventions for NIC names are changed to generate device names based on the hardware locations of NICs (Predictable Network Interface Names).
If you need to prevent device names of physical NICs from changing to unexpected names in an environment where traditional interface names (ethX) for RHEL6 or earlier are used, describe the definition of "HWADDR=<MAC address>" in the settings for the physical interfaces (the /etc/sysconfig/network-scripts/ifcfg-ethX file). For details, see "Linux documentation."
Add "HOTPLUG=no" to the settings for the physical interfaces bundled by GLS (the /etc/sysconfig/network-scripts/ifcfg-ethX file). This setting is not required for RHEL8 or later or when bundling the tagged VLAN interfaces.
The tagged VLAN interface name is available only by "interface name.VLAN-ID" format, such as eth0.1.
In the cluster environment of physical IP takeover II, do not set the IPADDR (IP address) to ifcfg-ethX.
Information
Setting "HOTPLUG=no" will not disable the PCI Hot Plug. The hot maintenance of NIC (PCI cards) can be performed for the physical interface where "HOTPLUG=no" is set.
/etc/sysconfig/network-scripts/ifcfg-ethX
DEVICE=ethX BOOTPROTO=static HOTPLUG=no IPADDR=XXX.XXX.XXX.XXX NETMASK=XXX.XXX.XXX.XXX ONBOOT=yes TYPE=Ethernet |
/etc/sysconfig/network-scripts/ifcfg-ethX
DEVICE=ethX BOOTPROTO=static HOTPLUG=no ONBOOT=yes TYPE=Ethernet |
/etc/sysconfig/network-scripts/ifcfg-ethX
DEVICE=ethX BOOTPROTO=static HOTPLUG=no ONBOOT=yes TYPE=Ethernet |
/etc/sysconfig/network-scripts/ifcfg-ethX.Y
DEVICE=ethX.Y BOOTPROTO=static IPADDR=XXX.XXX.XXX.XXX NETMASK=XXX.XXX.XXX.XXX ONBOOT=yes VLAN=yes |
Information
If you want to use the NIC switching mode to share the same physical connection between two virtual interfaces (one that bundles physical interfaces and the other that bundles tagged VLAN interfaces), you need to set up ifcfg-ethX the same as Setup 1 using the same IP address (IPADDR=) and other values. For example, if sha0 bundles eth0 and eth1, and sha1 bundles eth0.2 and eth1.2, configure ifcfg-eth0 according to ifcfg-ethX in Setup 1, not according to that shown in Setup 3.
/etc/sysconfig/network-scripts/ifcfg-ethX
DEVICE=ethX BOOTPROTO=static HOTPLUG=no ONBOOT=yes TYPE=Ethernet |
/etc/sysconfig/network-scripts/ifcfg-ethX.Y
DEVICE=ethX.Y BOOTPROTO=static ONBOOT=yes VLAN=yes |
/etc/sysconfig/network-scripts/ifcfg-ethX
DEVICE=ethX BOOTPROTO=static HOTPLUG=no ONBOOT=yes DEVICETYPE=hanet |
For RHEL8 or later
Redundant network methods | Tagged VLAN disabled | Tagged VLAN enabled | |
---|---|---|---|
Fast switching mode (IPv4) | |||
NIC switching mode (IPv4) | Primary interface | ||
Secondary interface | |||
Virtual NIC mode | |||
GS linkage mode | Not supported |
Note
For RHEL 7 or later, the naming conventions for NIC names are changed to generate device names based on the hardware locations of NICs (Predictable Network Interface Names).
If you need to prevent device names of physical NICs from changing to unexpected names in an environment where traditional interface names (ethX) for RHEL6 or earlier are used, describe the definition of "HWADDR=<MAC address>" in the settings for the physical interfaces (the /etc/sysconfig/network-scripts/ifcfg-ethX file). For details, see "Linux documentation."
The setting "HOTPLUG=no" is not required.
The tagged VLAN interface name is available only by "interface name.VLAN-ID" format, such as eth0.1.
In the cluster environment of physical IP takeover II, set ONBOOT=no to ifcfg-ethX.
/etc/sysconfig/network-scripts/ifcfg-ethX
TYPE=Ethernet BOOTPROTO=none IPADDR=XXX.XXX.XXX.XXX PREFIX=XX DEVICE=ethX ONBOOT=yes |
/etc/sysconfig/network-scripts/ifcfg-ethX
TYPE=Ethernet BOOTPROTO=none IPADDR=XXX.XXX.XXX.XXX PREFIX=XX DEVICE=ethX ONBOOT=no |
/etc/sysconfig/network-scripts/ifcfg-ethX
TYPE=Ethernet DEVICE=ethX ONBOOT=yes |
/etc/sysconfig/network-scripts/ifcfg-ethX.Y
VLAN=yes TYPE=Vlan PHYSDEV=ethX VLAN_ID=Y BOOTPROTO=none IPADDR=XXX.XXX.XXX.XXX PREFIX=XX ONBOOT=yes |
/etc/sysconfig/network-scripts/ifcfg-ethX
TYPE=Ethernet DEVICE=ethX ONBOOT=yes |
/etc/sysconfig/network-scripts/ifcfg-ethX.Y
VLAN=yes TYPE=Vlan PHYSDEV=ethX VLAN_ID=Y BOOTPROTO=none IPADDR=XXX.XXX.XXX.XXX PREFIX=XX ONBOOT=no |
/etc/sysconfig/network-scripts/ifcfg-ethX
TYPE=Ethernet BOOTPROTO=none DEVICE=ethX ONBOOT=yes |
Information
If you want to use the NIC switching mode to share the same physical connection between two virtual interfaces (one that bundles physical interfaces and the other that bundles tagged VLAN interfaces), you need to set up ifcfg-ethX the same as Setup 1 using the same IP address (IPADDR=) and other values. For example, if sha0 bundles eth0 and eth1, and sha1 bundles eth0.2 and eth1.2, configure ifcfg-eth0 according to ifcfg-ethX in Setup 1, not according to that shown in Setup 3.
(2) Verification of the physical interface
Verify if the physical interface is inserted into the system using the ip command.
Also, if the physical interface is UP, check whether "LOWER_UP" is displayed. If "LOWER_UP" is not displayed, the links might be down on the interface. Check the cable switch and HUB speed settings. Use the ethtool command to check the link state.
# ip addr show eth0 <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether XX:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff inet 192.168.70.2/24 brd 192.168.70.255 scope global eth0 valid_lft forever preferred_lft forever inet6 fe80::xxx:xxxx:xxxx:xxxx/64 scope link valid_lft forever preferred_lft forever eth1 <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether XX:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff inet 192.168.71.2/24 brd 192.168.71.255 scope global eth1 valid_lft forever preferred_lft forever inet6 fe80::xxx:xxxx:xxxx:xxxx/64 scope link valid_lft forever preferred_lft forever |
In the above example, it is possible to use eth0 and eth1. For details on the ip command, refer to the Linux manual.
Information
When using Tagged VLAN, ensure that the NIC supports tagged VLAN functionality (IEEE 802.1Q). In addition, in a Redundant Line Control function, the effective range of VLAN-ID which can be specified is from 1 to 4094.
(3) Checking the name service
When using name services such as DNS or NIS, define keywords such as hosts in /etc/nsswitch.conf file to first refer to the local file. This allows to solve the address even if the DNS, NIS or LDAP sever is unreachable. The following is an example of /etc/nsswitch.conf.
# # /etc/nsswitch.conf # # An example Name Service Switch config file. This file should be # sorted with the most-used services at the beginning. # # The entry '[NOTFOUND=return]' means that the search for an # entry should stop if the search in the previous entry turned # up nothing. Note that if the search failed due to some other reason # (like no NIS server responding) then the search continues with the # next entry. # # Legal entries are: # # nisplus or nis+ Use NIS+ (NIS version 3) # nis or yp Use NIS (NIS version 2), also called YP # dns Use DNS (Domain Name Service) # files Use the local files # db Use the local database (.db) files # compat Use NIS on compat mode # hesiod Use Hesiod for user lookups # [NOTFOUND=return] Stop searching if not found so far # # To use db, put the "db" in front of "files" for entries you want to be # looked up first in the databases # # Example: #passwd: db files nisplus nis #shadow: db files nisplus nis #group: db files nisplus nis passwd: files shadow: files group: files #hosts: db files nisplus nis dns hosts: files dns ..... |
Information
If the host name rather than the IP address is used in setting GLS, enable the hostname resolution function (set by hanetparam -h), which allows you to change the host name to the IP address using only the /etc/hosts file without depending on the /etc/nsswitch.conf file setting.
(4) IPv6 RA daemon configuration
GLS supports radvd(router advertisement daemon for IPv6) for RA (router advertisement) daemon. To use IPv6(dual) on Fast switching mode, you must start RA daemon on the host running GLS in order to transmit RA from virtual interfaces. Other than this purpose, RA daemon is not necessary. The following describes configuration procedure.
radvd configuration
Define the configuration in /etc/radvd.conf.
When transmitting network information (network fec0:1::, prefix length 64) from sha0 with RA(router advertisement), define the configuration description as shown below.
In addition, the difference in the version of radvd needs to define the following kernel parameters (net.ipv6.conf.all.forwarding=1) in /etc/sysctl.conf.
For details on radvd configuration, refer to radvd manual.
interface sha0 { AdvSendAdvert on; # Sending router advertisements MinRtrAdvInterval 3; MaxRtrAdvInterval 10; prefix fec0:1::0/64 # Sending Prefix fec0:1::0/64 from sha0 { AdvOnLink on; AdvAutonomous on; AdvRouterAddr on; }; }; |
Configure radvd to startup during system startup.
Enable the radvd service.
# systemctl enable radvd.service |
Verify the radvd configuration.
Check whether the radvd service is enabled.
# systemctl is-enabled radvd.service enabled |
(5) Route configuration
Route configuration is described below.
Default gateway configuration
Define the default gateway address (GATEWAY) in the "/etc/sysconfig/network-scripts/ifcfg-ethX" file.
/etc/sysconfig/network-scripts/ifcfg-ethX
DEVICE=ethX (omitted) GATEWAY=192.168.1.254 |
For RHEL 7, the default gateway can be also configured in the following procedure.
Define the default gateway address (GATEWAY) in the "/etc/sysconfig/network" file.
/etc/sysconfig/network
GATEWAY=192.168.1.254 |
For IPv6 and NIC switching mode in the RHEL7 environment, configure the setting by using the user command execution function instead of the network configuration file for the operating system. In the configuration file of the user command execution function, define the operating system command assigning the route of IPv6 to be executed after activation of the IP address. For details, refer to the Linux manual (ip(8), route(8) and so on).
Information
The default gateway device (GATEWAYDEV) can not be configured for a physical interface bound with NIC switching mode.
When defining the default gateway (GATEWAY) in the "/etc/sysconfig/network-scripts/ifcfg-ethX" file in the NIC switching mode, add the same configuration of GATEWAY in the configuration files of all NICs bound by GLS. Note that if different configurations of GATEWAY are defined in the "/etc/sysconfig/network" file and the "/etc/sysconfig/network-scripts/ifcfg-ethX" file, the configuration in the "/etc/sysconfig/network-scripts/ifcfg-ethX" file has a priority.
# /opt/FJSVhanet/usr/sbin/hanetconfig print [IPv4,Patrol / Virtual NIC] Name Hostname Mode Physical ipaddr Interface List +-----------+---------------+----+-----------------+-------------- sha0 192.168.1.10 e eth1,eth2 # cat /etc/sysconfig/network-scripts/ifcfg-eth1 DEVICE=eth1 (omitted) GATEWAY=192.168.1.254 # cat /etc/sysconfig/network-scripts/ifcfg-eth2 DEVICE=eth2 (omitted) GATEWAY=192.168.1.254 |
If you do not use the "/etc/sysconfig/network" file in the environment where Virtual NIC mode is used, configure the route in the "/etc/sysconfig/network-scripts/ifcfg-shaX" file. You do not need to configure it in the "/etc/sysconfig/network-scripts/ifcfg-ethX" file in the same way as NIC switching mode. For details, see "3.3.3 Virtual NIC mode".
Static route configuration
For RHEL7
NIC switching mode
To configure a static route on a routing table, define the configuration on the /etc/sysconfig/network-scripts/route-Interface name files.
Apply the same setting for both physical interfaces (route-ethX, route-ethY) bundled by NIC switching mode.
Example: Setting BOOTPROTO=static to ifcfg-ethX and ifcfg-ethY
/etc/sysconfig/network-scripts/route-ethX
GATEWAY0=192.168.40.10 NETMASK0=255.255.255.0 ADDRESS0=192.168.100.0 |
/etc/sysconfig/network-scripts/route-ethY
GATEWAY0=192.168.40.10 NETMASK0=255.255.255.0 ADDRESS0=192.168.100.0 |
Information
When activating the interface on the standby side where the static route was set on startup of the operating system, the message of "RTNETLINK answers:" may be output. This is because the IP address is not set to the setting file (ifcfg-ethY) of the interface on the standby side. Ignore this message.
When using source routing, using the route files is not supported.
Make sure that use "2.8.2 User command execution function" and execute the ip command to add or delete the setting of source routing.
Example: /etc/opt/FJSVhanet/script/interface/shaX
#!/bin/sh # # All Rights Reserved, Copyright (c) FUJITSU LIMITED 2004 # #ident "%W% %G% %U% - FUJITSU" # (omitted) if [ $ADDRESS_FAMILY = "inet" ] then case "$1" in 'activate') # # Activate interface # case "$2" in 'before') # # script before activate interface # # echo "execute script before activate interface on" $INTERFACE > /dev/console #if [ ! $INTERFACE = "ethX" ] #then # ifconfig $INTERFACE #else # ifconfig $INTERFACE #fi ;; 'after') # # script after activate interface # IFNAME=`/usr/sbin/ip addr show | /usr/bin/grep " 192.168.40.1/" | \ /usr/bin/sed -e "s/.* //"` /usr/sbin/ip route add 192.168.100.0/24 via 192.168.40.10 src 192.168.40.1 dev $IFNAME (omitted) 'inactivate') # # inactivate interface # case "$2" in 'before') # # script before inactivate interface # IFNAME=`/usr/sbin/ip addr show | /usr/bin/grep " 192.168.40.1/" | \ /usr/bin/sed -e "s/.* //"` /usr/sbin/ip route del 192.168.100.0/24 via 192.168.40.10 src 192.168.40.1 dev $IFNAME (omitted) |
Virtual NIC mode and GS linkage mode
To configure a static route on a routing table, define the configuration on the /etc/sysconfig/network-scripts/route-Interface name file.
Make sure that configure it for the virtual interface (route-shaX).
Example: Setting BOOTPROTO=static to ifcfg-shaX
/etc/sysconfig/network-scripts/route-shaX
GATEWAY0=192.168.40.10 NETMASK0=255.255.255.0 ADDRESS0=192.168.100.0 |
When using source routing, only the virtual NIC mode supports source routing using the /etc/sysconfig/network-scripts/rule-shaX file.
For details, refer to "Linux documentation".
For RHEL8
NIC switching mode
To configure a static route on a routing table, use the nmcli command.
Apply the same setting for both physical interfaces (ethX, ethY) bundled by NIC switching mode.
Example: Setting static route to ethX and ethY
#/usr/bin/nmcli connection modify filename /etc/sysconfig/network-scripts/ifcfg-ethX +ipv4.routes "192.168.100.0/24 192.168.40.10" #/usr/bin/nmcli connection modify filename /etc/sysconfig/network-scripts/ifcfg-ethY +ipv4.routes "192.168.100.0/24 192.168.40.10" |
For information about configure static routes, refer to "Linux documentation".
When using source routing, the above configuration is not required.
Make sure that use "2.8.2 User command execution function" and execute the nmcli command to add or delete the setting of source routing.
Example: /etc/opt/FJSVhanet/script/interface/shaX
#!/bin/sh # # All Rights Reserved, Copyright (c) FUJITSU LIMITED 2004 # #ident "%W% %G% %U% - FUJITSU" # (omitted) if [ $ADDRESS_FAMILY = "inet" ] then case "$1" in 'activate') # # Activate interface # case "$2" in 'before') # # script before activate interface # # echo "execute script before activate interface on" $INTERFACE > /dev/console #if [ ! $INTERFACE = "ethX" ] #then # ifconfig $INTERFACE #else # ifconfig $INTERFACE #fi ;; 'after') # # script after activate interface # IFNAME=`/usr/sbin/ip addr show | /usr/bin/grep " 192.168.40.1/" | \ /usr/bin/sed -e "s/.* //"` /usr/bin/nmcli connection modify \ filename /etc/sysconfig/network-scripts/ifcfg-$IFNAME \ +ipv4.routes "192.168.100.0/24 192.168.40.10 src=192.168.40.1" /usr/bin/nmcli device modify $IFNAME \ +ipv4.routes "192.168.100.0/24 192.168.40.10 src=192.168.40.1" (omitted) 'inactivate') # # inactivate interface # case "$2" in 'before') # # script before inactivate interface # IFNAME=`/usr/sbin/ip addr show | /usr/bin/grep " 192.168.40.1/" | \ /usr/bin/sed -e "s/.* //"` /usr/bin/nmcli connection modify \ filename /etc/sysconfig/network-scripts/ifcfg-$IFNAME \ -ipv4.routes "192.168.100.0/24 192.168.40.10 src=192.168.40.1" /usr/bin/nmcli device modify $IFNAME \ -ipv4.routes "192.168.100.0/24 192.168.40.10 src=192.168.40.1" (omitted) |
Virtual NIC mode and GS linkage mode
To configure a static route on a routing table, define the configuration on the /etc/sysconfig/network-scripts/route-Interface name file.
Make sure that configure it for the virtual interface (route-shaX).
Example: Setting BOOTPROTO=none to ifcfg-shaX
/etc/sysconfig/network-scripts/route-shaX
GATEWAY0=192.168.40.10 NETMASK0=255.255.255.0 ADDRESS0=192.168.100.0 |
When using source routing, only the virtual NIC mode supports source routing using the /etc/sysconfig/network-scripts/rule-shaX file.
For details, refer to "Linux documentation".
Common settings between IPv4 and IPv6
To create backup of the physical interface settings (the "/etc/sysconfig/network-scripts/ifcfg-ethX" or "/etc/sysconfig/network/ifcfg-ethX" file), the file name must begin with names other than "ifcfg-".
(e.g. bak_ifcfg-ethX)
If the file name begins with "ifcfg-", OS might recognize the interface as an interface to be activated during system startup.
When using an IPv4 address
Define the IPv4 address (virtual IP address, physical IP address, logical virtual interface, takeover virtual IP address) and a host name configured in the redundant line control function in the /etc/hosts file. These host names must be specified in the /etc/hosts file even if no host names but IP addresses are directly specified in environment definitions.
When using an IPv6 address
Define the IPv6 address (logical virtual interface, takeover virtual IP address) and a host name configured in the redundant line control function in the /etc/hosts file. It is not necessary to define the IPv6 address to be automatically assigned by automatic address configuration.
You must start the radvd daemon on 2 or more servers running as Fast switching mode in order to set the stateless address auto-configuration. Note that when starting up radvd on multiple servers, synchronize the prefix data of the virtual interfaces defined in /etc/radvd.conf between the servers. An example of setting a /etc/radvd.conf file when using a Linux server as an IPv6 router is shown below. In addition, depending on the version of radvd, kernel parameter(net.ipv6.conf.all.forwarding=1) must be defined in /etc/sysctl.conf file. For details on this topic, see the manual of radvd.conf(5) and radvd(8).
/etc/radvd.conf
interface sha0 { AdvSendAdvert on; # Sending router advertisements MinRtrAdvInterval 3; MaxRtrAdvInterval 10; prefix fec0:1::0/64 # Sending Prefix fec0:1::0/64 from sha0 { AdvOnLink on; AdvAutonomous on; AdvRouterAddr on; }; }; |
When setting stateless address auto-configuration against the physical interface (ethX) using Fast switching mode, start up radvd on either of the servers or provide IPv6 router on the same network. Additionally, stateless address auto-configuration on the physical interface (ethX) does not apply on the server that has kernel configuration (net.ipv6.conf.all.forwarding=1) for starting up radvd. In such case, after starting radvd, use sysctl command to reconfigure the kernel parameter. For details, refer to sysctl(8) manual.
# sysctl -w net.ipv6.conf.all.forwarding=0 |
Common settings between IPv4 and IPv6
To create backup of the physical interface settings (the "/etc/sysconfig/network-scripts/ifcfg-ethX" or "/etc/sysconfig/network/ifcfg-ethX" file), the file name must begin with names other than "ifcfg-".
(e.g. bak_ifcfg-ethX)
If the file name begins with "ifcfg-", OS might recognize the interface as an interface to be activated during system startup.
When using an IPv4 address
Define the IPv4 address (virtual IP address, physical IP address, monitored IP addresses to be specified in monitoring destination information) and a host name configured in the redundant line control function in the /etc/hosts file.These host names must be specified in the /etc/hosts file even if no host names but IP addresses are directly specified in environment definitions.
When using an IPv6 address
Define the IPv6 address (takeover virtual IP address, monitored IP addresses to be specified in monitoring destination information) and a host name configured in the redundant line control function in the /etc/hosts file.
For communication using IPv6, use the virtual IP address defined for GLS. When using the IPv6 address assigned by stateless address auto-configuration, it will be changed according to the change of the link-local address assigned for the active NIC around the time of NIC switching.
Do not set the server running NIC switching mode as an IPv6 router.
When using IPv6 virtual interfaces in the environment where stateless address auto-configuration by an IPv6 router is not set, assign the link-local address of monitored HUB to the monitored IP.
Edit the setting (/etc/sysconfig/network-scripts/ifcfg-ethX file) for the physical interfaces that the GLS bundles as follows:
The descriptions vary depending the OS. See "Table 3.10 Configuration of physical interface (RHEL7)" and "Table 3.11 Configuration of physical interface (RHEL8 or later)" for the differences in descriptions.
For RHEL7
Item | Value (Example) | Description |
---|---|---|
DEVICE | ethX | Specify the device name. Set "ethX". |
BOOTPROTO | static | Specify the protocol when getting the IP address. Set "static" or "none". |
HOTPLUG | no | Specify the use of hotplug. Set "no". |
ONBOOT | yes | Select whether to start the physical interface on startup of the OS. Set "yes". |
DEVICETYPE | hanet | Specify the type of the device. Set "hanet". |
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). |
An example is shown below.
Example of /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 BOOTPROTO=static HOTPLUG=no ONBOOT=yes DEVICETYPE=hanet |
For RHEL8 or later
Item | Value (Example) | Description |
---|---|---|
TYPE | Ethernet | Specify the device type. Set "Ethernet". |
BOOTPROTO | none | Specify the protocol when getting the IP address. Set "none" or "static". |
DEVICE | ethX | Specify the device name. Set "ethX". |
ONBOOT | yes | Select whether to start the physical interface on startup of the OS. Set "yes". |
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). |
An example is shown below.
Example of /etc/sysconfig/network-scripts/ifcfg-eth0
TYPE=Ethernet BOOTPROTO=none DEVICE=ethX ONBOOT=yes |
To create backup of the physical interface settings (the "/etc/sysconfig/network-scripts/ifcfg-ethX" file), the file name must begin with names other than "ifcfg-".
(e.g. bak_ifcfg-ethX)
If the file name begins with "ifcfg-", OS might recognize the interface as an interface to be activated during system startup.
Point
In RHEL7, add "HOTPLUG=no" to the settings of the physical interfaces bundled by GLS (the "/etc/sysconfig/network-scripts/ifcfg-ethX" file).
This setting is not necessary in RHEL 8 or later. Do not set it.
In RHEL7, for the physical interfaces bundled by GLS, do not set "TYPE=Ethernet". Otherwise, GLS will not work properly.
In RHEL 8 or later, set "TYPE=Ethernet" for the physical interfaces bundled by GLS.
An address such as IPADDR is not necessary. Do not set it.
In RHEL7, for the ifcfg-ethX configuration of the physical interfaces bundled by the GLS virtual interface, add the item "DEVICETYPE=hanet".
This setting is not necessary in RHEL 8 or later. Do not set it.
If you need to prevent device names of physical NICs from changing to unexpected names in an environment where traditional interface names (ethX) for RHEL6 or earlier are used, describe the definition of "HWADDR=<MAC address>" in the settings for the physical interfaces (the /etc/sysconfig/network-scripts/ifcfg-ethX file).
When modifying MTU, make sure to set 1280 or more.
To create backup of the physical interface settings (the "/etc/sysconfig/network-scripts/ifcfg-ethX" or "/etc/sysconfig/network/ifcfg-ethX" file), the file name must begin with names other than "ifcfg-".
(e.g. bak_ifcfg-ethX)
If the file name begins with "ifcfg-", OS might recognize the interface as an interface to be activated during system startup.
Define the IPv4 address (virtual IP address, physical IP address, logical virtual interface, takeover virtual IP address) and a host name in /etc/hosts file. These host names must be specified in the /etc/hosts file even if no host names but IP addresses are directly specified in environment definitions.
Before defining a virtual interface, the physical interface you are going to apply must be in active state and be sure the IPv4 address is assigned. (When the system is RHEL, in the file /etc/sysconfig/network-scripts/ifcfg-ethX, define "ONBOOT=yes" and "IPADDR=X.X.X.X" then reboot the system.)
Be sure to define the virtual gateway in the /etc/sysconfig/network-scripts/route-shaX file to set the static route information.
You do not need to configure the routing daemon for the network setting when using this method.