Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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:

lagg0:\
     :addr="xxxx:yyyy:zzzz:aaaa::":prefixlen#64:tc=ether:

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?

share|improve this question
    
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

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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