I am running Fedora 31 and am having trouble with NetworkManager. I tried to make a bond of two ethernet interfaces and then put the bond in a bridge, yet the bond is getting an IPv4 address with DHCP and an IPv6 one statelessly. This means the bridge does not get the address I configured it to have, and does not work.
I added the ethernet interfaces to the configuration...
nmcli con add type ethernet ifname enp6s0 master bond0
nmcli con add type ethernet ifname enp0s31f6 master bond0
Then I added them as slaves to the bond...
nmcli dev mod bond0 +bond.options "active_slave=enp6s0"
nmcli dev mod bond0 +bond.options "active_slave=enp0s31f6"
I created the bridge and made the bond a slave of that...
nmcli con add type bridge ifname brbond0
nmcli con add type bridge-slave ifname bond0 master brbond0
I set the IPv4 & IPv6 settings for the bridge interface...
nmcli con mod bridge-brbond0 ifname brbond0 ip4 192.168.1.4 gw4 192.168.1.1 ipv4.dns "192.168.1.7 192.168.1.8"
nmcli con mod bridge-brbond0 ipv6.method auto
Then I brought up the bond and the bridge in order...
nmcli con up bond-bond0
nmcli con up bridge-brbond0
As you can see the bond0 interface has some defaults I need to get rid of...
5: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether ae:d1:55:b4:20:8d brd ff:ff:ff:ff:ff:ff
inet 192.168.1.211/24 brd 192.168.1.255 scope global dynamic noprefixroute bond0
valid_lft 3360sec preferred_lft 3360sec
inet6 2001:XXXX:XXXX:XXXX:XXXX:d3a2:dcd1:7f75/64 scope global dynamic noprefixroute
valid_lft 86267sec preferred_lft 14267sec
inet6 fe80::1e7:fb60:1d99:dabd/64 scope link noprefixroute
valid_lft forever preferred_lft forever
And the bridge interface doesn't have its configuration...
16: brbond0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether ee:98:f9:dc:e3:c8 brd ff:ff:ff:ff:ff:ff
I have not managed to find on Google how to use nmcli
to remove the defaults for the bond0
interface. I need the bond on a bridge for my KVM/QEMU virt-manager guests.
There are guides involving editing network-scripts
but this is not how I want to do it. I want to solve this issue with nmcli
and learn something.
The issue is that the bond0 device had to be converted into a bridge slave. I had simply just created the bridge. As such one just has to modify the bond0 interface. To do this you need your bridge uuid.
After doing this and starting the bridge the system is now working and I can use KVM/QEMU and the issue is solved without editing ifcfg files.