2

I'm facing a strange issue with my Linux bridge system (CentOS 7.6.1810). I have two interfaces configured with a bridged network (IP of the bridge is 192.168.42.253). When I reboot the system, it looks quite OK:

> route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.42.254  0.0.0.0         UG    0      0        0 br0
169.254.0.0     0.0.0.0         255.255.0.0     U     1004   0        0 br0
192.168.42.0    0.0.0.0         255.255.255.0   U     0      0        0 br0

After a while though, dhclient starts to interfere with the network configuration:

> route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.42.254  0.0.0.0         UG    0      0        0 br0
169.254.0.0     0.0.0.0         255.255.0.0     U     1004   0        0 br0
192.168.42.0    0.0.0.0         255.255.255.0   U     0      0        0 br0
192.168.42.0    0.0.0.0         255.255.255.0   U     0      0        0 enp1s0

It then pulls a second IP address from my DHCP server and assigns it to enp1s0. It also changes the routing table, so that the bridge routes external traffic from the bridge itself back into the network-site of the bridge, but not the gateway-side of it. This is quite annoying, as I have to reboot the system (or modify the routing tables by hand) to make things like "yum update" work again on the bridge.

Here are the configuration files that I have created for bridge:

> sudo cat ifcfg-br0
DEVICE=br0
TYPE=Bridge
IPADDR=192.168.42.253
NETMASK=255.255.255.0
ONBOOT=yes
BOOTPROTO=none
NM_CONTROLLED=no
DELAY=0
ZONE=public

> sudo cat ifcfg-enp1s0
TYPE="Ethernet"
BOOTPROTO="none"
DEFROUTE="no"
PEERDNS="no"
PEERROUTES="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="no"
IPV6_AUTOCONF="no"
IPV6_DEFROUTE="no"
IPV6_PEERDNS="no"
IPV6_PEERROUTES="no"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="enp1s0"
UUID="510ed878-4443-4252-9b96-860d4f045b2e"
DEVICE="enp1s0"
ONBOOT="yes"
NM_CONTROLLED=no
BRIDGE=br0

> sudo cat ifcfg-enp0s20u3
TYPE="Ethernet"
BOOTPROTO="none"
DEFROUTE="yes"
PEERDNS="no"
PEERROUTES="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="no"
IPV6_AUTOCONF="no"
IPV6_DEFROUTE="no"
IPV6_PEERDNS="no"
IPV6_PEERROUTES="no"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="enp0s20u3"
UUID="510ed878-4443-4252-9b96-860d4f045b2e"
DEVICE="enp0s20u3"
ONBOOT="yes"
NM_CONTROLLED=no
BRIDGE=br0

NetworkManager does not seem to be active:

> sudo nmtui
NetworkManager is not running.

I have looked at BOOTPROTO=none | static | dhcp and /etc/resolv.conf, but according to it, my configuration should be ok and dhclient should not be active.

UPDATE: After a reboot of the system, I have seen that dhclient comes up for the interface. I have to kill it manually to make sure that the routing table is not modified and the additional IP is being assigned. According to /proc, the parent PID of the dhclient process is 1.

Can someone shed some light on what I'm doing wrong with this kind of configuration? Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.