We know that IPv4 addresses are mostly represented in a dotted decimal form like 192.168.10.1, and if written with a prefix mask then it would be written like 192.168.10.1/24, where /24 is the network mask.
But IPv6 is long addressing format. IPv6 is 128 bit long and usually represented in hexadecimal format of addressing. IPv6 representation includes 8 sets of four hex digits separated by a colon(:).
Mostly each set of four digits is termed as “Quartet”, however the term Quartet is not official.
IPv6 addresses are represented in two forms:
- Unabbreviated –
- Abbreviated –
Rules to Abbreviate an IPv6 Address:
- In each quartet, remove the starting & consecutive 0s (0001 -> 1, 0000 -> 0 & 0092 -> 92).
- If there are two or more consecutive quartet of all 0s, replace it with double colon (::), but you can use double colon only once in a single address.
But in the above example, two or more quartet of all 0s occured two times, then which quartet to be replaced? In such cases, the highest no of consecutive 0s are replaced by a double colon(::). Examples:
◙ 1111:2222:3333:0000:0000:1000:ffee:0001 It can be written in abbreviated form as 1111:2222:3333::1000:ffee:1 ◙ 0001:0002:0003:0000:0000:1023:0000:0022 -> 1:2:3::1023:0:22 ◙ ffee:0000:0000:0001:0000:0000:0000:0001 -> ffee:0:0:1::1 ◙ 1a2b:0000:0000:0000:0000:0000:0000:0002 -> 1a2b::2
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- Difference between Implied addressing mode and Immediate addressing mode
- Difference between Relative Addressing Mode and Direct Addressing Mode
- Differences between IPv4 and IPv6
- Internet Protocol version 6 (IPv6) Header
- Transition from IPv4 to IPv6 address
- Compression of IPv6 address
- IPv6 Fragmentation Header
- Difference between Indirect and Implied Addressing Modes
- Difference between Memory based and Register based Addressing Modes
- Difference between Direct and Indirect Addressing Modes
- Difference between Indirect and Immediate Addressing Modes
- Difference between Direct and Immediate Addressing Modes
- Difference between PC relative and Base register Addressing Modes
- Difference between Direct and Implied Addressing Modes
- Classful Vs Classless Addressing
- Ethernet Frame Format
- Computer Organization | Problem Solving on Instruction Format
- Token Ring frame format
- Difference between Stop and Wait, GoBackN and Selective Repeat
- Difference between Stop and Wait protocol and Sliding Window protocol
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.