2. Unlike IPv4, which uses a dotted-decimal format with each
byte ranges from 0 to 255, IPv6 uses eight groups of four
hexadecimal digits separated by colons.
For example, this is a valid IPv6 address:
2340:0023:AABA:0A01:0055:5054:9ABC:ABB0
3. Hex Binary Hex Binary
0 0000 8 1000
1 0001 9 1001
2 0010 A 1010
3 0011 B 1011
4 0100 C 1100
5 0101 D 1101
6 0110 E 1110
7 0111 F 1111
4. IPv6 address shortening
The IPv6 address given above looks daunting, right? Well,
there are two conventions that can help you shorten what
must be typed for an IP address:
1. a leading zero can be omitted
For example, the address mentioned above
(2340:0023:AABA:0A01:0055:5054:9ABC:ABB0) could be
shorten to2340:23:AABA:A01:55:5054:9ABC:ABB0
5. 2. successive fields of zeroes can be represented as two
colons (::)
For
example, 2340:0000:0000:0000:0455:0000:AAAB:1121 can
be written as2340::0455:0000:AAAB:1121
NOTE – you can shorten an address this way only for one
such occurrence. The reason is obvious – if you had more
than occurrence of double colon you wouldn't know how
many sets of zeroes were being omitted from each part.
6. Here is a couple of more examples that can help you
grasp the concept:
Long version: 1454:0045:0000:0000:4140:0141:0055:ABBB
Shortened version: 1454:45::4140:141:55:ABBB
Long
version: 0000:0000:0001:AAAA:BBBC:A222:BBBA:0001
Shortened version: ::1:AAAA:BBBC:A222:BBBA:1