IPV6 Compression Rules and Representation

IPV6 Compression Rules and Representation

IPv6 address is of 128 bits and represented in eight octets of 16 bits. IPv6 addresses are in hexadecimal form, so each digit is of four bits, IPv6 address’s consist of possible digits are 0 1 2 3 4 5 6 7 8 9 A B C D E F.

Representation of all hexadecimal number/digits in binary form is as follows:

Hexadecimal # Binary Representation
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
A 1010
B 1011
C 1100
D 1101
E 1110
F 1111

Example of IPv6 address:

This is a simple example of IPv6 address, you can see in below figure IPv6 address have eight hextets/parts and each hextet/part consist of 4 digits and of 16bits, while every digits is of 4bits that you can find from above table.

IPv6 address

IPv6 Compression rules

IPv6 address consist of 8 hextets or parts which is normally difficult to remember, therefore there are some compression method, using compression techniques you can represent IPv6 in more understandable and simple way. These compression rules and methods are as follow:

  • IPv6 Zero Compression
  • IPv6 Leading Zero Compression
  • Both Zero and Leading zero compression

 IPv6 Zero Compression

In zero compression you can represent group of zeros by one double-colon (::) but you can perform this only once in your IPv6 address, means if you have two group of zeros in your IPv6 address you can use the double-colon only once. Review the example for better understanding.

Original IPv6 address:

2001:1265:0000:0000:0AE4:0000:005B:06B0

IPv6 address with zero compression:

2001:1265::0AE4:0000:005B:06B0

 IPv6 Leading Zero Compression

In leading zero compression you can eliminate the starting zero(s) from any hextex. If you have all zero in a hextex you can represent this hextex with one zero.

Original IPv6 address:

2001:1265:0000:0000:0AE4:0000:005B:06B0

IPv6 address with Leading zero compression:

2001:1265:0:0:AE4:0:5B:6B0

 Both Zero and Leading zero compression

You can use the both zero and leading zero compression together by following the rules of these compression techniques.

Original IPv6 address:

2001:1265:0000:0000:0AE4:0000:005B:06B0

Both compression:

2001:1265::AE4:0:5B:6B0

 

IPv6 compression Rule Example:

Orignal IPV6 address:                                    2E21:0000:0000:0000:0011:0002:00C3:00A4

IPv6 Leading zero compression:                  2E21:0:0:0:11:2:C3:A4

IPv6 Zero Compression:                              2E21:0000::0011:0002:00C3:00A4

Both:                                                                2E21::11:2:C3:A4

 

 

 

Waqas Azam
Me Waqas Azam and I am a professional blogger & freelance writer. I also working in the IT industry for over 7 years. I am graduated in Computer Science and information technology.