NOTATION FOR IPV6 ADDRESSES — IPV6 — USB 3.0
USB 3.0: NOTATION FOR IPV6 ADDRESSES

Saturday, January 9, 2010

NOTATION FOR IPV6 ADDRESSES

IPv6 addresses are 128 bits long but are normally written as eight groups of 4 hexadecimal digits each. For example,
3ffe:6a88:85a3:08d3:1319:8a2e:0370:7344
is a valid IPv6 address.
If a 4 digit group is 0000, it may be omitted. For example,
3ffe:6a88:85a3:0000:1319:8a2e:0370:7344
is the same IPv6 address as
3ffe:6a88:85a3::1319:8a2e:0370:7344
Following this rule, if more than two consecutive colons result from this omission, they may be reduced to two colons, as long as there is only one group of more than two consecutive colons. Thus
2001:2353:0000:0000:0000:0000:1428:57ab
2001:2353:0000:0000:0000::1428:57ab
2001:2353:0:0:0:0:1428:57ab
2001:2353:0::0:1428:57ab
2001:2353::1428:57ab
are all valid and mean the same thing, but
2001::25de::cade
is invalid.
Also leading zeros in all groups can be omitted, thus
2001:2353:02de::0e13 is the same thing as
2001:2353:2de::e13
If the address is an IPv4 address in disguise, the last 32 bits may be written in decimal; thus
::ffff:192.168.89.9 is the same as
::ffff:c0a8:5909, but not the same as
::192.168.89.9 or
::c0a8:5909.
The ::ffff:1.2.3.4 format is called an IPv4-mapped address, and is deprecated. The ::1.2.3.4 format is an IPv4-compatible address.
IPv4 addresses are easily convertible to IPv6 format. For instance, if the IPv4 address was 135.75.43.52, it could be converted to
0000:0000:0000:0000:0000:0000:874B:2B34 or ::874B:2B34.
Then again, one could use the hybrid notation (IPv4 mapped addresses), in which case the address would be ::135.75.43.52

No comments:

Post a Comment