How to find out the next IPv6 address

ip addressipv6

I have a /96 block of IPV6 addresses and i'm wondering how i could some how find the next address (Since ipv6 addresses can contain numbers and letters). I know the first address could be in numbers but i've yet to find out how i could really find in some kind of order for that amount of addresses

E.G: What technique could i use to make sure i'll actually be able to use all of the addresses

Best Answer

What do you mean by find the next address? Do you mean find the next block?

If you are using a /96 mask then your interface identifier part will be 32 bits in length.

In the standard colon delimited notation each colon delimited block represents 16 bits of the address, so if your block is:

2001:db8:0:0:0:9:0:0/96

The next block would be:

2001:db8:0:0:0:a:0:0/96

(i.e. you simply add one to the 6th field of the address)

If you want to calculate the next address within a block you simply add one to the address, sticking to the block range which would be from 2001:db8::9:0:0 to 2001:db8::9:ffff:ffff. Address 2001:db8::9:0:0 is reserved for the subnet router anycast address and cannot be assigned to an interface.

All addition would be simple hexadecimal integer arithmetic. The "letters" in the address are actually just hexadecimal digits.

One thing I would add is that a /96 block would be smaller than the recommended link addressing size of a /64. There is still debate around this but the current recommendation would be to stick with a /64 for each network segment unless you have a pressing need to do otherwise.