# How to find the next IPv6 address in a sequence

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

-

It isn't letters as such, it is hexadecimal numbers, after 9, 10 is simply represented as A, 11 as B and so on until 15 as F.

So, the easiest thing you can do to learn/understand hexadecimal is to use calculator, switch to Advanced/Programmers mode, then you can click on the "HEX" button. This will allow you to go through the numbers -

Type 1+ =, then keep pressing on the = in order to go up by one.

-
I'm using a mac :S – Daniel Sep 30 '10 at 13:22
On the Mac, Open the Calculator application and choose View : Programmer. – Chris Nava Sep 30 '10 at 13:27
Theres no hex option there though? – Daniel Sep 30 '10 at 13:30
Apple do not support hexadecimal. They believed it too be too complex for ordinary users and prone to buffer overflow issues. Hence they use iAddress type notation for IPv6. Of course you must purchase an additional developer licence to use iAddresses and can only assign them from a Mac computer. Further more iAddresses are incompatible with ordinary IPv6 addresses. – PP. Sep 30 '10 at 13:57
@PP LOL - @Daniel Here is an online one - squarebox.co.uk/hcalc.html is just an example from a quick Google - I can't comment on MAC but there must be a better calculator you can download. – William Hilsum Sep 30 '10 at 14:00

The "numbers and letters" are actually hexadecimal numbers, so you have the following:

0 1 2 3 4 5 6 7 8 9 A B C D E F

which count from 0 to 15.

So if you had the "number" `99` the next value in the sequence would be `9A`.

-

The math is (2^(128-cidr))-2 which in you case is (2^32)-2 (4,294,967,294). So the host number portion of the address looks like:

``````   Integer   Hex
1 0000:0001
2 0000:0002
3 0000:0003
4 0000:0004
5 0000:0005
6 0000:0006
7 0000:0007
8 0000:0008
9 0000:0009
10 0000:000a
11 0000:000b
12 0000:000c
13 0000:000d
14 0000:000e
15 0000:000f
16 0000:0010
17 0000:0011
18 0000:0012
19 0000:0013
20 0000:0014
21 0000:0015
22 0000:0016
23 0000:0017
24 0000:0018
25 0000:0019
26 0000:001a
27 0000:001b
28 0000:001c
29 0000:001d
30 0000:001e
31 0000:001f
32 0000:0020
33 0000:0021
``````

through...

`````` 4294967294 ffff:fffe
``````
-