Can a router's FE80 address be advertised as a gateway?
-
Q: Can a router advertise its link-level fe80 address as a gateway for the subnets it serves? After all, every node has to have an fe80:: address for ndp, so everything on the link has a route to it. If the router wasn't running add-on services that needed in-scope addressing why does it need an in-scope/general-use address at all?
Asked another way:
Is it part of the ipv6 spec that the gateway a given subnet uses has to be 'in-scope', that is: a member of that subnet?
-
Actually, it does. Here's my default route:
default via fe80::1:1
It advertises that address, rather than the MAC based link local address.
BTW, that address is secret, so don't tell anyone. ;-)
-
Just pondering a bit: If a router has to support two internal segments each on its own nic, the configurator is obliged to manually choose two different fe80:xxx addresses, one each in addition to the ndp-mac based auto assigned one. I wonder if the freebsd routing code is smart enough to check the ndp tables to choose the right nic to send to a partner if two nics have addresses in the exact same scope. The bridge code does this. From a pure layer 3 perspective it seems problematic.
-
Actually, I believe the address only has to be unique on the network, not the router. With link local addresses, you have to specify the interface that's being used, so you could have fe80::1.1 on eth0 and again on eth1 The router would remember which interface another device's MAC address came through.
-
You have to qualify which interface you mean with a link-local address, as an example this is from the FreeBSD ping6 manual page:
The following will probe hostnames for all nodes on the network link attached to wi0 interface. The address ff02::1 is named the link-local all-node multicast address, and the packet would reach every node on the network link. ping6 -w ff02::1%wi0