Router advertisement for ipv6 is advertising link-local adress
Solution 1:
The link local address should work just fine, and is indeed the address used by rtadvd
.
I'm using 6to4, but it's essentially the same configuration. In my case all I do is:
ifconfig stf0 create
ifconfig stf0 inet6 2002:c0a8:1:ffff::1/16
ifconfig lan0 inet6 2002:c0a8:1::1/64
This just creates the connection, your tunnel should sever the same purpose.
route add -inet6 default 2002:c058:6301::
At this point ping6 ipv6.google.com
works from my router.
sysctl net.inet6.ip6.forwarding=1
Now routing is enabled, even with link local addresses, if I manually configure clients to use the router as their DG IPv6 works. But we want some level of auto-configuration... so /etc/rtadvd.conf
contains:
lan0:\
:addr="2002:c0a8:1::":prefixlen=64:tc=ether:
The only thing left is to add the configuration to my rc.conf
file:
ipv6_gateway_enable="YES" # Route IPv6 Traffic
rtadvd_enable="YES" # IPv6 Router Advertisement Daemon
rtadvd_interfaces="lan0"
cloned_interfaces="stf0"
ifconfig_stf0_ipv6="inet6 2002:c0a8:1:ffff::1/16"
ipv6_defaultrouter="2002:c058:6301::" # 6to4 Default Router
The clients do have a default route of the fec0:: range, but it works perfectly. A tcpdump
shows the clients sending from their global IPv6 address to the fec0 address.
For anyone reading this wanting to do 6to4 the above "internal" addresses are for 192.168.0.1, which isn't routable on the Internet. You need to calculate your own internal IPv6 address based on your external IPv4 address.