/64 routed to my assigned IPv6 address?

user66779 asked:

So I have a vps provider for a linux server, it states this in my network dashboard on their site:

2607:f840:0044:0022:0000:0000:0000:0000/64 is routed to this server (2607:f840:0:3f:0:0:0:eaa)

2607:f840:0:3f:0:0:0:eaa/64 is the address assigned to the eth0 interface and says GLOBAL next to it.

I understand only a little about IPv6. Each address is 128 bits long, written in hexadecimal form, shortened by omitting leading zeroes or using :: one time. What I don’t understand is what it means to have 2607:f840:44:22::/64 ‘routed’ to my IPv6 assigned address 2607:f840:0:3f:0:0:0:eaa/64.

So I can’t change a single bit in 2607:f840:0:3f:0:0:0:eaa but I can chose anything from 2607:f840:44:22:0000:0000:0000:0000 to 2607:f840:44:22:FFFF:FFFF:FFFF:FFFF? That’d give me 2^64 possible addresses to work with, but for what purpose?

Hope this question isn’t too vague or off topic, thanks for insight.

My answer:


Welcome to the wonderful world of having far more IP addresses than you’ll ever know what to do with. (And good on your VPS provider for doing it right and assigning you a /64 instead of something smaller, which a lot of misguided providers seem to be doing…)

One purpose, as you may have guessed, is so that nobody ever runs out of IP addresses, ever. Or at least not for a very long while

So this is how it’s going to work for you:

  1. Your IP address assigned to eth0 interface is 2607:f840:0:3f::eaa. This is on the upstream provider’s /64. When packets come in for your subnet, 2607:f840:44:22::/64, your upstream provider routes them to your eth0 interface.

  2. What you do with the packets when they arrive is entirely up to you. Since you’re on a VPS you probably don’t need a whole lot of addresses, so you could just start assigning them from ...::1 to your existing eth0 interface.

    For example:

    ip addr add 2607:f840:44:22::1/64 dev eth0
    ip addr add 2607:f840:44:22::2/64 dev eth0
    ip addr add 2607:f840:44:22::3/64 dev eth0
    ip addr add 2607:f840:44:22::deca:fbad/64 dev eth0
    ip addr add 2607:f840:44:22:feed:face:dead:beef/64 dev eth0
    

    If you’re further dividing your VPS into containers (e.g. OpenVZ or LXC) then you could route the /64 to the network bridge which will serve the containers, and assign addresses to the containers.

See also the closely related question, How does IPv6 subnetting work and how does it differ from IPv4 subnetting?


View the full question and answer on Server Fault.

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