You are not logged in.

#1 2020-02-29 06:46:22

pauledd
Member
Registered: 2019-12-14
Posts: 42

[SOLVED] remove extra route after bridge

Hi

I needed to create a bridge and followed the wiki.
I removed my old configuration file "/etc/systemd/network/20-wired.network" and created the needed files for the bridge and added my
wired port enp7s0 to the bridge and I changed the bridge mac address to the mac of the enp7s0 interace to get my old IP adress assigned
from my router:

bridge.network:

[Match]
Name=br0

[Network]
DHCP=ipv4

bind.network

[Match]
Name=enp7s0

[Network]
Bridge=br0

bridge.netdev

[NetDev]
Name=br0
Kind=bridge
MACAddress=xx:xx:xx:xx:xx:xx

The problem is now after reboot my internet stuck and the cause is that there seems to be one route to much on my system now:

# ip route
default via 192.168.1.1 dev enp7s0
default via 192.168.1.1 dev br0 proto dhcp src 192.168.1.100 metric 1024
192.168.1.0/24 dev br0 proto kernel scope link src 192.168.1.100
192.168.1.0/24 dev enp7s0 proto kernel scope link src 192.168.1.100
192.168.1.1 dev br0 proto dhcp scope link src 192.168.1.100 metric 1024

But if I do a

sudo systemctl restart systemd-networkd

my internet works and the extra route dissapears:

# ip route
default via 192.168.1.1 dev br0 proto dhcp src 192.168.1.100 metric 1024
192.168.1.0/24 dev br0 proto kernel scope link src 192.168.1.100
192.168.1.1 dev br0 proto dhcp scope link src 192.168.1.100 metric 1024

Any ideas what might cause that extra route entry to the "disabled" enp7s0 device?

Last edited by pauledd (2020-03-01 07:32:11)

Offline

#2 2020-02-29 18:25:56

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,867

Re: [SOLVED] remove extra route after bridge

The ethernet interface must not have DHCP or an IP address associated as the bridge requires an interface to bind to with no IP: modify the corresponding /etc/systemd/network/MyEth.network accordingly to remove the addressing.

Check the files in /etc/systemd/network/ , maybe you forgot to remove the addressing from the file for enp7s0 device ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Online

#3 2020-03-01 07:01:03

pauledd
Member
Registered: 2019-12-14
Posts: 42

Re: [SOLVED] remove extra route after bridge

I have no configuration file for the interface, I deleted it:

# ls /etc/systemd/network/
bind.network  bridge.netdev  bridge.network

Offline

#4 2020-03-01 07:31:16

pauledd
Member
Registered: 2019-12-14
Posts: 42

Re: [SOLVED] remove extra route after bridge

I think I got it.
I noticed in journalctl -b that enp7s0 was configured by some dhcpd thing prior the bridge configuration.
I did a

sudo systemctl disable dhclient@enp7s0.service

and a reboot and the extra route disappeared.
So I guess "dhclient@enp7s0.service" is some remnant of my first arch network configuration steps some time ago...
Marked as solved.

Offline

Board footer

Powered by FluxBB