Table of Contents |
You’ve already learned how computers use the binary number system (base 2) and how each position in a binary number represents a power of 2. The decimal system you use every day is base 10, with powers of 10.
In networking, there’s one more number system that becomes important: hexadecimal, or hex for short.
Hex is base 16, which means each digit represents a power of 16, just like each digit in a decimal number represents a power of 10. To support 16 possible values in one digit, hex uses numbers 0 through 9, and then adds the letters A through F for values 10 through 15.
| Hex Digit | Decimal Value |
|---|---|
| 0 | 0 |
| 1 | 1 |
| 2 | 2 |
| ... | ... |
| 9 | 9 |
| A | 10 |
| B | 11 |
| C | 12 |
| D | 13 |
| E | 14 |
| F | 15 |
To represent values higher than 9 using just one digit, hexadecimal adds the letters A through F. For example, A stands for 10, B for 11, and so on up to F for 15.
That’s why hexadecimal is so useful in networking: one hex digit equals exactly four binary digits. This makes it much easier to read and write long binary numbers. For example, the hex number 2A is just two characters, but its binary equivalent is 00101010—eight digits long.
A group of four binary digits is called a nibble, so each hex digit matches one nibble. And since a byte is eight bits, it equals two hex digits, or two nibbles.
Since hexadecimal is base 16, each digit’s value is based on a power of 16.
| Power | 16³ | 16² | 16¹ | 16⁰ |
|---|---|---|---|---|
| Value | 4096 | 256 | 16 | 1 |
Let’s convert a hex number to decimal using these values.
EXAMPLE
Convert 2A to decimal.
In networking, hexadecimal is used to represent long addresses in a readable format. This becomes especially important in IPv6, which uses 128-bit addresses. These longer addresses are written in hexadecimal to keep them readable and compact.
Every device that connects to a network needs a unique address. In earlier lessons, you learned about IPv4, which uses 32-bit addresses such as 192.168.1.1. A 32-bit address allows for about 4.3 billion unique combinations. That seemed like plenty when the internet was first developed.
However, today, billions of people use smartphones, tablets, laptops, smart TVs, and IoT devices. With so many devices connecting every day, the IPv4 address space became too small. In fact, it was officially exhausted in some regions more than a decade ago. To make IPv4 last longer, network administrators used techniques such as subnetting and private addressing to divide and reuse address space within local networks. While these strategies helped delay the problem, they also added complexity and required extra steps to connect devices to the wider internet. As networks grew, it became clear that a new solution was needed, one that could provide enough addresses for a global, always-connected world.
To solve this, IPv6 was developed. IPv6 stands for Internet Protocol Version 6, and it uses 128-bit addresses. That allows for about 340 undecillion unique combinations, a number so large it’s hard to imagine. This enormous range ensures that every device can have its own unique address, now and in the future. IPv6 also introduces a different way of writing and structuring addresses.
IPv6 addresses are written very differently from IPv4. Instead of four decimal numbers separated by dots, IPv6 addresses use eight groups of four hexadecimal digits, separated by colons. Each group, called a hextet, contains four hexadecimal digits and represents 16 bits of the total 128-bit address.
Here’s an example of a full IPv6 address:
2001:0db8:85a3:0000:0000:8a2e:0370:7334 An IPv6 address is usually divided into two equal halves.
Together, these two parts allow IPv6 to scale across global and local networks while still giving each device a unique address. The network prefix is used for routing data to the correct destination network, while the interface ID identifies the specific device within that network.
Because many IPv6 addresses include groups of zeros, there are two rules that make them shorter and easier to work with:
0db8 becomes db8. 0001 becomes 1. 2001:0db8:0000:0000:0000:0000:0000:0001 becomes 2001:db8::1. EXAMPLE
Here is the compressed version:2001:db8::8a2e:3702001:db8:0000:0000:0000:0000:8a2e:0370.2001:0db8:0000:0000:0000:0000:8a2e:0370
fe80::1
Now that you’ve seen how IPv6 addresses are written and structured, let’s compare them directly with IPv4.
| Feature | IPv4 | IPv6 |
|---|---|---|
| Address Length | 32 bits | 128 bits |
| Number of Addresses | About 4.3 billion | About 340 undecillion |
| Address Format | Decimal (e.g., 192.168.1.1) | Hexadecimal (e.g., 2001:db8::1) |
| Address Appearance | Short and dotted | Longer and colon separated |
| Address Availability | Limited | Extremely large and expandable |
IPv6 supports multiple types of addresses, each designed for a specific use. Just like IPv4 has public and private addresses, IPv6 includes address types for global communication, local device discovery, and internal networks. These address types help IPv6 work across large-scale internet systems and smaller local networks alike.
A global unicast address is the IPv6 equivalent of a public IPv4 address. It is globally unique, meaning no two devices on Earth share the same one, and it can be used to send and receive data across the internet.
These addresses usually start with a 2 or 3 in hexadecimal and fall under the 2000::/3 prefix range.
EXAMPLE
2001:0db8:85a3::8a2e:0370:7334
A device with a global unicast address can do the following:
A link-local address is used for communication between devices on the same local connection, called a link. A link is simply any network segment where devices can reach each other directly—for example, computers connected to the same switch, or devices on the same Wi-Fi network. No router is needed for this type of communication.
These addresses always begin with the prefix fe80::/10.
EXAMPLE
fe80::1c2b:fe2c:9a6e:8a1d
fe80, which is required for all link-local addresses. The remaining parts are typically generated automatically based on the device’s hardware (like its MAC address). Because it’s created locally, this address is guaranteed to be unique on that particular link.
ipconfig.
Link-local addresses are automatically generated by each device as soon as it joins a network. No setup is required. Because these addresses only work within the same local connection, they are not routable—meaning they can’t be used to reach devices on other networks or the internet.
Devices use link-local addresses for important local tasks such as the following:
A unique local address (ULA) is designed for private use within an organization, similar to private IPv4 ranges such as 192.168.x.x or 10.x.x.x. ULAs fall within the fc00::/7 block, and most begin with fd.
EXAMPLE
fd12:3456:789a::1
These addresses are not routed on the public internet. They are intended for communication inside a single company, school, or home network. They can also be used between internal systems that don’t need to connect to external websites or services.
One key feature of ULAs is that they are generated with a random 40-bit identifier, which helps avoid address conflicts when networks are merged or connected, something IPv4 private ranges don’t handle well.
ULAs are ideal in the following situations:
Together, these three address types help IPv6 handle all kinds of networking needs from global communication to internal management and local device discovery.
In addition to global and local communication, IPv6 supports several special address types that make networks more efficient and flexible. Each one plays a different role in how devices find each other, send data, and operate on both small and large networks.
A multicast address is used to send a single packet of data to multiple devices at once, such as sending a message to a group instead of one person at a time. This is more efficient than broadcasting to everyone or sending separate messages to each recipient.
All multicast addresses in IPv6 start with the prefix ff00::/8.
EXAMPLE
ff02::1 sends data to all devices on the local network.
Multicast is commonly used for the following purposes:
An anycast address is a special kind of IPv6 address that can be shared by multiple devices, usually in different locations. When data is sent to an anycast address, it is automatically delivered to the nearest device using that address, based on network distance, not physical location.
Anycast doesn’t have its own unique prefix. It looks just like a global unicast address, but the way it’s configured and used is what makes it different.
This setup helps websites and services for the following:
IPv6 also includes several special-purpose addresses that serve important roles during testing, setup, and compatibility with older systems. These addresses are not used to send data between devices on a network, but they support critical behind-the-scenes processes that help networks run smoothly.
The loopback address, written as ::1, is used when a device needs to send a message to itself. This allows the operating system or applications to test the device’s internal networking functions without needing to connect to anything else. For example, if a developer or network technician wants to check whether a device’s network software is working, they can use the loopback address to “ping” the device locally. This is the IPv6 version of the IPv4 loopback address 127.0.0.1.
The unspecified address, written as ::, means that a device does not yet have an IP address. Devices use this address temporarily, such as when they first join a network and request configuration information. For example, a new device might send a message from :: to a router, asking for an address. Because :: means “no address,” it signals that the device is still waiting to be assigned one.
An IPv4-mapped IPv6 address allows IPv6-enabled systems to talk to IPv4-only systems. These addresses combine both formats by placing the IPv4 address inside an IPv6 structure. For example, ::ffff:192.168.1.1 is an IPv6 address that includes the IPv4 address 192.168.1.1. This helps systems that support IPv6 continue to communicate with older devices that haven’t yet been upgraded.
Each of these special addresses plays a background role in making IPv6 networks more flexible, testable, and compatible with the wider internet, especially during the ongoing transition from IPv4 to IPv6.
Together, multicast, anycast, and special addresses help IPv6 networks run more efficiently and reliably. These address types support group communication, faster access to services, and important behind-the-scenes processes such as testing and setup. While they aren’t used in everyday browsing, they are key to keeping modern networks responsive, scalable, and well-organized. Overall, IPv6 provides the structure and flexibility needed to support a global internet with billions of connected devices, not only today but also well into the future.
Source: THIS TUTORIAL WAS AUTHORED BY SOPHIA LEARNING. PLEASE SEE OUR TERMS OF USE.