Skip to main content

11.3.4 IPv6 Basics

Learn the core concepts behind IPv6.

IPv6 was created as the solution to an ever creeping problem in the world of the Internet. As the population slowly grows and the more devices one person owns on average (phone, computer, smart watch, etc.), we need IP addresses to hand out to every single one of those devices. Since IPv4 addresses are limited to 32 bits, we're limited to 232 (4,294,967,296) possible addresses. In a world where the population (as of 2025) is 8 billion and counting, this isn't enough. Besides, most of the IP addresses are already reserved, so isn't possible to get any new ones. We're basically out of IP addresses.

IPv6 Address Structure

IPv76 uses 128-bit addresses that are split into eight 16-bit blocks. They're usually shortened using hexadecimal. Now, we have access to 2$^{128}$ (340,282,366,920,938,463,463,374,607,431,768,211,456) IP addresses!

Any (consecutive) 16-bit block(s) that's set to zero is represented in the human-readable IPv6 address with a double colon. This can only be done once per IPv6 address. Since it can only be done once, another simplification you can make is to remove the leading zeroes from each block. (e.g. e35c:2e53:be10:0000:0000:766c:0559:9c30 now becomes e35c:2e53:be10::766c:559:9c30)

IPv6 addresses are split across the middle into the Prefix and the Interface ID. These components are equivalent to the Network ID and Host ID of IPv4 addresses.

The Prefix can then be broken down even further for more information about the network where the host is located. The first 48 bits define the Site Prefix, which gives the location of the address as defined by the ISP. The next 16 bits are the Subnet ID, which the same thing as the subnet mask in IPv4 and tells us which network we're connected to. The last 64 bits represent the Interface ID, which is a unique identifier for the device itself, similar to the MAC address of every device hardcoded into the device's ROM.

Please refer to the updated MAC address derivation process here.**

Neighbor Discovery

IPv6 uses something called Neighbor Discovery, the IPv6 equivalent of IPv4's Address-Resolution-Protocol. Just like ARP's Broadcast and Reply packets used to discover neighbors, Network Discovery has it's own set of packets used to facilitate neighbor host discovery. All of these packets use the ICMPv6 encapsulation format.

  • Router Solicitation (type 133)
  • Router Advertisement (type 134)
  • Neighbor Solicitation (type 135)
  • Neighbor Advertisement (type 136)
  • Redirect Message (type 137)

#XI

#Aplus