This section provides sample configurations for a virtual bridge based on the network configuration shown below.
Adding the settings for the virtual bridge
1) Create the settings for the virtual interface.
2) If the virtual interface is activated, deactivate it.
# /opt/FJSVhanet/usr/sbin/stphanet -n sha0 |
3) Create a new interface setting file.
# /bin/touch /etc/sysconfig/network-scripts/ifcfg-br0 |
4) Define the IP address and other settings for the virtual bridge.
For RHEL7
Contents of /etc/sysconfig/network-scripts/ifcfg-br0
DEVICE=br0 TYPE=Bridge BOOTPROTO=static IPADDR=192.168.10.10 NETMASK=255.255.255.0 ONBOOT=yes DELAY=0 |
For RHEL8 or later
Contents of /etc/sysconfig/network-scripts/ifcfg-br0
DEVICE=br0 TYPE=Bridge BOOTPROTO=none IPADDR=192.168.10.10 PREFIX=24 ONBOOT=yes DELAY=0 |
5) Edit the setting file for the virtual interface.
For RHEL7
Delete "IPADDR", "NETMASK", and similar statements related to the IP address.
In addition, add the statement of "BRIDGE=br0".
Contents of /etc/sysconfig/network-scripts/ifcfg-sha0
DEVICE=sha0
BOOTPROTO=static
ONBOOT=yes
DEVICETYPE=sha
HOTPLUG=no
BRIDGE=br0 |
For RHEL8 or later
Delete "IPADDR", "PREFIX", and similar statements related to the IP address.
In addition, add the statement of "BRIDGE=br0".
Contents of /etc/sysconfig/network-scripts/ifcfg-sha0
DEVICE=sha0
BOOTPROTO=none
ONBOOT=yes
TYPE=Ethernet
BRIDGE=br0 |
6) Activate the virtual interface.
# /opt/FJSVhanet/usr/sbin/strhanet -n sha0 |
7) Activate the virtual bridge.
# /usr/sbin/ifup br0 |
Deleting the settings for the virtual bridge
1) Deactivate the virtual bridge.
# /usr/sbin/ifdown br0 |
2) Deactivate the virtual interface and dismantle the virtual bridge.
# /opt/FJSVhanet/usr/sbin/stphanet -n sha0 |
Note
The following message may be output. This does not disrupt ongoing operation.
hanet: 78011: warning: nmcli failed. (connection down=2560 ifname=virtual interface name) |
3) Delete the manually created interface setting file.
# /bin/rm /etc/sysconfig/network-scripts/ifcfg-br0 |
4) Edit the setting file for the virtual interface.
For RHEL7
Delete the statement of "BRIDGE=br0".
In addition, add statements of "IPADDR", "NETMASK", and similar statements related to the IP address as necessary.
Contents of /etc/sysconfig/network-scripts/ifcfg-sha0
DEVICE=sha0 IPADDR=192.168.10.10 NETMASK=255.255.255.0 BOOTPROTO=static ONBOOT=yes DEVICETYPE=sha HOTPLUG=no |
For RHEL8 or later
Delete the statement of "BRIDGE=br0".
In addition, add statements of "IPADDR", "PREFIX", and similar statements related to the IP address as necessary.
Contents of /etc/sysconfig/network-scripts/ifcfg-sha0
DEVICE=sha0 IPADDR=192.168.10.10 PREFIX=24 BOOTPROTO=none ONBOOT=yes TYPE=Ethernet |
5) Activate the virtual interface.
# /opt/FJSVhanet/usr/sbin/strhanet -n sha0 |