Difference between revisions of "Non-Local IPv6 Router Advertisement"
(Created page with "IPv6 uses router advertisements (part of the Neighbour Discovery protocol of ICMPv6) to announce the default gateway. Hosts send a ''router solicitation'' message, and routers...")
(→Use global scope IPv6 address in the router advertisement)
|Line 38:||Line 38:|
Revision as of 20:30, 15 January 2012
IPv6 uses router advertisements (part of the Neighbour Discovery protocol of ICMPv6) to announce the default gateway. Hosts send a router solicitation message, and routers respond with a router advertisement message. This is unlike IPv4 where gateways are typically specified as part of the DHCP messages. Another difference is that IPv6 router advertisements use multicast (IPv6 ff02::1 and MAC address 33:33:00:00:00:01 for router advertisements; IPv6 ff02::2 and MAC address 33:33:00:00:00:02 for router solicitations).
% netstat -rn -f inet6 Destination Gateway Flags Netif default fe80::200:24ff:fece:69ef%en0 UGcI eth0 ::1 link#1 UHL lo0 ....
This is unlike what most users expect. For example, if the host has IPv6 address 2001:0db8:63:24ff:fece:69ef, most users would expect 2001:0db8:637::1 as the gateway:
% netstat -rn -f inet6 Destination Gateway Flags Netif default 2001:0db8:637::1%eth0 UGcI eth0 ::1 link#1 UHL lo0 ....
In reality, the IPv6 address of the gateway is irrelevant, as a packet on the wire would only contain the MAC destination address of the gateway. The IPv6 destination address contains the address of the final destination, not of the gateway.
Specify Global IPv6 Address for the Gateway
- Disable link-local IPv6 addresses on the gateway
- Use the global scope IPv6 address in the router advertisement