odroid u3 no default route with systemd-networkd

This forum is for topics dealing with problems with software specifically in the ARMv7h repo.

odroid u3 no default route with systemd-networkd

Postby watnuss » Sat Mar 17, 2018 5:00 pm

Hi,

I am using an odroid u3 and have a static network config using systemd-networkd. However I do net get a default route set:
$this->bbcode_second_pass_code('', '[watnuss@odroid ~]$ ip r
192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.30')

I get an error on systemd-networkd startup:
$this->bbcode_second_pass_code('', '
[watnuss@odroid ~]$ systemctl status systemd-networkd -l
* systemd-networkd.service - Network Service
Loaded: loaded (/etc/systemd/system/systemd-networkd.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2018-03-17 17:54:34 CET; 7s ago
Docs: man:systemd-networkd.service(8)
Process: 20899 ExecStartPost=/usr/bin/ip link set eth0 up (code=exited, status=0/SUCCESS)
Main PID: 20898 (systemd-network)
Status: "Processing requests..."
Memory: 572.0K
CGroup: /system.slice/systemd-networkd.service
`-20898 /usr/lib/systemd/systemd-networkd

Mar 17 17:54:34 odroid systemd[1]: Starting Network Service...
Mar 17 17:54:34 odroid systemd-networkd[20898]: eth0: Gained IPv6LL
Mar 17 17:54:34 odroid systemd-networkd[20898]: Enumeration completed
Mar 17 17:54:34 odroid systemd-networkd[20898]: eth0: Could not set route: Invalid argument
Mar 17 17:54:34 odroid systemd-networkd[20898]: eth0: Configured
Mar 17 17:54:34 odroid systemd[1]: Started Network Service.

')

Ofc you need my config:
$this->bbcode_second_pass_code('', '
[watnuss@odroid ~]$ cat /etc/systemd/network/eth0.network
[Match]
Name=eth0

[Network]
Address=192.168.0.30/24
Gateway=192.168.0.1
DNS=8.8.8.8
IPv6AcceptRA=no
LinkLocalAddressing=no
')

Over time I tried several leads I fond by searching the web.
The last two parameters in the network segment are needed as I will get a different error if they are not present:
$this->bbcode_second_pass_code('', '
Mar 17 17:55:50 odroid systemd-networkd[20913]: eth0: Gained IPv6LL
Mar 17 17:55:50 odroid systemd-networkd[20913]: Enumeration completed
Mar 17 17:55:50 odroid systemd-networkd[20913]: lo: Link is not managed by us
Mar 17 17:55:50 odroid systemd-networkd[20913]: eth0: Could not set route: Invalid argument
Mar 17 17:55:50 odroid systemd-networkd[20913]: eth0: Could not set NDisc route or address: Invalid argument
Mar 17 17:55:50 odroid systemd-networkd[20913]: eth0: Could not set NDisc route or address: Invalid argument
Mar 17 17:55:50 odroid systemd-networkd[20913]: eth0: Could not set NDisc route or address: Invalid argument
Mar 17 17:55:50 odroid systemd-networkd[20913]: eth0: Could not set NDisc route or address: Invalid argument
Mar 17 17:55:50 odroid systemd-networkd[20913]: eth0: Could not set NDisc route or address: Invalid argument
')
My hotfix right now is to ssh to a machine in the local network and set the default route manually via
$this->bbcode_second_pass_code('', 'sudo ip r add default via 192.168.0.1 dev eth0')
which works.

But I would rather prefer the machine to set this on its own for obvious reasons. Does any of you have an idea which could bring me further? Any help is appreciated.

Best regards,

watnuss
watnuss
 
Posts: 3
Joined: Sat Mar 17, 2018 4:46 pm

Re: odroid u3 no default route with systemd-networkd

Postby summers » Sun Mar 18, 2018 1:11 pm

It looks to me from your config, that you want fixed ip address, usuually then you define your own routing.

Here is the /etc/systemd/network/usb0.network on my PocketBeagle - that only has usb ethernet, so doesn't connect directly to my dhcp router ...

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

[Network]
DNS=192.168.2.1

[Address]
Address=192.168.7.18/30

[Route]
Gateway=192.168.7.17
')
and the route that this set up (read via "ip route")
$this->bbcode_second_pass_code('', 'default via 192.168.7.17 dev usb0 proto static
192.168.7.16/30 dev usb0 proto kernel scope link src 192.168.7.18
')
summers
 
Posts: 984
Joined: Sat Sep 06, 2014 12:56 pm

Re: odroid u3 no default route with systemd-networkd

Postby watnuss » Tue Mar 20, 2018 12:47 pm

When you look into my config you can see the 'Gateway' parameter is set in the [Network] segment. This is from my understanding equivalent to the Gateway setting done in [Route] and convenient if you have no other settings in the [Route] segment.
watnuss
 
Posts: 3
Joined: Sat Mar 17, 2018 4:46 pm

Re: odroid u3 no default route with systemd-networkd

Postby summers » Tue Mar 20, 2018 2:16 pm

yes, but if you check the documentation

https://wiki.archlinux.org/index.php/Systemd-networkd#.5BRoute.5D

The gateway is meant to be under [Route], to try rewriting you configuration with the gateway under [Route] and see what happens ...

I know the Tip says that if [Address] and [Route] have only one option you can put it in the [Network] section - but probably worth trying separating them out and see what happens ...
summers
 
Posts: 984
Joined: Sat Sep 06, 2014 12:56 pm

Re: odroid u3 no default route with systemd-networkd

Postby watnuss » Tue Mar 20, 2018 3:32 pm

It did not work. Plus I had to restart systemd-networkd and shut myself out of the system now. I only have physical access to this host on the weekend^^

Any further ideas? The log says the route could not be set because of an invalid argument. I do not know/understand what could be wrong. Any pointers to the log message?
watnuss
 
Posts: 3
Joined: Sat Mar 17, 2018 4:46 pm

Re: odroid u3 no default route with systemd-networkd

Postby summers » Tue Mar 20, 2018 4:20 pm

Hmm - yes I'm confused. On the eth0 interface can you ping 192.168.0.1 ?

Guess you must as the command line setting of default route works.

Suspect we'll need to have someone that understands systemd, and not sure there is anyone on here that understands it. I may be tempted to ask on the main arch site, as that has far more users. As it seems to be a systemd problem, its a wider problem than ArmArch.

I think you should be able to still log on from the 192.168.0.0/24 network - as from the setting of that it knows how to route packets ...
summers
 
Posts: 984
Joined: Sat Sep 06, 2014 12:56 pm


Return to ARMv7h

Who is online

Users browsing this forum: No registered users and 4 guests