Routing funktioniert nicht

Routing funktioniert nicht

Ich habe zwei Schnittstellen wan0und wg0. Die Routing-Tabelle sieht folgendermaßen aus:

::1 dev lo proto kernel metric 256 pref medium
2a0c:xxx:yyy:zz00::/56 dev wg0 proto static metric 20 pref medium
2a0c:xxx::/32 dev wan0 proto kernel metric 256 pref medium
2a0c:xxx::/32 dev wan0 proto ra metric 1024 expires 2591957sec pref medium
fe80::/64 dev wan0 proto kernel metric 256 pref medium
default proto static metric 1024 pref medium
        nexthop via 2a0c:xxx::1 dev wan0 weight 1
        nexthop via fe80::****:****:****:3780 dev wan0 weight 1

Wenn ich versuche, dns.googlevon der wg0Schnittstelle aus einen Ping-Befehl zu senden, werden die Pakete nicht an die wan0Schnittstelle umgeleitet. Warum?


tcpdump auf der wg0Schnittstelle gibt ungefähr Folgendes aus:

IP6 2a0c:xxx:yyy:zz60::wwww > dns.google: ICMP6, echo request, id 1, seq 5093, length 40
IP6 2a0c:xxx:yyy::1 > 2a0c:xxx:yyy:zz60::wwww: ICMP6, destination unreachable, unreachable address dns.google, length 88
IP6 2a0c:xxx:yyy:zz60::wwww > dns.google: ICMP6, echo request, id 1, seq 5094, length 40
IP6 2a0c:xxx:yyy:zz60::wwww > dns.google: ICMP6, neighbor solicitation, who has dns.google, length 26
IP6 2a0c:xxx:yyy:zz60::wwww > dns.google: ICMP6, neighbor solicitation, who has dns.google, length 26
IP6 2a0c:xxx:yyy:zz60::wwww > dns.google: ICMP6, neighbor solicitation, who has dns.google, length 26
IP6 2a0c:xxx:yyy::1 > 2a0c:xxx:yyy:zz60::wwww: ICMP6, destination unreachable, unreachable address dns.google, length 88
IP6 2a0c:xxx:yyy:zz60::wwww > dns.google: ICMP6, echo request, id 1, seq 5095, length 40

Die Überprüfung der Route über ip -6 r get zeigt die korrekte Route (2001:4860:4860::8888 ist dns.google):

❯ ip -6 r get to 2001:4860:4860::8888 from 2a0c:xxx:yyy:zz60::wwww iif wg0
2001:4860:4860::8888 from 2a0c:xxx:yyy:zz60::wwww via 2a0c:xxx::1 dev wan0 proto static metric 1024 iif wg0 pref medium

Manchmal werden Pakete immer noch an die WAN0-Schnittstelle umgeleitet, aber das passiert sehr selten.

verwandte Informationen