I kept on having this irritating problem. I would create a simple Gentoo network configuration in /etc/conf.d/net using DHCP for IPv4 and intending to use IPv6 address autoconfiguration.
config_eth0=( "dhcp" )
Simple and nice. The DHCP part usually worked, but IPv6 autoconfiguration didn’t. Guys on freenode’s #ipv6 IRC channel said: it should Just Work™. But it doesn’t! Well, sometimes it did. When I tried to debug it. But when I didn’t try to run tcpdump, it could just sit there for hours and not get an address. Just as if my debugging influenced it.
Interestingly, when I switched to a static IPv4 configuration, IPv6 autoconfiguration would magically start working. I haven’t worked out the root cause of this, but I’ve came up with a workaround. Well, the workaround ran into me so hard, it would be difficult not to notice. I wanted to set up VirtualBox bridged networking. When I configured it, my new bridge interface got an IPv6 address straight away, just as guys from #ipv6 would expect.
I’ve reproduced it on two machines. My working setup is the one from Gentoo’s Virtual Box howto page.