Hetzner ipv6

From TykWiki
Revision as of 12:21, 10 October 2012 by Tykling (talk | contribs)
Jump to navigationJump to search

With Hetzner IPv6 you get a default gateway that is outside your own subnet. This can be rather frustrating to configure with FreeBSD, so I just use the link-local address of the router instead.

Using the routers fe80:: address

$ ping6 ff02::2%em0
PING6(56=40+8+8 bytes) fe80::ea40:f2ff:fe09:be0%em0 --> ff02::2%em0
16 bytes from fe80::7afe:3dff:fe46:ec8f%em0, icmp_seq=0 hlim=64 time=3.470 ms
16 bytes from fe80::7afe:3dff:fe46:ec8f%em0, icmp_seq=1 hlim=64 time=1.033 ms
^C
--- ff02::2%em0 ping6 statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 1.033/2.252/3.470/1.218 ms

$ 

This means I can add the line ipv6_defaultrouter="fe80::7afe:3dff:fe46:ec8f%em0" to /etc/rc.conf and IPv6 works.

Note: Is seems that Hetzner has decided (finally) to add fe80::1 to all their routers, so the ipv6 gateway is fe80::1%interface no matter which datacenter you are in. This has the added advantage that the gateway IP doesn't change if they change the hardware (a normal link-local fe80:: IP is constructed from the mac-address of the interface).

In the datacenters where they already made this change, pinging ff02::2%interface looks like this:

[tykling@haze ~]$ ping6 ff02::2%re0
PING6(56=40+8+8 bytes) fe80::4261:86ff:fee9:d063%re0 --> ff02::2%re0
16 bytes from fe80::1%re0, icmp_seq=0 hlim=64 time=2.383 ms
16 bytes from fe80::1%re0, icmp_seq=1 hlim=64 time=1.072 ms
^C
--- ff02::2%re0 ping6 statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 1.072/1.728/2.383/0.656 ms

[tykling@haze ~]$

Thanks to Hetzner for realizing that their IPv6 network setup was causing problems for customers, and taking appropriate steps to rectify the situation.