You are not logged in.

#1 2025-02-15 02:27:37

meckchat
Member
Registered: 2024-02-19
Posts: 8

[SOLVED] IPv6 configuration on remote server with static IP address

Hello,

I am trying to configure my remote server (OVH) to work with IPv6, but not knowing much about network management, I am starting to be in way over my head.

I have read and followed the wiki pages (system-networkd and network configuration ) on network configuration. Eventually I was able to have the IPv4 network configuration working (see configuration file below).

I then wanted to repeat this feat with an IPv6 configuration (is it called dual-stack?), but I haven't been successful so far. The server I am configuring uses a static IP address, and I was provided both IPv4 and IPv6 addresses for the server and the gate away.

A ping attempt seemed to suggest that there is a problem with routing:

ping -6 archlinux.org
ping: connect: Network is unreachable

This is the output I have for the routing table is (I am configuring the network device `eno3`):

ip -6 route show
aa:bb:cc:b3ca::/64 dev eno3 proto kernel metric 256 pref medium
fe80::/64 dev eno3 proto kernel metric 256 pref medium

I did not see the default gateway (which I have in the IPv4 configuration), so I thought to add it:

ip -6 route add default via aa:bb:cc:b3ff:00ff:00ff:00ff:00ff dev eno3
RTNETLINK answers: No route to host

but instead got the "no route to host" error message.

After some search, I more or less understood that the communication with the gateway needs to be initialized, because it wasn't listed in:

ip -6 neigh show

I tried to 'flush' the neighbor list and to restart the service with:

ip link set eno3 down
ip -6 neigh flush dev eno3
ip link set eno3 up
systemctl restart systemd-networkd

But it is still not working. In fact, "ip -6 neigh show' now shows three lines with status "router STALE", but none of these addresses match the gateaway address I was given by OVH (in the configuration file below). For instance:

ip -6 neigh show
aa:bb:cc:b3ff:00ff:00ff:00ff:00fd dev eno3 lladdr bc:e7:12:56:5f:c7 router STALE

I am starting to get confused and wasn't able to figure much after this. Any help would be greatly appreciated.

Thanks!

---
I am using the following configuration file:

/etc/systemd/network/20-wired.network
---
[Match]
Name=eno3

[Link]
RequiredForOnline=routable

[Network]
# IPv4 configuration
Address=A.B.C.202/24
Gateway=A.B.C.254

# IPv6 configuration
Address=aa:bb:cc:b3ca::/64
Gateway=aa:bb:cc:b3ff:00ff:00ff:00ff:00ff

and for the working IPv4 configuration, the routing table looks like:

ip route show
default via A.B.C.254 dev eno3 proto static 
A.B.C.0/24 dev eno3 proto kernel scope link src A.B.C.202

Last edited by meckchat (2025-02-18 23:50:37)

Offline

#2 2025-02-15 06:43:07

-thc
Member
Registered: 2017-03-15
Posts: 803

Re: [SOLVED] IPv6 configuration on remote server with static IP address

After finding myself wasting three days of my life time trying to configure IPv6 in my home network the same way I did with IPv4, I finally did some RTFM. Well - IPv6 works significantly different from IPv4 and I was finally able to set it up properly.

A minimal manual IPv4 configuration requires an address (CIDR) and a gateway to work.

A minimal manual IPv6 configuration requires only an address (CIDR). The local IPv6 router at OVH has to advertise itself via RA (ICMPv6 router announcement) packets and your host should accept this advertised gateway automatically. There is no need to enter any IPv6 gateway/router address.

Offline

#3 2025-02-15 11:06:19

cryptearth
Member
Registered: 2024-02-03
Posts: 1,337

Re: [SOLVED] IPv6 configuration on remote server with static IP address

lucky you I use OVH myself - here's my config - please set according to what you have in your server console

[Match]
MACAddress=d0:50:99:d2:0d:d1

[Network]
Address=51.89.6.119/24
Address=2001:41d0:700:2b77::137/64
Gateway=51.89.6.254
Gateway=2001:41d0:700:2bff:ff:ff:ff:ff

[Route]
Destination=2001:41d0:700:2bff:ff:ff:ff:ff/128
Gateway=::

please note: unless you set a specific ipv6 ovh will default to an adress just ending in "::" - for example: the main ipv6 for my server is "2001:41d0:700:2b77::" - or as by ipv6 standards it ends in 0 so the full address would be something like 2001:41d0:0700:2b77:0000:0000:0000:0000 with ipv6 allowing the last 4 blocks of 0 to be replaced with a single double points "::"

Offline

#4 2025-02-15 13:47:57

-thc
Member
Registered: 2017-03-15
Posts: 803

Re: [SOLVED] IPv6 configuration on remote server with static IP address

To be precise "::" represents the longest uninterrupted row of zeros inside an IPv6 address:

::                                          0000:0000:0000:0000:0000:0000:0000:0000
2000::/3                                    2000:0000:0000:0000:0000:0000:0000:0000
2001:41d0:700:2b77::                        2001:41d0:0700:2b77:0000:0000:0000:0000
2001:41d0:700:2b77::137                     2001:41d0:0700:2b77:0000:0000:0000:0137

Offline

#5 2025-02-18 23:49:06

meckchat
Member
Registered: 2024-02-19
Posts: 8

Re: [SOLVED] IPv6 configuration on remote server with static IP address

