I am trying to configure a bridge for KVM guests and host connectivity. The bridge is never configured right, the physical NIC always ends up getting the static IP address and the bridge is assigned a dynamic one. The static IP is reserved in the router which may be whats causing this but I do not want to remove the DHCP reservation. Is there something I am not doing right?
This is what my Netplan config looks like:
network:
version: 2
renderer: NetworkManager
ethernets:
enp2s0:
dhcp4: no
dhcp6: no
bridges:
br0:
dhcp4: no
dhcp6: no
interfaces: [enp2s0]
gateway4: 192.168.0.1
addresses: [192.168.0.100/24]
macaddress: 40:b0:34:30:c5:bf # Same as the physical NIC
nameservers:
addresses: [8.8.8.8, 8.8.4.4]
parameters:
stp: false
forward-delay: 0
netplan --debug apply
output: https://pastebin.com/9yfMfWj0
ip route
output:
default via 192.168.0.1 dev enp2s0 src 192.168.0.100 metric 202
default via 192.168.0.1 dev br0 proto dhcp src 192.168.0.101 metric 230
169.254.0.0/16 dev br-c87c70358e53 scope link src 169.254.162.89 metric 207
169.254.0.0/16 dev docker0 scope link src 169.254.164.22 metric 208
169.254.0.0/16 dev veth66c4130 scope link src 169.254.120.192 metric 210
169.254.0.0/16 dev veth97ef893 scope link src 169.254.172.222 metric 212
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1
172.18.0.0/16 dev br-c87c70358e53 proto kernel scope link src 172.18.0.1
172.25.0.0/16 dev br-a88b0c435e9a proto kernel scope link src 172.25.0.1 linkdown
172.26.0.0/16 dev br-bbd6b452a7d7 proto kernel scope link src 172.26.0.1 linkdown
172.28.0.0/16 dev br-7f9c923a0aa0 proto kernel scope link src 172.28.0.1 linkdown
192.168.0.0/24 dev enp2s0 proto dhcp scope link src 192.168.0.100 metric 202
192.168.0.0/24 dev br0 proto dhcp scope link src 192.168.0.101 metric 230