IPv6 addresses are represented in hexadecimal format as compared to dotted-decimal in IPv4.
Note: 32-bit IPv4 addresses are represented in 4 8-bit segments; each segment is written in decimal between 0 and 255 and separated with periods (dotted-decimal). 128-bit IPv6 addresses are represented in 8 16-bit segments; each segment is written in hexadecimal between 0x0000 and 0xFFFF and separated with colons.
IPv6 addresses and prefixes often contain successive hexadecimal fields of 0s. There are 2 zero compression rules available for shortening the size of written IPv6 addresses and prefixes:
i) The leading 0s (and not trailing 0s) in any 16-bit segment can be omitted. If a segment has fewer than 4 hexadecimal digits, it is assumed that the missing digits are leading 0s. If the 16-bit segment contains all 0s, a 0 must be left there.
ii) Successive 0s can be represented with a double colon (::); but this is allowed only once.
Ex: 2::/4 is an invalid abbreviation for 2000::/4, as it could represent 0x0002 or 0x2000; FE8::/10 is an invalid abbreviation for FE80::/10.
Ex: 2000:1111:0000:0000:0012:0000:0000:0001 can be written as 2000:1111:0:0:12::1 or 2000:1111::12:0:0:1.
An IPv6 host can have multiple IPv6 addresses, and an IPv6 network can have multiple prefixes. As like IPv4 prefixes, an IPv6 prefix represents the network part of an address, as well as a range or block of consecutive IPv6 addresses.
IPv4 addresses can be interpreted using either classful addressing or classless addressing rule. Classful addressing means that the interpretation of an IP address and subnet includes the idea of a classful network number, which is a separate network part of the IP address.
IPv4 Classful and Classless Addressing, and IPv6 Addressing
With classful rule, 18.104.22.168/24 would be interpreted as 16 network bits (Class B address), 8 subnet bits, and 8 host bits. When the same network address is interpreted with classless rule, it means prefix 22.214.171.124 with prefix length of 24. Both rules have same subnet or prefix, same meaning, same router operation, and same configuration. It is just 2 different ways of interpreting the meaning of numbers.
IPv6 uses a classless view of addressing, with no concept of classful addressing. Hence, it is no longer required to consider the classful boundaries of addresses, the default network bits or prefix lengths for different classes of addresses, etc for the operation of IPv6.
Below lists the IPv6 address types:
|Unicast||One-to-one mapping. A single source sends data to a single destination. A packet sent to a unicast address is delivered to the interface identified by the address. |
There are 3 main classes or types of IPv6 unicast addresses – Global Unicast, Unique-Local Unicast, and Link-Local Unicast.
|Multicast||One-to-many mapping. A packet sent to a multicast address is delivered to all interfaces (usually belong to different nodes) identified by a multicast group. The members of a multicast group may include only a single device, or all devices in a network. Unlike IPv4, there is no broadcast address in IPv6. The all-nodes multicast address (FF02::1) serves as the same purpose as a broadcast address.|
|Anycast||One-to-nearest and one to one-of-many mappings. A packet sent to an anycast address is delivered to the closest, nearest, and lowest-cost interface (as determined by the routing protocol metric) identified by the address. An anycast address represents a service rather than of a device; and the same anycast address can reside on one or more devices providing the same service. Devices with the same characteristics are assigned with the same anycast address. Routers deliver client requests and localize / scope the traffic to the nearest device. Anycast address cannot be used as the source address of an IPv6 packet. Anycast addresses are defined by their service function rather than format, and hence it can be any IPv6 unicast address of any scope. |
Note: The scopes of IPv6 unicast address are global, site-local, and link-local.