IPv6 for lazy dummies
I just realized it's been too long since I read about and learned IPv6 (and so much stuff has also changed since back then).
Got a new VPS, and correct config is something like:
IP/subnet: 2b01:dead:beef:42::2/64 Gateway: 2b01:dead:beef::1
And this works fine. To me this looks like the gateway is on a different subnet (/48
) than the interface.
Anyone wants to shed any light on this?
Tagged:
Comments
It is. They most likely have
2b01:dead:beef::/48
and assigned2b01:dead:beef:42::/64
to you. You should have a static route towards their /48 or their gateway IP somewhere.Need a free NAT LXC? -> https://microlxc.net/
ip -6 route
might.What you’ve got there is a setup in which your VPS believes it’s in its own little subnet that consists of just itself. That works on IPv4 too, for example, the sample below works on Debian and in a fictional local
10.0/8
network.This will disable all local traffic and just allow packets towards the gateway. This can be preferential in a shared environment (such as VPS or dedis) where the neighboring IPs aren‘t yours and you usually don‘t want any noise from them anyhow.
Alwyzon - Virtual Servers in Austria starting at 3,99 €/month (excl. VAT)
Ah, makes sense.
But of course ... I didn't pay attention. Did run
ip -6 r s
, but didn't noticed the added static route to the gw:This is on CentOS 8.3, I thought that static route would be in a separate
route6-eth0
file or similar in/etc/sysconfig/network-scripts/
. But there is no such file.I think
DEFAULTGW=2b01:dead:beef::1
is sufficient on Centos 7/8 to createon the fly. CentOS 6 would complain since the GW is not on the net and therefore unreachable.
Need a free NAT LXC? -> https://microlxc.net/