# Internet Protocol Version 6 (IPv6) ![[IPv6 - Wikipedia#^3om3az]] ![[IPv6 - Wikipedia#^gi814b]] ![[Internet Protocol#^g9p613]] ![[Internet Protocol#^1ni8sx]] A host determines if a packet's recipient is on the same network using its subnet and the recipient's IP address. If the recipient's IP is in the same subnet, the sender and the recipient are in the same network. The host then uses the [[NDP|Neighbor Discovery Protocol (NDP)]] to find the MAC address of the host, and wraps the packet into a data link layer frame addressed to the recipient's MAC address. In order to support IPv6, both the ISP and end-user networking equipment must support it. Sites like https://ipv6-test.com and https://test-ipv6.com can be used to verify that IPv6 is supported properly. ## IPv6 Addressing IPv6 addresses are 128 bits long, which allows each host to have a globally unique IP address, thus eliminating the need for [[NAT|Network Address Translation (NAT)]]. Network administrators are strongly encouraged to keep the subnets 64 bits long, leaving 64 bits for host IPs. This setup allows hosts to configure themselves automatically using [[SLAAC|Stateless Address Autoconfiguration (SLAAC)]]. IPv6 addresses are usually represented as 8 sections of 4 hex digits separated by colons. `::` can be used once per address, to represent multiple sections that contain only zeros. The leading zeros of section can be omitted. The subnet CIDR notation works the same as it does with IPv4. The following table outlines IPv6 address ranges. | Block | Description | | --------- | --------------------------------------------------------------------------------------------- | | 2000::/3 | Publicly routable unicast addresses (global unicast) | | fe80::/10 | Link local addresses.<br>Derived from MAC addresses and valid inside a broadcast domain only. | | ff00::0/8 | Multicast | | ff02::1 | The IPv6 equivalent of IPv4 broadcast | | fc00::/7 | IPv6 equivalent of RFC1918 addresses. Rarely used with IPv6. | | ::1 | Localhost | The following table describes the composition of the first 64 bits of publicly routable IPv6 unicast addresses. | Bits | Length<br>(bits) | Subnet | Description | | ----- | ---------------: | -----: | ------------------ | | 1-3 | 3 | /3 | IANA global prefix | | 4-23 | 20 | /23 | Regional registry | | 24-32 | 9 | /32 | Provider prefix | | 33-48 | 16 | /48 | Site prefix | | 49-64 | 16 | /64 | Subnet prefix | ## Address Assignment In IPv6 hosts can either assign their addresses automatically using [[SLAAC|Stateless Address Autoconfiguration (SLAAC)]], or have addresses assigned to them using [[DHCPv6]]. Unlike with IPv4, a host can have multiple addresses assigned to one interface at once. In fact it is standard practice to have link-local addresses assigned to every interface. ![[Link-Local Address - Wikipedia#^c42dzx]] ## Broadcasting in IPv6 ![[IPv6 - Wikipedia#^c3m4xz]]