I have the following situation: I configured a FreeBSD 9.1 machine as the endpoint of a heartbeat SixXS tunnel on a gif0 interface. It works so far, and I can ping6 via IPv6.

I assigned to another interface lagg0 which is an aggregated interface a static IPv6 out of the assigned IPv6 subnet which is connected to the LAN. Now I would like to advertise this network prefix to my LAN using the rtadvd deamon.

This is its /etc/rtadvd.conf file:


with xxxx:yyyy:zzzz:aaaa::/64 being the network prefix. When I now add clients to the network, they take the network prefix and generate their autoconf and temporary adresses. That works great.

However what they are missing is the correct IPv6 default route. In the routing table the default route for IPv6 is the fe80:: link-local adress of the router.

Now no packets are routed to the internet. If I add the default route manually to the host it works.

My questions

I thought that the router advertisement should configure the right default route on the clients. Am I missing something here? Why does it advertise its link-local adress instead of the right one?

  • It is normal and expected behavior for statelessly autoconfigured hosts on the network to use the link-local address of the router as the default gateway. Are you sure you actually have connectivity on the link? Can you ping the link-local address? – Michael Hampton Feb 8 '13 at 22:09
  • I have a link and it works fine. After rebooting my Mac OS X client it got the router's link-local address and it worked as you described. – GorillaPatch Feb 9 '13 at 11:43

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:


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

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, which isn't routable on the Internet. You need to calculate your own internal IPv6 address based on your external IPv4 address.

  • I cannot find the mistake because I did not make one. A simple reboot of the Mac OS X client fixed the problem. I tried that before but maybe it was too late. Thanks for your help and describing the default behavior. – GorillaPatch Feb 9 '13 at 11:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.