SoYouStart and IPv6

Some month ago I switched from Kimsufi to SoYouStart and for the first time I used my /64 IPv4 subnet. On my server only the loopback interface was configured but I heard that in some cases deployed servers had at least one IPv6 address set up. The aim of my configuration is to have two IPv6 addresses correctly set up on my Debian Wheezy server. The OVH wiki has an article which wraps the most important information up:

  • your kernel must support IPv6
  • the gateway is outside your used subnet
  • you have to set up a route to your gateway

The gateway address is composed of your subnet and fice FF nibbles.
If our subnet is 2001:41D0:1:46e::/64 then the gateway is 2001:41D0:1:4FF:FF:FF:FF:FF because we leave the first three nibbles an fill up the empty ones with FF.

Lets do the configuration:
Enable eth0’s inet6 protocol at boot and set the static IP 2001:41D0:1:46e::1 with subnet /64:

iface eth0 inet6 static
address 2001:41D0:1:46e::1
netmask 64

Automatically create a route to the OVH gateway and set it as default route on interface startup and delete it on interface shutdown:

up ip -6 route add 2001:41D0:1:4FF:FF:FF:FF:FF dev eth0
up ip -6 route add default via 2001:41D0:1:4FF:FF:FF:FF:FF dev eth0
down ip -6 route del 2001:41D0:1:4FF:FF:FF:FF:FF dev eth0
down ip -6 route del default via 2001:41D0:1:4FF:FF:FF:FF:FF dev eth0


No seriously. Reboot. Not a service networking restart or a start and stop via init.d, a good and healty reboot. For that reason alone to verify that the auto-config is working on bootup and your server does not stay offline after a unplanned restart due to a crash just because the config is not working.
Reboot is not an option? That leaves you with executing the commands yourself.

After doing so you should be able to use ping6 to connect to Google via 2001:41D0:1:46e::1.

Thanks to henk at freenode’s #debian-de!

Tagged , , , , , , , , , , , , , .Speichere in deinen Favoriten diesen permalink.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.