Dear Maintainer,
I have been fighting with wrong ipv6 routes for quite a while and have
finally been able to track them to NetworkManager being the cause. But not
what exactly in NetworkManager causes the issue.
I have a system with two ethernet interfaces. One is actually a vxlan interface
used as a L2 VPN and is set up by some of my scripting.
In this example, assume eth0 and vxlan1
I have little control of the ipv6 RA being sent to both interfaces. But for the L2 VPN to
work as intended, I need the IPv6 default route to point to that interface. So prior to set
up the vxlan interface I disable accept_ra on eth0 and delete the existing default route:
ip link add vxlan1 type vxlan id 1 dstport 4789 remote 192.168.10.2
sysctl -w net.ipv6.conf.eth0.accept_ra_defrtr=0
sysctl -w net.ipv6.conf.eth0.accept_ra=0
ip -6 route delete default
ip link set dev vxlan1 up
As soon as an RA is received on vxlan1 the interface vxlan1 is configured and
the correct ipv6 route created to send traffic via L2 VPN.
tcpdump -vvvv -ttt -i eth0 'icmp6 and ('ip6[40] = 134' or 'ip6[40] = 133')'
As soon as an RA is received on eth0, which according to the sysctl entry should
be ignored, a second default route (unfortunately with higher priority) is pointig
to eth0
All further attempts to 'fix' with sysctl by disabling autoconfig or setting the
'all' and 'default' interfaces did not fix the issue.
When I stop NetworkManager, the RA received on eth0 is ignored as configured by
sysctl. This leads me to the conclusion, that NetworkManager somehow still
handles RA even when disabled in the kernel via sysctl.
So I had a look at the NetworkManager ipv6 settings for eth0 and attempted to disable IPv6 RA there,
unfortunately with no success.
I wonder if this is a bug or if this is intended behaviour. If intended, how can
my use case be 'fixed'?