Thank you for the fast replies, and apologies for the delay in my response.

-thc wrote:

There is no need to enter any IPv6 gateway/router address.

Accordingly, I deleted the line below from my configuration file, however after eno3 down, neigh flush, eno3 up and restarting systemd-networkd, it still didn't work.

Gateway=aa:bb:cc:b3ff:00ff:00ff:00ff:00ff

cryptearth, your solution worked, thanks a lot! Indeed very lucky for me. If not too much to ask, I'd be interested to hear the explanation behind your [Route] section.

Marking this post as solved, and posting below my working configuration file for future reference.

Saying it works because:

ping -6 archlinux.org

returns packets.

/etc/systemd/network/20-wired.network
---
[Match]
MACAddress=<MYMACADDRESS>

[Link]
RequiredForOnline=routable

[Network]
# IPv4 configuration
Address=A.B.C.202/24
Gateway=A.B.C.254

# IPv6 configuration
Address=aa:bb:cc:b3ca::/64
Gateway=aa:bb:cc:b3ff:00ff:00ff:00ff:00ff

[Route]
Destination=aa:bb:cc:b3ff:00ff:00ff:00ff:00ff/128
Gateway=::

Offline

#6 2025-02-19 05:14:25

cryptearth
Member
Registered: 2024-02-03
Posts: 1,337

Re: [SOLVED] IPv6 configuration on remote server with static IP address

meckchat wrote:

If not too much to ask, I'd be interested to hear the explanation behind your [Route] section.

that's a simple one: I don't have one but just copied the default config from the debian12 preset
I use the bringYourOwnImage/Linux option - and as I wasn't able to figure it out the first time I just used one of the provided presets
if you want to follow I put together some much needed information as the official ovh doc lacks a lot: https://github.com/ovh/bringyourownlinu … 2171873619 and my two follow-up replies later in that issue
I actually don't know how it works and it's a pain to get it working just right on opensuse via yast - but that's how they have setup thier presets - so just copy them seems to do the trick
if someone else know what's up here and how the hell it works having the gateway outside the own subnet please feel free to enlighten us

Last edited by cryptearth (2025-02-19 05:18:24)

Offline

#7 2025-02-19 06:36:10

-thc
Member
Registered: 2017-03-15
Posts: 803

Re: [SOLVED] IPv6 configuration on remote server with static IP address

meckchat wrote:

cryptearth, your solution worked, thanks a lot! Indeed very lucky for me. If not too much to ask, I'd be interested to hear the explanation behind your [Route] section.

Can you please post the output of

ip -6 route

? I'd like to make sense of the absurd route definition.

Offline

#8 2025-02-19 08:09:21

cryptearth
Member
Registered: 2024-02-03
Posts: 1,337

Re: [SOLVED] IPv6 configuration on remote server with static IP address

here you go

cryptearth@lim:~> sudo ip -6 route
2001:41d0:700:2b77::/64 dev eth0 proto kernel metric 256 pref medium
2001:41d0:700:2bff:ff:ff:ff:ff dev eth0 metric 1024 pref medium
fe80::/64 dev eth0 proto kernel metric 256 pref medium
default via 2001:41d0:700:2bff:ff:ff:ff:ff dev eth0 metric 1024 pref medium
cryptearth@lim:~>

note: on my server I run opensuse leap 15.6 - but that should not make a difference
if required I can boot into arch and get its output

Offline

#9 2025-02-19 08:40:42

-thc
Member
Registered: 2017-03-15
Posts: 803

Re: [SOLVED] IPv6 configuration on remote server with static IP address

Thanks. Can you add the output of

ip -6 neigh

?

Offline

#10 2025-02-19 09:53:19

cryptearth
Member
Registered: 2024-02-03
Posts: 1,337

Re: [SOLVED] IPv6 configuration on remote server with static IP address

cryptearth@lim:~> sudo ip -6 neigh
[sudo] Passwort für root:
2001:41d0:700:2bff:ff:ff:ff:fd dev eth0 lladdr 2c:5a:0f:bc:37:c7 router STALE
2001:41d0:700:2bff:ff:ff:ff:ff dev eth0 lladdr 00:05:73:a0:00:01 router REACHABLE
fe80::2e5a:fff:febc:37c7 dev eth0 lladdr 2c:5a:0f:bc:37:c7 router STALE
2001:41d0:700:2bff:ff:ff:ff:fe dev eth0 lladdr 40:ce:24:9b:32:a3 router STALE
fe80::42ce:24ff:fe9b:32a3 dev eth0 lladdr 40:ce:24:9b:32:a3 router STALE
cryptearth@lim:~>

Offline

#11 2025-02-19 10:14:07

-thc
Member
Registered: 2017-03-15
Posts: 803

Re: [SOLVED] IPv6 configuration on remote server with static IP address

Thanks again.

Here's what I think happens:

The Cisco router at OVH doesn't advertise itself via RA due to the nature of a data center. The machines are configured with their own IPv6 subnet (2001:41d0:700:2b77::137/64) but the default gateway is actually outside (2001:41d0:700:2bff:ff:ff:ff:ff) of it. The "Route" configuration tells the IPv6 stack that the single (gateway) address is reachable without a route ("Gateway=::") and instead looks for this address via neighbor discovery.

Offline

Board footer

Powered by FluxBB