Setting up a Software Bridge on Top of a Teamed Device on RHEL 7

We are going to setup a bridged network interface on top of a teamed link.

Before We Begin

We use a RHEL 7.1 virtual machine with a teamed interface that we configured some time ago.

# nmcli c
NAME     UUID                                  TYPE            DEVICE
slave2   eabb15cc-2bb7-4fc1-a52f-47268137cb09  802-3-ethernet  enp0s8
slave1   6d420cc6-cba4-4561-b9ae-17af025987ce  802-3-ethernet  enp0s17
myteam0  9691a92f-03dc-48b2-951d-a2b73721f8bc  team            myteam0
# ip ad
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp0s8: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master myteam0 state UP qlen 1000
    link/ether 08:00:27:ff:72:02 brd ff:ff:ff:ff:ff:ff
3: enp0s17: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master myteam0 state UP qlen 1000
    link/ether 08:00:27:ff:72:02 brd ff:ff:ff:ff:ff:ff
4: myteam0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
    link/ether 08:00:27:ff:72:02 brd ff:ff:ff:ff:ff:ff
    inet 10.8.8.72/24 brd 10.8.8.255 scope global myteam0
       valid_lft forever preferred_lft forever
    inet6 fc00::a:b:c:72/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:feff:7202/64 scope link
       valid_lft forever preferred_lft forever

Configure Software Bridge

Be advised that we use console and not Secure Shell (SSH). If we misconfigure something, network connection might and likely will be dropped.

Install the bridge-utils package:

# yum install -y bridge-utils

Add a new mybr0 connection:

# nmcli c add type bridge con-name mybr0 ifname mybr0

Modify the newly created mybr0 connection to match our configuration (see the teamed configuration for IPs etc):

# nmcli c mod mybr0 ipv4.method manual ipv6.method manual \
  ipv4.addresses 10.8.8.72/24 ipv4.gateway 10.8.8.70 \
  ipv4.dns 10.8.8.70 ipv6.addresses fc00::a:b:c:72/64 \
  bridge.stp no

Verify:

# nmcli c
NAME     UUID                                  TYPE            DEVICE
slave2   eabb15cc-2bb7-4fc1-a52f-47268137cb09  802-3-ethernet  enp0s8
slave1   6d420cc6-cba4-4561-b9ae-17af025987ce  802-3-ethernet  enp0s17
myteam0  9691a92f-03dc-48b2-951d-a2b73721f8bc  team            myteam0
mybr0    558eb416-de58-4b44-a545-8959cdc81e66  bridge          mybr0

Change to:

# cd /etc/sysconfig/network-scripts/

Open ifcfg-myteam0 for editing. Add the following line at the end of the file:

BRIDGE=mybr0

Also remove IP address configuration as it’s now set up on the bridge. We can use sed:

# sed -i '/IPADDR/d;/PREFIX/d;/GATEWAY/d;/DNS/d;/IPV6ADDR/d' ./ifcfg-myteam0

Disable DAD on the bridged interface:

# echo "net.ipv6.conf.mybr0.accept_dad=0" >>/etc/sysctl.d/dad.conf
# sysctl -w net.ipv6.conf.mybr0.accept_dad=0

Network Manager does not support bridges on bonded or teamed interfaces:

# systemctl disable NetworkManager && systemctl stop NetworkManager

The network service should be started and enabled:

# systemctl enable network && systemctl restart network

Verify:

# brctl show
bridge name     bridge id               STP enabled     interfaces
mybr0           8000.080027ff7201       no              myteam0
# ip ad
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp0s8: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master myteam0 state UP qlen 1000
    link/ether 08:00:27:ff:72:01 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::a00:27ff:feff:7201/64 scope link
       valid_lft forever preferred_lft forever
3: enp0s17: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master myteam0 state UP qlen 1000
    link/ether 08:00:27:ff:72:01 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::a00:27ff:feff:7201/64 scope link
       valid_lft forever preferred_lft forever
6: myteam0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master mybr0 state UP
    link/ether 08:00:27:ff:72:01 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::a00:27ff:feff:7201/64 scope link
       valid_lft forever preferred_lft forever
7: mybr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
    link/ether 08:00:27:ff:72:01 brd ff:ff:ff:ff:ff:ff
    inet 10.8.8.72/24 brd 10.8.8.255 scope global mybr0
       valid_lft forever preferred_lft forever
    inet6 fc00::a:b:c:72/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:feff:7201/64 scope link
       valid_lft forever preferred_lft forever

One thought on “Setting up a Software Bridge on Top of a Teamed Device on RHEL 7

  1. Hi
    I had to do “nmcli dev disconnect myteam0” before stopping NetworkManager and starting network. It failed with eno devices disapearing and bridge in wired state.

Leave a Reply

Your email address will not be published. Required fields are marked *