Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
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. – pcapademic Apr 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 Heilling Apr 26 '11 at 8:55
up vote 5 down vote accepted

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:


The next block would be:


(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.

share|improve this answer
I've purchased a xen vps with a company and they only assigned me a /96 So i can't get a /64 block – Daniel Sep 30 '10 at 13:40
Makes sense. Does the rest of my answer address your question? – Russell Heilling Sep 30 '10 at 13:50
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 – Daniel Sep 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 Heilling Sep 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 – Daniel Sep 30 '10 at 14:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.