OVH and IPv6 problems

I’ve been reading about this all over the web. In French, English, Polish, German etc. One thing is a fact: OVH documentation on IPv6 is confusing for most users. But hey! IPv6 is not for the most users. Get used to it… or read on to learn how to configure your IPv6 in no time.

Still reading? Cool!

So we are about to configure IPv6 on Ubuntu box (it should also work on Debian) using standard magic.

The magic is to add v6 address to your interface when it starts. And to… delete v6 address from your interface when it’s about to go down. Simple enough.

Let’s go. Steps:

  1. Note your IP address from OVH Manager (see picture #1 below)
  2. Paste two commands I’m going to reveal to you below
  3. Grab a coke, coffee, tea, beer or whatever you like to celebrate your hard work on configuring your shiny new ipv6 networking on OVH server

Your IPv6 address

There are two ways of obtaining your IPv6 address: hard and easy.

Hard way: calculate it yourself. You can do this here.

Easy way: check it in your OVH panel. After logging in to OVH Manager, go to Dedicated Servers -> Summary. On right side of screen you should see something similar to picture below.


Don’t look at me like that. I can’t make it easier. If you want to complicate things a little, just go ahead and read more about IP version 6. :P

Paste two commands

This is the main magic. Don’t try it when you’re sober. Ever.

$ sudo ip -6 addr add 2001:41d0:XXXX:XXXX::1/56 dev eth0
$ sudo ip -6 addr delete 2001:41d0:XXXX:XXXX::1/56 dev eth0

Ok. So what the hell is up with these?

First, you’ll need iproute2 package (for the ip command). So just apt-get your way through this complicated issue…

apt-get update && apt-get install iproute

Now, you can add v6 address to your network interface:

$ ip -6 addr add 2001:41d0:XXXX:XXXX::1/56 dev eth0

And check if your gateway is available:

$ ping6 -c 3 2001:41d0:XX:XXff:ff:ff:ff:ff
PING 2001:41d0:1:afff:ff:ff:ff:ff(2001:41d0:XX:XXff:ff:ff:ff:ff) 56 data bytes
64 bytes from 2001:41d0:XX:XXff:ff:ff:ff:ff: icmp_seq=1 ttl=64 time=57.8 ms
64 bytes from 2001:41d0:XX:XXff:ff:ff:ff:ff: icmp_seq=2 ttl=64 time=70.4 ms
64 bytes from 2001:41d0:XX:XXff:ff:ff:ff:ff: icmp_seq=3 ttl=64 time=8.99 ms

--- 2001:41d0:XX:XXff:ff:ff:ff:ff ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 8.992/45.762/70.463/26.508 ms

Fine. Let’s configure routing:

$ sudo ip -6 r a via 2001:41d0:XX:XXff:ff:ff:ff:ff dev eth0

Check if you can see Internets:

$ ping6 -c 3
PING 56 data bytes
64 bytes from icmp_seq=1 ttl=55 time=21.4 ms
64 bytes from icmp_seq=2 ttl=55 time=18.5 ms
64 bytes from icmp_seq=3 ttl=55 time=18.6 ms

--- ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 18.590/19.563/21.469/1.357 ms


Let’s now update our /etc/network/interfaces file. Whole file should look similar to this:

auto eth0
iface eth0 inet static
  address YOUR.IP.AD.DRESS

iface eth0 inet6 static
  address 2001:41d0:1:XXXX::1
  netmask 56
  gateway 2001:41d0:1:XXFF:FF:FF:FF:FF

If you want to have more than one IPv6 address add to second (inet6) definition of eth0 interface following lines.

up /sbin/ip -6 addr add 2001:41d0:1:af20::deaf:bed/56 dev eth0
down /sbin/ip -6 addr delete 2001:41d0:1:af20::deaf:bed/56 dev eth0

Easy? Easy! As hell.

Great. Let’s just disable automatic configuration – it’s breaking things at OVH.

$ sudo sysctl net.ipv6.conf.default.autoconf=0
$ sudo sysctl net.ipv6.conf.all.autoconf=0

Before you proceed – double check your configuration. Reboot your system. Triple check. And then…


But not too long. If you are not using your IPv6 network it’ll magically go down after some time. Couldn’t resolve it in another way than removing IP and adding it again.

Any other tips on your head?

One thought on “OVH and IPv6 problems”

Leave a Reply

Your email address will not be published. Required fields are marked *

Loading Facebook Comments ...

No Trackbacks.