Explanation of the IPv6 address space and other fundamentals.
Explanation of the IPv6 address space and other fundamentals.
The main difference of IPv6 over IPv4 is the extended address space, that is roughly 8*10^28 times larger. The reason for address space extension is caused by the IPv4 address exhaustion that became reality in 2011 when IANA allocated the last block of addresses to a regional address authority.
Every endpoint on the Internet requires a unique IP address to realize point-to-point connections. As of 2014, already more than 10*10^9 devices are connected to the Internet. To bypass the fact that there are not enough IPv4 addresses available, technologies like Network Address Translation (NAT) are used. NAT connects full TCP/IP networks using a single registered IPv4 address to the Internet.
An IPv4 address is composed of 4 decimal byte values in the so called dot-decimal notation. There are three IPv4 address types (the examples assume a netmask of 255.255.0.0):
10.41.0.0
10.41.255.255
10.41.0.23
An IPv6 address consists of 16 bytes organized in blocks of two bytes separated by : The most significant change in representation is the hexadecimal notation. Example:
2002:0a29:0017:0000:0000:ffff:0a29:0017
IPv6 addresses often contain fields of zeros. RFC5952 allows two methods to compress the textual representation to increase readability:
2002:0a29:0017::ffff:0a29:0017
2002:a29:17::ffff:a29:17
In the following section you will find a list of the various address types used in IPv6. The netIF_SetOption function allows you to change the unicast link-local address and a static address (which will typically a unicast global address).
IPv6 unicast global addresses are similar to IPv4 public addresses. They are globally routable. The structure of an IPv6 unicast global address creates a three-level topology of public and site information and the local host interface.
3 bits | 13 bits | 8 bits | 24 bits | 16 bits | 64 bits |
---|---|---|---|---|---|
001 | TLA | Reserved | NLA | SLA | Interface |
IPv6 unicast site-local addresses are similar to IPv4 private addresses. The scope of a site-local address is the intercommunication between subnets on an organization's site.
Addresses in the link-local prefix are only valid and unique on a single link. Within this prefix only one subnet is allocated (54 zero bits), yielding an effective format of fe80:
:/64. The least significant 64 bits are usually chosen as the interface hardware address constructed in modified EUI-64 format. It can be derived from an Ethernet MAC address.
0:0:0:0:0:0:0:1
6to4 addresses are used when two IPv6 nodes communicate on an IPv4 network.
00100000 000000010 | 32 bits | 16 bits | 64 bits |
---|---|---|---|
6to4 prefix | IPv4 Address | SLA | Interface |
The Neighbor Discovery Protocol (NDP) mainly replaces ARP known from IPv4. The main advantage is that it operates on the ICMP layer and is less dependent on the physical layer.
Rather than using e.g. MAC addresses, NDP uses the link local address. This also allows endpoints to keep router associations even if the global prefix of the network is changed. Link detection is also handled by NDP detecting full or partial link failures or routing failures.
Stateless Address Autoconfiguration (SLAAC) is part of NDP and mostly replaces dynamic address assignment technologies from IPv4 networks like DHCP and Auto-IP. SLAAC assigns the link-local address to an interface and uses this to assign a global IP. Typically this is a unicast address type. Main difference to DHCP is that after a router solicitation (a broadcast on the local network to discover available routers), SLAAC self-assigns an IP address using modified EUI-64. The Duplicate Address Detection tests this new address for duplicates on the network. DHCPv6 can replicate the stateful address assignment trough a single authority on the network to replace or extend SLAAC. It is similar to DHCP on IPv4 networks also advertising additional information like time servers, name servers and bootfile servers which would be missing using SLAAC only.