Routing Problems with systemd-networkd [SOLVED]

This forum is for topics specific to the Raspberry Pi and Arch Linux ARM

Routing Problems with systemd-networkd [SOLVED]

Postby adsicks » Sun May 08, 2016 9:08 am

For some reason I am getting a bad routing table that overrides my settings in /etc/systemd/network when I boot up. If I run 'systemctl restart systemd-networkd' the my routing table returns to what is expected. Even the metrics on my routes are wrong.

Upon boot:

$this->bbcode_second_pass_code('', '[alarm@host ~]$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default dsldevice 0.0.0.0 UG 202 0 0 eth0
default dsldevice 0.0.0.0 UG 204 0 0 eth1
10.10.0.0 * 255.255.255.0 U 0 0 0 eth0
192.168.1.0 * 255.255.255.0 U 202 0 0 eth0
192.168.1.0 * 255.255.255.0 U 204 0 0 eth1
dsldevice * 255.255.255.255 UH 100 0 0 eth1
')

eth0 is a static route and should have no gateway:

$this->bbcode_second_pass_code('', '[Match]
Name=eth0

[Network]
DHCP=no
LinkLocalAddressing=no
Address=10.10.0.11/24
IPv6AcceptRouterAdvertisements=false

[Addreess]
Address=10.10.0.11/24
Peer=10.10.0.10/24
Broadcast=10.10.0.255/24

[DHCP]
UseDNS=false
UseNTP=false
UseRoutes=false
')
(There are extra settings I added in there trying to fix this)

eth1's metric is not respected in all but the last entry in the above routing table:

$this->bbcode_second_pass_code('', 'cat /etc/systemd/network/20-eth1.network
[Match]
Name=eth1

[Network]
DHCP=yes
IPv6PrivacyExtensions=true
Domains=~.
[DHCP]
RouteMetric=100
')
(Again a few extra settings trying to fix this)


So now that I have booted I can run 'systemctl restart systemd-networkd' and get the routing table I was trying for:

$this->bbcode_second_pass_code('', 'root@host]# systemctl restart systemd-networkd
[root@host]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default dsldevice 0.0.0.0 UG 100 0 0 eth1
10.10.0.0 * 255.255.255.0 U 0 0 0 eth0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth1
dsldevice * 255.255.255.255 UH 100 0 0 eth1
')

What is setting up these routes with default 200 metrics on boot? something has to be bringing my interfaces up before networkd, but what? I have grepped all through /etc looking and no old school settings are there. I have enabled the systemd-networkd-wait-online.service and overridded service files in /etc/systemd/system with conf files to load AFTER this target. I am pulling my hair out. It is a routing table. How can it be this complicated to get on boot?
adsicks
 
Posts: 2
Joined: Wed Aug 06, 2014 9:01 am

Re: Routing Problems with systemd-networkd [SOLVED]

Postby adsicks » Sun May 08, 2016 9:29 am

'systemctl disable dhcpcd'

Forgot that was the Arch default....
adsicks
 
Posts: 2
Joined: Wed Aug 06, 2014 9:01 am


Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 6 guests