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? :# :3

Tagged:

Comments

  • @flips said:
    And this works fine. To me this looks like the gateway is on a different subnet (/48) than the interface.

    It is. They most likely have 2b01:dead:beef::/48 and assigned 2b01:dead:beef:42::/64 to you. You should have a static route towards their /48 or their gateway IP somewhere.

    Thanked by (3)bikegremlin Abdullah flips

    dnscry.pt - Public DNSCrypt resolvers hosted by LowEnd providers • Need a free NAT LXC? -> https://microlxc.net/

  • Anyone wants to shed any light on this?  

    ip -6 route might.

    Thanked by (1)flips
  • alwyzonalwyzon Hosting Provider
    edited March 2021

    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.

    auto eth0
    iface eth0 inet static
            address 10.1.2.3/32
            gateway 10.0.0.1
            pointopoint 10.0.0.1
    

    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.

    Thanked by (1)flips

    Alwyzon - Virtual Servers in Austria starting at 4,49 €/month (excl. VAT)

  • @Brueggus said: It is. They most likely have 2b01:dead:beef::/48 and assigned 2b01:dead:beef:42::/64 to you. You should have a static route towards their /48 or their gateway IP somewhere.

    Ah, makes sense.

    @rm_ said: ip -6 route might.

    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:

    2b01:dead:beef::1 dev eth0 proto static metric 100 pref medium
    2b01:dead:beef:42::/64 dev eth0 proto kernel metric 100 pref medium
    fe80::/64 dev eth0 proto kernel metric 100 pref medium
    default via 2b01:dead:beef::1 dev eth0 proto static metric 100 pref medium
    

    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 create

    2b01:dead:beef::1 dev eth0 proto static metric 100 pref medium
    

    on the fly. CentOS 6 would complain since the GW is not on the net and therefore unreachable.

    Thanked by (1)flips

    dnscry.pt - Public DNSCrypt resolvers hosted by LowEnd providers • Need a free NAT LXC? -> https://microlxc.net/

Sign In or Register to comment.