Understanding IPv6 Addressing
Larger address space
The main advantage of IPv6 over IPv4 is its larger address space. The length of an IPv6 address is 128 bits, compared to 32 bits in IPv4. The address space therefore has 2128 or approximately 3.4×1038 addresses
Multicasting
Multicasting, the transmission of a packet to multiple destinations in a single send operation, is part of the base specification in IPv6. In IPv4 this is an optional although commonly implemented feature. IPv6 multicast addressing shares common features and protocols with IPv4 multicast, but also provides changes and improvements by eliminating the need for certain protocols. IPv6 does not implement traditional IP broadcast, i.e. the transmission of a packet to all hosts on the attached link using a special broadcast address, and therefore does not define broadcast addresses. In IPv6, the same result can be achieved by sending a packet to the link-local all nodes multicast group at address ff02::1, which is analogous to IPv4 multicast to address224.0.0.1. IPv6 also provides for new multicast implementations, including embedding rendezvous point addresses in an IPv6 multicast group address, which simplifies the deployment of inter-domain solutions.
Stateless address autoconfiguration (SLAAC)
IPv6 hosts can configure themselves automatically when connected to a routed IPv6 network using the Neighbour Discovery Protocol via Internet Control Message Protocol version 6 (ICMPv6) router discovery messages. When first connected to a network, a host sends a link-local router solicitation multicast request for its configuration parameters; if configured suitably, routers respond to such a request with a router advertisement packet that contains network-layer configuration parameters.
If IPv6 stateless address autoconfiguration is unsuitable for an application, a network may use stateful configuration with the Dynamic Host Configuration Protocol version 6 (DHCPv6) or hosts may be configured statically.
Network-layer security
Internet Protocol Security (IPsec) was originally developed for IPv6, but found widespread deployment first in IPv4, into which it was back-engineered. Earlier, IPsec was an integral part of the base IPv6 protocol suite, but has since been made optional.
Packet Format
An IPv6 packet has two parts: a header and payload.
The header consists of a fixed portion with minimal functionality required for all packets and may be followed by optional extensions to implement special features.
The fixed header occupies the first 40 octets (320 bits) of the IPv6 packet. It contains the source and destination addresses, traffic classification options, a hop counter, and the type of the optional extension or payload which follows the header. This Next Header field tells the receiver how to interpret the data which follows the header. If the packet contains options, this field contains the option type of the next option. The "Next Header" field of the last option, points to the upper-layer protocol that is carried in the packet's payload.
Extension headers carry options that are used for special treatment of a packet in the network, e.g., for routing, fragmentation, and for security using the IPsec framework.
Address format
An IPv6 address is represented by 8 groups of 16-bit values, each group represented as 4 hexadecimal digits and separated by colons (:).
The hexadecimal digits are not case-sensitive
An IPv6 address may be abbreviated by using one or more of the following rules:
1. Remove one or more leading zeroes from one or more groups of hexadecimal digits; this is usually done to either all or none of the leading zeroes.
2. Omit one or more consecutive sections of zeroes, using a double colon (::) to denote the omitted sections. The double colon may only be used once in any given address, as the address would be indeterminate if the double colon was used multiple times.
Below is an example of these rules:
Address 2001 : 0db8 : 0000 : 0000 : 0000 : ff00 : 0042 : 8329
With Rule 1 applied to its fullest extent (all leading zeroes removed) 2001 : db8 : 0 : 0 : 0 : ff00 : 42 : 8329
With Rule 2 applied to its fullest extent (the most consecutive sections of zeroes omitted) 2001 : 0db8 : : ff00 : 0042 : 8329
With the above 2 actions combined 2001 : db8 : : ff00 : 42 : 8329
Below are the text representations of these addresses:
Initial address: 2001:0db8:0000:0000:0000:ff00:0042:8329
Simplified address: 2001:db8::ff00:42:8329
Initial address: 0000:0000:0000:0000:0000:0000:0000:0001
After removing all leading zeroes: 0:0:0:0:0:0:0:1
After omitting consecutive sections of zeroes: ::0001
Simplified address: ::1
Larger address space
The main advantage of IPv6 over IPv4 is its larger address space. The length of an IPv6 address is 128 bits, compared to 32 bits in IPv4. The address space therefore has 2128 or approximately 3.4×1038 addresses
Multicasting
Multicasting, the transmission of a packet to multiple destinations in a single send operation, is part of the base specification in IPv6. In IPv4 this is an optional although commonly implemented feature. IPv6 multicast addressing shares common features and protocols with IPv4 multicast, but also provides changes and improvements by eliminating the need for certain protocols. IPv6 does not implement traditional IP broadcast, i.e. the transmission of a packet to all hosts on the attached link using a special broadcast address, and therefore does not define broadcast addresses. In IPv6, the same result can be achieved by sending a packet to the link-local all nodes multicast group at address ff02::1, which is analogous to IPv4 multicast to address224.0.0.1. IPv6 also provides for new multicast implementations, including embedding rendezvous point addresses in an IPv6 multicast group address, which simplifies the deployment of inter-domain solutions.
Stateless address autoconfiguration (SLAAC)
IPv6 hosts can configure themselves automatically when connected to a routed IPv6 network using the Neighbour Discovery Protocol via Internet Control Message Protocol version 6 (ICMPv6) router discovery messages. When first connected to a network, a host sends a link-local router solicitation multicast request for its configuration parameters; if configured suitably, routers respond to such a request with a router advertisement packet that contains network-layer configuration parameters.
If IPv6 stateless address autoconfiguration is unsuitable for an application, a network may use stateful configuration with the Dynamic Host Configuration Protocol version 6 (DHCPv6) or hosts may be configured statically.
Network-layer security
Internet Protocol Security (IPsec) was originally developed for IPv6, but found widespread deployment first in IPv4, into which it was back-engineered. Earlier, IPsec was an integral part of the base IPv6 protocol suite, but has since been made optional.
Packet Format
An IPv6 packet has two parts: a header and payload.
The header consists of a fixed portion with minimal functionality required for all packets and may be followed by optional extensions to implement special features.
The fixed header occupies the first 40 octets (320 bits) of the IPv6 packet. It contains the source and destination addresses, traffic classification options, a hop counter, and the type of the optional extension or payload which follows the header. This Next Header field tells the receiver how to interpret the data which follows the header. If the packet contains options, this field contains the option type of the next option. The "Next Header" field of the last option, points to the upper-layer protocol that is carried in the packet's payload.
Extension headers carry options that are used for special treatment of a packet in the network, e.g., for routing, fragmentation, and for security using the IPsec framework.
Address format
An IPv6 address is represented by 8 groups of 16-bit values, each group represented as 4 hexadecimal digits and separated by colons (:).
The hexadecimal digits are not case-sensitive
An IPv6 address may be abbreviated by using one or more of the following rules:
1. Remove one or more leading zeroes from one or more groups of hexadecimal digits; this is usually done to either all or none of the leading zeroes.
2. Omit one or more consecutive sections of zeroes, using a double colon (::) to denote the omitted sections. The double colon may only be used once in any given address, as the address would be indeterminate if the double colon was used multiple times.
Below is an example of these rules:
Address 2001 : 0db8 : 0000 : 0000 : 0000 : ff00 : 0042 : 8329
With Rule 1 applied to its fullest extent (all leading zeroes removed) 2001 : db8 : 0 : 0 : 0 : ff00 : 42 : 8329
With Rule 2 applied to its fullest extent (the most consecutive sections of zeroes omitted) 2001 : 0db8 : : ff00 : 0042 : 8329
With the above 2 actions combined 2001 : db8 : : ff00 : 42 : 8329
Below are the text representations of these addresses:
Initial address: 2001:0db8:0000:0000:0000:ff00:0042:8329
Simplified address: 2001:db8::ff00:42:8329
Initial address: 0000:0000:0000:0000:0000:0000:0000:0001
After removing all leading zeroes: 0:0:0:0:0:0:0:1
After omitting consecutive sections of zeroes: ::0001
Simplified address: ::1