You are not logged in.

#1 2021-02-07 17:03:58

mmarzantowicz
Member
Registered: 2015-12-28
Posts: 32

systemd-networkd: IPv6 default route

I have two vlans added to the bridge. They are both configured with SLAAC + RA (no DHCPv6).

One VLAN (vlan10) is meant only for connections with devices on local network what is enforced by firewall on my router, second VLAN (vlan20) is meant for all other connections including Internet.
systemd-networkd creates default route for each VLAN, in order that makes connecting Internet impossible. Changing the order of config files /etc/systemd/network does not help here.

$ ip -6 route
...
default proto ra metric 1024 expires 1785sec pref medium
        nexthop via fe80::ccdd:34ff:fe23:aaaa dev vlan10 weight 1
        nexthop via fe80::ccdd:34ff:fe23:aaaa dev vlan20 weight 1

Is it possible to force systemd-networkd to not create default route on specific link? Something similar to setting ipv6.never-default true in NetworkManager? I only need ONE default route.


Thanks,
Mateusz

Offline

#2 2021-02-07 19:14:04

rsmarples
Member
Registered: 2009-05-12
Posts: 287

Re: systemd-networkd: IPv6 default route

You would need to set your router not to advertise itself as a router for the vlans then.

Offline

#3 2021-02-07 20:11:08

mmarzantowicz
Member
Registered: 2015-12-28
Posts: 32

Re: systemd-networkd: IPv6 default route

This is might be a possible solution, but I think I don't have an option in my Mikrotik device to not advertise gateway in RA.

If only there was an option to set (overwrite) route metric of the route taken form RA - but there is none.

I'm a bit disappointed by systemd-networkd.

Last edited by mmarzantowicz (2021-02-07 20:12:08)

Offline

#4 2024-03-18 18:51:57

quantum.suto
Member
Registered: 2016-06-09
Posts: 4

Re: systemd-networkd: IPv6 default route

I also have had IPv6 connection problem with Mikrotik router with multiple VLAN, and Google brought me to this thread.
Fortunately I got stable IPv6 connection on my PC at last thanks to the hint "set router not to advertise itself as a router"!
You just need to change Mikrotik configuration a bit.

The problem is that: /ipv6 nd has only 1 interface rule common to all interfaces by default.
Add new rules for each vlan interface and make RA Preference from medium to high just on vlan interface with internet connectivity.

This does not prevent each vlan interface (on router) from advertising as a gateway for its own network, but the vlan interface (on router) in question is chosen as the default gateway (on each client).

 ~ $ ip -color -6 route
(GUA prefix)::/64 dev vl_LAN proto ra metric 512 expires 2591484sec hoplimit 64 pref high
(GUA prefix)::/64 dev vl_LAN proto ra metric 1024 expires 2588574sec pref medium
(ULA prefix #1)::/64 dev brGH proto ra metric 1024 expires 2591984sec pref medium
(ULA prefix #2)::/64 dev vl_SAN proto ra metric 1024 expires 2591893sec pref medium
(ULA prefix #3)::/64 dev vl_Admin proto ra metric 1024 expires 2591916sec pref medium
fe80::/64 dev brGH proto kernel metric 256 pref medium
fe80::/64 dev vl_SAN proto kernel metric 256 pref medium
fe80::/64 dev vl_LAN proto kernel metric 256 pref medium
fe80::/64 dev vl_Admin proto kernel metric 256 pref medium
default via fe80::4aa9:8aff:fe30:5b42 dev vl_LAN proto ra metric 512 expires 1284sec hoplimit 64 pref high  <<< This line appeared >>>
default proto ra metric 1024 expires 1716sec pref medium
        nexthop via fe80::4aa9:8aff:fe30:5b42 dev vl_Admin weight 1 
        nexthop via fe80::4aa9:8aff:fe30:5b42 dev vl_SAN weight 1 
        nexthop via fe80::4aa9:8aff:fe30:5b42 dev brGH weight 1 

Last edited by quantum.suto (2024-03-19 03:07:56)

Offline

Board footer

Powered by FluxBB