Unable to configure IPv6 correctly in Ubuntu 18.04

joshsharp asked:

I have a cloud instance on OVH which is accessible over IPv4 but not IPv6. It’s running Ubuntu 18.04. I’ve found conflicting advice about using netplan vs configuring systemd-networkd directly, but all of the things I’ve tried don’t seem to have any effect.

In OVH’s web interface I have these addresses defined for me:

IPv6: 2607:5300:201:2100::5d4

Gateway: 2607:5300:201:2100::1

According to the guides I’ve read, I’ve configured netplan like this:

/etc/netplan/90-ipv6.yml

network:
    ethernets:
        ens3:
            match:
                macaddress: fa:16:3e:53:64:ce
            set-name: ens3
            addresses:
                - 2607:5300:201:2100::5d4/64
            gateway6: 2607:5300:201:2100::1
            nameservers:
                addresses:
                    - 2001:41d0:3:163::1

    version: 2

And systemd-networkd like this:

/etc/systemd/network/10-ens3.network

[Match]
Name=ens3

[Network]
DHCP=ipv4
Gateway=2607:5300:201:2100::1
DNS=2001:41d0:3:163::1
Destination=2607:5300:201:2100::1

[Address]
Address=2607:5300:201:2100::5d4/64

[Route]
Destination=2607:5300:201:2100::1
Scope=link

My ip addr output looks like this:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether fa:16:3e:53:64:ce brd ff:ff:ff:ff:ff:ff
    inet 54.39.191.97/32 scope global dynamic ens3
       valid_lft 85848sec preferred_lft 85848sec
    inet6 2607:5300:201:2100::5d4/0 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::f816:3eff:fe53:64ce/64 scope link
       valid_lft forever preferred_lft forever

I can ping the gateway and get a response. However I cannot get a response from the server from any other location over IPv6, and a ping6 google.com from this server results in:

PING google.com(yul02s05-in-x0e.1e100.net (2607:f8b0:4020:805::200e)) 56 data bytes
From [hostname] (2607:5300:201:2100::5d4) icmp_seq=1 Destination unreachable: Address unreachable
...
--- google.com ping statistics ---
5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4085ms

The only thing I haven’t tried is rebooting the server, as it’s live and I’d really rather not.

What am I missing? I don’t really know what I’m doing, so it might be something very obvious.

Thanks!

EDIT: Updated the prefix to /64. This configuration also doesn’t work.

My answer:


The correct IPv6 prefix for OVHcloud VPS is /64, not /128 or /0.


View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.