3. IPv6 Address Representation
3
By Chhay Buntha
IPv6 addresses are 128 bits in length and written as a string of hexadecimal values. Every 4 bits is
represented by a single hexadecimal digit; for a total of 32 hexadecimal values, as shown in Figure below.
IPv6 addresses are not case-sensitive and can be written in either lowercase or uppercase.
2001db890098abcd18765bde033a0a42
2001:db89:0098:abcd:1876:5bde:033a:0a42
• - 8 Quartets
• - 4 Hex numbers per quartet
• - Each Hex number= 4 bits
Chapter1
5. Hexadecimal Number
5
By Chhay Buntha
Range number: 0 – F
=> 0 1 2 3 4 5 6 7 8 9 A B C D E F
10 11 12 13 14 15
200B
0010 0000 0000 1011
23 22 21 20
8 4 2 1
8 2 1 = 11
Chapter1
6. Abbreviating Rule 1: Omit Leading 0
6
By Chhay Buntha
The first rule to help reduce the notation of IPv6 addresses is to omit any leading 0s (zeros) in
any 16-bit section or hextet. For example:
01AB can be represented as 1AB
09F0 can be represented as 9F0
0A00 can be represented as A00
00AB can be represented as AB
This rule only applies to leading 0s, NOT to trailing 0s, otherwise the address would be
ambiguous. For example, the hextet “ABC” could be either “0ABC” or “ABC0”, but these do not
represent the same value.
2001:0DB8:0000:1111:0000:0000:0000:0200
2001:DB8:0:1111:0:0:0:200
Chapter1
7. Abbreviating Rule 2: Omit All 0 Segments
7
By Chhay Buntha
The second rule to help reduce the notation of IPv6 addresses is that a double colon (::) can replace any
single, contiguous string of one or more 16-bit segments (hextets) consisting of all 0s.
The double colon (::) can only be used once within an address, otherwise there would be more than
one possible resulting address. When used with the omitting leading 0s technique, the notation of IPv6
address can often be greatly reduced. This is commonly known as the compressed format.
Incorrect address:
2001:0DB8::ABCD::1234
Possible expansions of ambiguous compressed addresses:
2001:0DB8::ABCD:0000:0000:1234
2001:0DB8::ABCD:0000:0000:0000:1234
2001:0DB8:0000:ABCD::1234
2001:0DB8:0000:0000:ABCD::1234
0000:0000
Chapter1
9. IPv6 Prefix Length
9
By Chhay Buntha
2001:DB80:89CD:AB67:1234:ABCD:8901:FEB3
2001:DB80:89CD:AB67:0:0:0:0/64
16 16 16 16
2001:DB80:89CD:AB67::/64
Total number of IP can use = 18446744073709551616 (IP Addresses)
172.16.0.0/16 = 65536 IP Addresses
Chapter1
12. IPv6 Address Types
12
By Chhay Buntha
Unicast Address
Multicast Address
Anycast Address
Multicast - An IPv6 multicast address is used to send a single IPv6
packet to multiple destinations.
Unicast - An IPv6 unicast address uniquely identifies an interface on
an IPv6-enabled device.
Anycast - An IPv6 anycast address is any IPv6 unicast address that can
be assigned to multiple devices. A packet sent to an anycast address is
routed to the nearest device having that address.
Chapter1
13. IPv6 Address Types
13
By Chhay Buntha
Global Unicast Address
This address type is equivalent to IPv4’s public address. Global Unicast addresses in IPv6 are globally
identifiable and uniquely addressable.
Global Routing Prefix: The most significant 48-bits are designated as Global Routing Prefix which is assigned to
specific autonomous system. The three most significant bits of Global Routing Prefix is always set to 001.
Global Routing Prefix Subnet Interface ID
3 bits
2000::/3
(001)
45 bits 16 bits 64 bits
Provider Site Host
Chapter1
14. IPv6 Address Types
14
By Chhay Buntha
Link Local Address
Auto-configured IPv6 address is known as Link-Local address. This address always starts with FE80. The first 16
bits of link-local address is always set to 1111 1110 1000 0000 (FE80). The next 48-bits are set to 0, thus:
Link-local addresses are used for communication among IPv6 hosts on the same link (broadcast segment) only.
These addresses are not routable, so a Router never forwards these addresses outside the link.
Like an IPv4, Link Local Address like 169.254.x.x
Remain 54 bits = 0 Interface ID
3 bits
FE80::/10
54 bits 64 bits
Chapter1
15. IPv6 Address Types
15
By Chhay Buntha
Unique local
IPv6 Unique Local addresses are the addresses which can be used inside an enterprise company at multiple
sites. IPv6 Unique Local Addresses are reserved with a range of FC00::/7. A range of FC00::/7 means that IPv6
Unique Local addresses begin with 7 bits with exact binary pattern as 1111 110L.
If the value of single binary bit "L" is set to 1, the Unique local IPv6 multicast address is locally assigned. The
value 0 may be defined in the future. So we can have two Unique Local IPv6 Unicast Addresse prefixes. 1111
1100 (FC in hexadecimals) and 1111 1101 (FD in hexadecimals). Unique local IPv6 multicast addresses starting
with FD (L binary bit set to 1) are locally assigned.
Global Routing Prefix Subnet Interface ID
7 bits
FC00::/7
40 bits 16 bits 64 bits
1 bit
(L)
Chapter1
16. IPv6 Address Range
16
By Chhay Buntha
IP address 2001:db80:89cd:ab00::1:2/64
type GLOBAL-UNICAST
network 2001:db80:89cd:ab00::
Prefix length 64
network range
2001:db80:89cd:ab00:0000:0000:0000:0000-
2001:db80:89cd:ab00:ffff:ffff:ffff:ffff
total IP addresses 18446744073709551616
IP address (full) 2001:db80:89cd:ab00:0000:0000:0001:0002
Chapter1
17. IPv6 Address Range
17
By Chhay Buntha
IP address 2001:db80:89cd:ab00::1:2/48
type GLOBAL-UNICAST
network 2001:db80:89cd::
Prefix length 48
network range
2001:db80:89cd:0000:0000:0000:0000:0000-
2001:db80:89cd:ffff:ffff:ffff:ffff:ffff
total IP addresses 1208925819614629174706176
IP address (full) 2001:db80:89cd:ab00:0000:0000:0001:0002
Chapter1