Advanced Network Management
Teaming and bonding
Bridging
Warning
Bridging support is known to be broken in many distributions. Be aware that your network configuration may be broken after using this feature.
$ yum install -y bridge-utils
$ nmcli con add type bridge con-name br0 ifname br0
$ nmcli con add type bridge-slave con-name br0-port1 ifname ens256 master br0
$ nmcli con add type bridge-slave con-name br0-port2 ifname ens161 master br0
$ nmcli con mod br0 ipv4.addresses 10.10.10.1/24
$ nmcli con mod br0 ipv4.method manual
$ nmcli con up br0
$ ip a
# brctl show
bridge name bridge id STP enabled interfaces
br0 8000.000c293ae68b yes ens161
ens256
Teamed Bridging
# nmcli con add type team con-name team0 ifname team0 config '{"runner": {"name": "activebackup"}}'
# nmcli con add type team-slave con-name team0-ens256 ifname ens256 master team0
# nmcli con add type team-slave con-name team0-ens161 ifname ens161 master team0
# nmcli dev dis team0
# systemctl stop NetworkManager
# systemctl disable NetworkManager
# vi /etc/sysconfig/network-scripts/ifcfg-team0
BRIDGE=brteam0
Removing the team config
# cat /etc/sysconfig/network-scripts/ifcfg-team0-ens161
NAME=team0-ens161
UUID=9dced9f4-35b6-4edb-9aed-8c922ded7b52
DEVICE=ens161
ONBOOT=yes
TEAM_MASTER=team0
DEVICETYPE=TeamPort
Create Bridge config:
vi ifcfg-brteam0
# cat ifcfg-brteam0
DEVICE=brteam0
ONBOOT=yes
type=Bridge
IPADDR0=10.10.10.1
PREFIX=24
Routing
$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.2.254 0.0.0.0 UG 600 0 0 wlp1s0
10.0.1.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr1
10.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr5
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
192.168.2.0 0.0.0.0 255.255.255.0 U 600 0 0 wlp1s0
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0