Ubuntu 20.04: when trying to create bridge interface, getting two interfaces with same IP address and duplicated default routes
Konstantin Boyandin
lists at boyandin.info
Thu Jan 20 10:41:52 UTC 2022
Hello,
When trying to create a network bridge (via netplan), I get strange
results on Ubuntu 20.04.
Netplan configuration:
===== netplan configuration below
network:
version: 2
renderer: networkd
ethernets:
eno1:
dhcp4: false
dhcp6: false
bridges:
br0:
interfaces: [eno1]
addresses: [10.20.0.21/24]
gateway4: 10.20.0.1
nameservers:
search: [example.com]
addresses: [10.20.0.1,10.20.0.10]
dhcp4: false
dhcp6: false
===== netplan configuration above
When I run "netplan try", I see:
** (generate:2332): WARNING **: 12:54:41.673: Problem encountered while
validating default route consistency.Please set up multiple routing
tables and use `routing-policy` instead.
Error: Conflicting default route declarations for IPv4 (table: main,
metric: default), first declared in br0 but also in eno1
If I reboot the system, the "route" shows the below:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
default 10.20.0.1 0.0.0.0 UG 0 0 0 br0
default 10.20.0.1 0.0.0.0 UG 0 0 0 eno1
10.20.0.0 0.0.0.0 255.255.255.0 U 0 0 0 br0
10.20.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eno1
The system remains usable, but the configuration is obviously abnormal.
"networkctl" displays:
networkctl
IDX LINK TYPE OPERATIONAL SETUP
1 lo loopback carrier unmanaged
2 eno1 ether routable configured
3 br0 bridge routable configured
Is it possible to have the bridged original interface enslaved, without
duplicating IPs and routes?
--
Sincerely,
Konstantin Boyandin
More information about the ubuntu-users
mailing list