Tracing where an IPv6 route is being picked up from

I've noticed two route entries in my IPv6 routing table on my router:

2a02:8800:f000:18b0::/64 dev eth1.2 proto kernel metric 256 expires 2591997sec pref medium
2a02:88fd:18:a::/64 dev eth1.2 proto kernel metric 256 pref medium

They belong to Virgin Media UK, however thus far Virgin Media in the UK have not deployed IPv6, so I'm trying to find out where these routes are being picked up from.

eth1.2 is the WAN interface which my Virgin Media connection is coming from currently:

config interface 'wan'
        option ifname 'eth1.2'
        option proto 'dhcp'
        option metric '10'
        option peerdns '0'
        option broadcast '1'

ifstatus does not show anything of the above routes. I've confirmed with tcpdump that there is ICMPv6/router advertisement packets on the WAN.

I have tried configuring a DHCPv6 alias interface to see if a prefix is provided, but nothing is currently.

tcpdump: listening on eth1.2, link-type EN10MB (Ethernet), capture size 262144 bytes
 00:00:00.000000 IP6 (hlim 255, next-header ICMPv6 (58) payload length: 80) fe80::201:5cff:fe9c:2847 > ip6-allnodes: [icmp6 sum ok] ICMP6, router advertisement, length 80
        hop limit 0, Flags [managed, other stateful], pref medium, router lifetime 9000s, reachable time 3600000ms, retrans timer 0ms
          prefix info option (3), length 32 (4): 2a02:8800:f000:18b0::/64, Flags [onlink], valid time 2592000s, pref. time 604800s
            0x0000:  4080 0027 8d00 0009 3a80 0000 0000 2a02
            0x0010:  8800 f000 18b0 0000 0000 0000 0000
          prefix info option (3), length 32 (4): 2a02:88fd:18:a::/64, Flags [onlink], valid time infinity, pref. time infinity
            0x0000:  4080 ffff ffff ffff ffff 0000 0000 2a02
            0x0010:  88fd 0018 000a 0000 0000 0000 0000

However is there any way I can find out where these routes are coming from specifically?

Can you find the IPv6 prefixes in ubus call network.interface dump?

1 Like

Nope, doesn't show up on ubus call network.interface.wan status or ifstatus wan. Given the IPv6 routing table has eth1.2 it's coming from that WAN, but no where can I see the routes existing on an interface.

The wan6 interface is typically an alias that uses the protocol dhcpv6.

It is, however it has been disabled and it's not where this route is being picked up from, because it's been disabled at boot for a while. I had only recently re-enabled it after finding this IPv6 route present to test.

root@linksys-wrt3200acm:~# ifstatus wan6
{
        "up": false,
        "pending": true,
        "available": true,
        "autostart": true,
        "dynamic": false,
        "proto": "dhcpv6",
        "device": "eth1.2",
        "data": {

        }
}

It looks like it is coming from the main WAN interface using DHCP but I can't find any way to tie the routes being picked up.

Besides DHCPv6, IPv6 also relies on ICMPv6 for ND/RA.
You can also tcpdump DHCPv4 to make sure there's nothing weird.

Can't find anything strange. I assume somehow through DHCP the routes are being picked up, but no DHCPv6 router solicitation request provides a prefix currently. I can't however determine exactly how they are getting picked up, given they don't show up against an interface, other than in the route table on eth1.2.

I eventually figured this out!

When the option of accept_ra is set to 2 on the WAN interface for this connection, it picks up the routes and adds them to the main routing table, when accept_ra is not set to 2, it doesn't happen.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.