I have two 'router' type devices setup on my network.
One is my actual IPv6 router - a Cisco 2621 (fe80::xxxx:3e60
). It's the correct default router.
Another is a DLINK DIR-615 (fe80::xxxx:5760
). It's IPv6 aware but at the moment is only configured for link-local addressing as it's only being used as a WAP.
Both devices are sending out ICMPv6 RA messages and as a result both are being added to my clients' routing table:
$ ip -f inet6 route | grep default
default via fe80::xxxx:3e60 dev wlan0 proto kernel metric 1024 expires 1741sec mtu 1500 advmss 1440 hoplimit 64
default via fe80::xxxx:5760 dev wlan0 proto kernel metric 1024 expires 1791sec mtu 1500 advmss 1440 hoplimit 64
The trouble arises from the fact is that my clients now have a choice of default routers. One sends packets merrily on their way, the other doesn't. I can remove the incorrect route but it just gets re-added when the next RA comes along.
fe80::xxxx:3e60
(the correct router) is sending out RAs advertising a prefix of 2001:xxxx:xxxx::/64 (my network)
fe80::xxxx:5760
(the incorrect router) is sending out RAs advertising a prefix of fe80::/64 (link-local)
So… who's at fault here?
fe80::xxxx:5760
for sending out RAs when it can't provide a valid prefix?fe80::xxxx:5760
for sending out RAs with the link-local prefix?- my clients for adding
fe80::xxxx:5760
to the route table when it's advertising the link-local prefix? - Something else?
radvd (router advertising daemon) should be disabled on the DLink, at least on the interfaces facing the Cisco router.
Alternatively, you could setup a static default route to the Cisco router on the DLink. This will make the route one hop longer, but still valid assuming the DLink will route back out the interface to the Cisco router.
If the WAN port is the one connected to the Cisco router, the DLink router should not be advertising routing on that link.
EDIT: You may be able to influence routing by setting
AdvRoutePreference high;
and/orAdvDefaultPreference high;
in the Cisco router's radvd configuration.EDIT2: The problem appears to be that the DLink router does not have a global IP address or route. Default route for routers is usually not discovered, so it may need to be set manually.
Step for setting ipv6 router preference from CISCO documentation are:
According to RFC2461 §4.6.2:
§6.2.1:
So one would think that if a router has no valid prefixes to offer, it shouldn't send any RA at all. Likewise if a host sees an RA with no valid prefixes, it should probably ignore it.
The D-Link router is at fault.
At least on hardware version C2 of the DIR-615 (there's a sticker on the router which will say which hardware version you have), the 3.03WW fireware upgrade seems to stop it from sending RAs. This is true in at least in link-local mode anyway (I haven't tested the other options).
I'd say the faults include the oddity of a prefix advertisement from fe80::, the router advertising a default route when it doesn't have Internet connectivity, and the fact that the firmware and documentation doesn't make it at all easy to figure out how to disable the default route.
But there's an good workaround, at least for my DIR-615 revision E3 with firmware 5.1:
Go to the Advanced/IPv6 config page.
Choose "Stateless AUtoconfiguration".
Set the LAN IPv6 prefix to be the one you're using.
Select "Enable Autoconfiguration", choose "Stateless" for the autoconfiguration type, and (this is the important part) set "Router Advertisement Lifetime" to 0.
Setting the router lifetime to 0 in an RA means "this is not a default route".
I haven't found a way to disable router advertisements on this router, but setting it to the prefix I'm already using and setting router lifetime to 0 is more than good enough for me. You don't even have to set the prefix the same, really, but if you don't your interfaces and routing tables will be cluttered with extra addresses and routes that won't get used for much of anything.