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

Using a /96 mask with IPv6 strikes me as wrong and a violation of the IPv6 standard. Which is not to say it won't work with some equipment, but I would anticipate interoperability issues. If you get address space from Hurricane Electric or GoGoNet, the default is a /64 prefix to identify the solitary subnet. The remaining 64 bits are needed for the automatic host address configuration.
–
pcapademicApr 22 '11 at 19:09

While I agree that trying to use stateless auto-config with less than a /64 is likely to cause a lot of pain, there is nothing in the RFCs that preclude the use of longer masks when manually configuring things. Auto-config is great for home / office client PCs; however in a hosted server or network infrastructure use of stateless auto-config is generally frowned upon and addresses will either be assigned manually or using a stateful config method (e.g. DHCPv6).
–
Russell HeillingApr 26 '11 at 8:55

1 Answer
1

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.

I understand it a bit more now, so thanks. it'd be good though if there was some online calculator for ipv6 addresses. E.g you input your range (the ip/range) and it auto calculates the next ip etc
–
DanielSep 30 '10 at 13:51

As an aside - a /96 gives you as many addresses to play with as the entire IPv4 address space. You probably don't have to worry about efficient usage of the space - A VPS probably isn't going to need all of those addresses just for itself...
–
Russell HeillingSep 30 '10 at 13:56

Great!. Also i created a quick php script using echo dechex($argv[1]); to calculate the next IP. E.G if the main ip i can enter 1 second ip 2 etc etc. and i just use the output to form the ip (Of course adding a : after each 4 digits. Just a question though... When i enter 4294967296 i get 100000000
–
DanielSep 30 '10 at 14:02