You are not logged in.

#1 2020-06-27 17:06:14

foxcub
Member
From: California
Registered: 2006-06-10
Posts: 36

Undesirable default route in IPv6

I have static IPv4 and IPv6 configured using `systemd-networkd`. The configuration is as follows:

[Match]
Name=eno0

[Network]
DNS=X.Y.Z.1

[Address]
Label=static-ipv4
Address=X.Y.Z.34/24

[Address]
Label=static-ipv6
Address=A:B:C:D::E/64

[Route]
Gateway=A:B:C:D::1
GatewayOnLink=yes

[Route]
Gateway=X.Y.Z.1
GatewayOnLink=yes

This works great for IPv4. For IPv6 it creates routes that look as follows:

$ ip -6 route

::1 dev lo proto kernel metric 256 pref medium
fc00:1:1::/64 dev wg0 proto kernel metric 256 pref medium
fe80::/64 dev eno0 proto kernel metric 256 pref medium
default dev eno0 proto kernel metric 256 pref medium
default proto static metric 1024 pref medium
	nexthop via A:B:C:D::1 dev eno0 weight 1 onlink 
	nexthop via fe80::... dev eno0 weight 1

The penultimate route creates a problem. Until I remove it, IPv6 doesn't work. Once I do,

sudo ip -6 route del default dev eno0

everything works great.

Where does this route come from and how do I disable it from being added in the first place?

Offline

#2 2020-06-28 13:25:33

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

Re: Undesirable default route in IPv6

https://bbs.archlinux.org/viewtopic.php?id=179100 is old, but looks similar .

Do routes change when you declare 2 DNS servers (one for IPv4 and another for IPv6 ) ?


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)

Offline

#3 2020-06-28 21:44:43

foxcub
Member
From: California
Registered: 2006-06-10
Posts: 36

Re: Undesirable default route in IPv6

No, they didn't change. Although it's also the case that the second DNS server didn't make it to /etc/resolv.conf, and I don't have /run/systemd/network/resolv.conf that that post mentioned. So something strange is going on there.

Offline

#4 2020-06-28 21:57:44

foxcub
Member
From: California
Registered: 2006-06-10
Posts: 36

Re: Undesirable default route in IPv6

Ok, the /etc/resolv.conf mystery is solved. I'm using systemd-resolved, so that's where the changes go (resolvectl shows them).

Offline

Board footer

Powered by FluxBB