Representation

An RFC (Request for Comments) is a publication from the ISOC (Internet Society) and associated organizations like the IETF (Internet Engineering Task Force), and are the official documents of Internet specification, protocols, procedures, etc.

RFC 5952 is 'A Recommendation for IPv6 Address Text Representation'.

Before this RFC, IPv6 address representation was more flexible.

  • You could remove leading 0s, or leave them.

  • You could replace all-0 quartets with ::, or leave them.

  • You could use upper-case 0xA,B,C,D,E,F, or lower-case 0xa,b,c,d,e,f.

RFC 5952 suggests standardizing IPv6 address representation.

Example

Leading 0s must be removed.

  • 2001:0db8:0000:0001:0f2a:4fff:fea3:00b -> 2001:db8:0:1:f2a:4fff:fea3:b1

:: must be used to shorten the longest string of all-0 quartets. (if there is only one all-0 quartet, don't use '::').

  • 2001:0000:0000:0000:0f2a:0000:0000:00b1 -> 2001::0f2a:0:0:b1

If there are two equal-length choices for the ::, use :: to shorten the one on the left.

  • 2001:0db8:0000:0000:0f2a:0000:0000:00b1 -> 2001:db8::f2a:0:0:b1

Hexadecimal characters 'a','b','c','d','e', and 'f' must be written using lower-case not upper-case A B C D E F.

Last updated