Getting Started with IPv6: The Next Generation of IP Addressing

PitsPits
38 min read

If you’ve been studying networking, you’ve probably heard that IPv4 addresses are running out. That’s where IPv6 comes in. It’s the newer version of the Internet Protocol, designed to replace IPv4 and solve the problem of address exhaustion. But IPv6 is more than just “more addresses”, it also brings better efficiency, improved security features, and a design that fits the growing needs of today’s internet.

In this blog, we’ll break down what IPv6 is, why it exists, and how it works, all in a way that’s easy to understand even if you’re just getting started with networking.


Before we jump deeper into IPv6, you might be wondering what happened to IPv5? Did we just skip it?

IPv5 actually existed, but it was never a public replacement for IPv4. It was an experimental protocol called the Internet Stream Protocol (ST or ST2) developed in the late 1970s and 1980s. Its main goal was to handle streaming services like voice and video over the internet, which wasn’t a common thing back then. IPv5 used a similar 32-bit addressing system as IPv4, so it had the same limitation: a small number of available addresses.

Because of this limitation, IPv5 couldn’t solve the address shortage problem. It remained in experimental use and was never widely adopted. That’s why we moved on to IPv6, which uses a completely different addressing system that can support an almost unlimited number of devices.


Understanding Decimal, Binary, and Hexadecimal (and How to Convert Them)

Since IPv6 addresses look different from the IPv4 addresses we’re used to, you’ll notice they contain both numbers and letters. This is because IPv6 is written in hexadecimal, which is directly linked to binary; the language computers understand. To make sense of IPv6, you first need to know how decimal, binary, and hexadecimal work, and how to convert between them.

1. Decimal
Decimal is the number system we use every day. It has 10 digits: 0 to 9.
Example: 245 in decimal simply means 2 hundreds, 4 tens, and 5 ones.

2. Binary
Binary is the base-2 system. It has only 2 digits: 0 and 1.
Each digit is called a “bit,” and every bit represents a power of 2.
Example: 1010 in binary means:

(1 × 8) + (0 × 4) + (1 × 2) + (0 × 1) = 8 + 0 + 2 + 0 = 10 in decimal

3. Hexadecimal
Hexadecimal (or “hex”) is a base-16 system. It has 16 symbols: 0–9 and A–F (where A=10, B=11, …, F=15 in decimal).
Example: A in hex = 10 in decimal.


How to Convert

Decimal → Binary

  • Divide the decimal number by 2 repeatedly.

  • Write the remainders in reverse order.
    Example: 13 → remainders give 1101 in binary.

Binary → Decimal

  • Multiply each bit by powers of 2, starting from the right with 2⁰.
    Example: 1101(1×8) + (1×4) + (0×2) + (1×1) = 13 decimal.

Binary → Hexadecimal

  • Group binary digits into sets of 4 from right to left.

  • Convert each group to decimal, then to hex.
    Example: 101011111010 1111A F in hex → AF.

Hexadecimal → Binary

  • Convert each hex digit to its 4-bit binary form.
    Example: 2B2 = 0010, B = 101100101011 in binary.

In IPv6, these conversions are key because an IPv6 address is essentially a 128-bit binary number written in hexadecimal for convenience. Without hex, we’d be looking at an endless stream of 0s and 1s.


Now that we understand the number systems behind IPv6, let’s talk about the big question; why do we even need IPv6 in the first place?

The main reason is simple: IPv4 addresses are running out. IPv4 uses a 32-bit address, which gives about 4.3 billion possible unique addresses. That might sound like a lot, but with billions of people, devices, and “smart” gadgets connecting to the internet, that pool has been drying up for years.

IPv6 was created to solve this problem by using 128-bit addresses. This allows for an almost unimaginable number of unique addresses enough to give every person on Earth trillions of their own. But IPv6 wasn’t just about more addresses. It was also built to:

  • Handle the growth of the internet without running into limits.

  • Simplify network configuration, with features like automatic address assignment.

  • Improve security with built-in support for IPsec.

  • Work better with modern devices and future technologies.

In short, IPv6 is the foundation for the internet’s future; faster, bigger, and more secure.


Shortening IPv6 Addresses

When you first see an IPv6 address, it might look overwhelming because it’s long and filled with numbers and letters. For example:

2001:0db8:0000:0000:0000:ff00:0042:8329

IPv6 has rules to shorten addresses without changing their meaning, making them easier to read and write. Here’s how:

1. Remove Leading Zeros
In each block (separated by colons), you can remove zeros at the start of the block.
Example:

2001:0db8:0000:0000:0000:ff00:0042:8329  
↓ remove leading zeros in each block  
2001:db8:0:0:0:ff00:42:8329

2. Use Double Colon (::) for Consecutive Zeros
If you have two or more consecutive blocks of zeros, replace them with ::.
Example:

2001:db8:0:0:0:ff00:42:8329  
↓ replace the longest sequence of consecutive zeros with ::  
2001:db8::ff00:42:8329

Important: You can only use :: once in an address. If there are multiple zero groups, choose the longest one to shorten.

3. Final Shortened Version
From the original:

2001:0db8:0000:0000:0000:ff00:0042:8329  
↓ shortened  
2001:db8::ff00:42:8329

By following these rules, IPv6 addresses become much easier to work with.


Expanding IPv6 Addresses

Just like we can shorten an IPv6 address, we can also expand it back to its full form. This is useful when you need to clearly see all the values or work with tools that require the complete format.

Let’s take our shortened example:

2001:db8::ff00:42:8329

Here’s how to expand it:

1. Replace :: with the Missing Blocks
:: means one or more groups of 0000. To expand, count how many blocks are missing and fill them in with 0000 until you have 8 blocks total.

Example:

  • Current blocks: 2001 | db8 | ff00 | 42 | 8329 (5 blocks)

  • IPv6 needs 8 blocks, so we add 3 blocks of 0000 where :: is.

Result:

2001:db8:0000:0000:0000:ff00:0042:8329

2. Add Leading Zeros Back
Each block should have exactly 4 characters. Add zeros at the start if the block has fewer.

Example:

  • db80db8

  • 420042

Final Expanded Address:

2001:0db8:0000:0000:0000:ff00:0042:8329

Summary Rule:

  • IPv6 always has 8 blocks of 4 hex digits.

  • :: fills in the missing 0000 blocks.

  • Add zeros to the start of each block until it has 4 characters.


Finding the IPv6 Prefix (Global Unicast Address)

Now that you know how to read, shorten, and expand IPv6 addresses, let’s look at how to identify the prefix specifically for a Global Unicast Address. This will help you understand which part belongs to the network and which part belongs to the host.

1. Parts of an IPv6 Address
An IPv6 address is 128 bits long, written in hexadecimal. It’s divided into two main parts:

  • Network Prefix – Identifies the network segment.

  • Interface ID – Identifies the specific device (host) on that network.

A Global Unicast Address often looks like this:

2001:0db8:85a3:0000:0000:8a2e:0370:7334/64

The /64 at the end is the prefix length. It tells us how many bits from the start belong to the network.

2. Understanding the Prefix Length
The prefix length works like the subnet mask in IPv4.

  • /64 means the first 64 bits are for the network prefix.

  • The remaining 64 bits are for the Interface ID (host portion).

In binary, the first /64 bits are fixed for the network, and the rest can vary for different devices.

3. How to Find the Prefix

  • Look at the address and its prefix length.

  • Keep the first /x bits the same. That’s your network prefix.

  • Set the remaining bits to zero if you want to write just the network address.

Example:

IPv6 Address: 2001:0db8:85a3:0000:0000:8a2e:0370:7334/64
Prefix: 2001:0db8:85a3:0000::/64

Here, 2001:0db8:85a3:0000 is the network prefix, and the rest identifies the host.

4. Global Unicast Range
Global Unicast Addresses typically start with 2 or 3 in the first hex digit (e.g., 2000::/3). These are the IPv6 equivalent of public IPv4 addresses routable on the internet.


Examples:

Image credits: jeremysitlab


Configuring an IPv6 Address on a Router (CLI)

Now that we understand IPv6 structure, shortening, expanding, and prefixes, let’s see how it looks in action by configuring an IPv6 address on a router using the CLI. This will help you connect theory to real-world application.


1. Enter Global Configuration Mode
On your router, you first go into the global config mode:

Router> enable
Router# configure terminal

2. Go to the Interface
Decide which interface you want to configure (e.g., GigabitEthernet 0/0):

Router(config)# interface gigabitethernet 0/0

3. Assign the IPv6 Address and Prefix
Use the ipv6 address command followed by the IPv6 address and its prefix length:

Router(config-if)# ipv6 address 2001:db8:1:1::1/64

4. Enable the Interface
By default, an interface may be administratively down. Enable it with:

Router(config-if)# no shutdown

5. (Optional) Enable IPv6 Routing
Some routers require you to turn on IPv6 routing before it works:

Router(config)# ipv6 unicast-routing

Example Final Configuration:

Router> enable
Router# configure terminal
Router(config)# ipv6 unicast-routing
Router(config)# interface gigabitethernet 0/0
Router(config-if)# ipv6 address 2001:db8:1:1::1/64
Router(config-if)# no shutdown

With this, your router interface now has an IPv6 address and is ready to communicate over IPv6.


Verifying IPv6 Configuration and Understanding Key Commands

Once you’ve configured IPv6 on a router, you’ll want to confirm it’s set up correctly. That’s where a few key commands and concepts come in.


1. show ipv6 interface brief
This command shows a quick summary of all interfaces on the router, their IPv6 addresses, and their operational status.

Example output:

Router# show ipv6 interface brief
GigabitEthernet0/0 [up/up]
    FE80::1        // Link-Local Address
    2001:DB8:1:1::1
GigabitEthernet0/1 [administratively down/down]
    unassigned

From this, you can check:

  • If the interface is up/up (physically connected and administratively enabled).

  • The IPv6 addresses assigned (both Link-Local and Global Unicast).


2. ipv6 unicast-routing
This is a global configuration command that enables IPv6 routing on the router. Without it, the router can have IPv6 addresses but won’t actually forward IPv6 packets between interfaces. Think of it as the “on” switch for IPv6 routing.


3. Link-Local Address
A Link-Local Address is an IPv6 address that’s automatically assigned to every IPv6-enabled interface. You don’t need to configure it. The router creates it as soon as IPv6 is enabled.

  • Purpose: It’s used for communication between devices on the same link (local network segment). It cannot be routed on the internet.

  • Range: Always starts with FE80::/10.

  • Example:

FE80::1
FE80::C001:15FF:FE12:3456

You’ll always see a Link-Local Address when you run show ipv6 interface brief, even if you haven’t manually assigned a Global Unicast Address.


Configuring an IPv6 Address Using EUI-64

Now that we’ve covered manual IPv6 configuration, let’s look at another method: EUI-64. This method automatically generates the Interface ID portion of an IPv6 address using the interface’s MAC address. It’s a quick way to assign a unique address without typing the full 128 bits yourself.


1. What is EUI-64?
EUI-64 (Extended Unique Identifier – 64-bit) is a way to create the second half (64 bits) of an IPv6 address from the device’s 48-bit MAC address. It keeps the network prefix you provide and fills in the rest using a calculated Interface ID.

For example, if you have the network:

2001:db8:1:1::/64

You can tell the router:

Router(config-if)# ipv6 address 2001:db8:1:1::/64 eui-64

The router will then generate the Interface ID automatically.


2. How the MAC Address is Converted

Let’s say the MAC address is:

AA-BB-CC-DD-EE-FF

Here’s the step-by-step process:

  1. Split the MAC in half
AA-BB-CC  |  DD-EE-FF
  1. Insert FFFE in the middle
AA-BB-CC-FF-FE-DD-EE-FF
  1. Flip the 7th bit of the first byte (this changes the Universal/Local bit):
  • First byte in hex: AA → in binary: 10101010

  • Flip the 7th bit: 1010101010101000 (binary)

  • Convert back to hex: A8

Result after flipping:

A8-BB-CC-FF-FE-DD-EE-FF
  1. Write it in IPv6 format (group into 16-bit blocks and convert to hex if needed):
A8BB:CCFF:FEDD:EEFF

3. Example Final IPv6 Address with EUI-64
If the network prefix is 2001:db8:1:1::/64, the final address will be:

2001:db8:1:1:A8BB:CCFF:FEDD:EEFF

With EUI-64, you don’t have to manually calculate, the router does these steps automatically once you use the eui-64 keyword.


Configuring an IPv6 Address with EUI-64 on a Router (CLI)

Now that you know what EUI-64 is and how it works, let’s see how to configure it on a router. The good news is you don’t have to manually calculate anything, the router will generate the Interface ID for you once you use the eui-64 option.

1. Enable IPv6 Routing
Before assigning IPv6 addresses, make sure IPv6 routing is turned on:

Router> enable
Router# configure terminal
Router(config)# ipv6 unicast-routing

2. Go to the Desired Interface
Choose the interface you want to configure, for example GigabitEthernet 0/0:

Router(config)# interface gigabitethernet 0/0

3. Assign the IPv6 Address with EUI-64
Use the network prefix followed by /64 and the eui-64 keyword:

Router(config-if)# ipv6 address 2001:db8:1:1::/64 eui-64

The router will take the interface’s MAC address, apply the EUI-64 process, and create the Interface ID automatically.


4. Bring the Interface Up

Router(config-if)# no shutdown

5. Verify the Configuration
Use show ipv6 interface brief to confirm the address:

Router# show ipv6 interface brief
GigabitEthernet0/0 [up/up]
    FE80::A8BB:CCFF:FEDD:EEFF  // Link-Local
    2001:DB8:1:1:A8BB:CCFF:FEDD:EEFF  // Global Unicast (EUI-64)

With that, your router is now configured with an IPv6 address using EUI-64.


Why We Invert the 7th Bit in EUI-64

When we create an IPv6 address using EUI-64, part of the process is flipping (inverting) the 7th bit of the first byte of the MAC address. This bit is called the Universal/Local (U/L) bit, and it tells us whether the MAC address is:

  • Universally Administered Address (UAA) – Assigned by the manufacturer and globally unique.

  • Locally Administered Address (LAA) – Manually set by a network administrator and only meaningful within a local network.


1. Where is the 7th Bit?

  • A MAC address has 48 bits, usually written in hex (e.g., AA-BB-CC-DD-EE-FF).

  • The first byte (the first two hex digits) contains two important bits:

    • I/G bit (1st bit): Indicates if the address is Individual or Group.

    • U/L bit (7th bit): Indicates Universal (0) or Local (1).


2. Why Flip It?
When converting a MAC address to an IPv6 Interface ID, the standard (RFC 4291) requires us to invert the U/L bit.

  • If the MAC was originally a UAA (bit = 0), flipping it to 1 means “this Interface ID was generated locally.”

  • If the MAC was originally an LAA (bit = 1), flipping it to 0 would indicate “this came from a universal assignment.”

This ensures that the IPv6 Interface ID clearly signals it was created using EUI-64 and not copied directly from the MAC without modification.


3. Example
MAC address first byte: AA (in hex) = 10101010 (binary)

  • The 7th bit is 1 (counting from left: bit positions are 1–8).

  • Flip it to 0: 10101000 (binary) → A8 (hex).

The rest of the MAC stays the same, with FFFE inserted in the middle.


Global Unicast Address in IPv6

Now that we’ve talked about EUI-64 and how IPv6 addresses are formed, let’s look at one of the most common IPv6 address types you’ll see: the Global Unicast Address.


1. What is a Global Unicast Address?
A Global Unicast Address is the IPv6 equivalent of a public IPv4 address. It’s unique across the entire internet and can be routed globally. Devices with these addresses can communicate with any other device on the internet, provided routing and firewall rules allow it.


2. Key Characteristics

  • Prefix: Always starts with 2000::/3

    • This means any address starting from 2000 to 3FFF in the first 16 bits is a Global Unicast Address.
  • Uniqueness: Guaranteed to be unique worldwide.

  • Routable: Can travel across the internet, unlike Link-Local addresses which stay within the same network link.

  • Assigned by: Usually given by your ISP or network administrator.


3. Structure
A Global Unicast Address is divided into parts:

| Global Routing Prefix | Subnet ID | Interface ID |
  • Global Routing Prefix – Identifies your network on the internet (given by ISP).

  • Subnet ID – Lets you divide your network into smaller sections.

  • Interface ID – Identifies a specific device’s interface (can be made with EUI-64 or manually assigned).


4. Example

2001:db8:1234:1::1/64
  • 2001:db8:1234 → Global Routing Prefix

  • 1 → Subnet ID

  • ::1 → Interface ID (shortened form)


Image credits: jeremysitlab


Unique Local Address in IPv6

After learning about Global Unicast Addresses, which are routable across the internet, let’s talk about another type: the Unique Local Address (ULA).


1. What is a Unique Local Address?
A Unique Local Address is the IPv6 version of a private IPv4 address (like 192.168.x.x or 10.x.x.x). It’s meant for communication within a private network and is not routable on the public internet.


2. Key Characteristics

  • Prefix: Always starts with FC00::/7

    • This means any address beginning with FC or FD in the first two hex digits is a ULA.
  • Scope: Works only inside a private network, between your devices and internal routers.

  • Uniqueness: Designed to be unique within your network so you don’t have conflicts.

  • Internet Routing: Not forwarded by internet routers.


3. Structure

| Prefix (7 bits) | L bit (1 bit) | Global ID (40 bits) | Subnet ID (16 bits) | Interface ID (64 bits) |
  • L bit: Indicates whether the address is locally assigned (usually set to 1).

  • Global ID: Randomly generated to make the address unique inside your organization.

  • Subnet ID: Lets you break the network into smaller sections.

  • Interface ID: Identifies a device on the subnet.


4. Example

FD12:3456:789A:1::1/64
  • FD12:3456:789A → ULA prefix with Global ID

  • 1 → Subnet ID

  • ::1 → Interface ID


In short:

  • Use Global Unicast for internet-facing communication.

  • Use Unique Local Address for internal-only communication.


Image credits: jeremysitlab


We’ve covered Global Unicast (public) and Unique Local (private) addresses. Now let’s look at the third type every IPv6-enabled device has by default; the Link-Local Address.


1. What is a Link-Local Address?
A Link-Local Address is an IPv6 address that is only valid on the local network segment (link). It’s automatically assigned to every IPv6 interface, even if you don’t configure any address manually. Devices use it to communicate with neighbors on the same link and for essential IPv6 functions like routing and neighbor discovery.


2. Key Characteristics

  • Prefix: Always starts with FE80::/10

    • This means the first 10 bits are 1111111010 in binary.
  • Automatic Assignment: No DHCP or manual setup required. Your device generates it automatically.

  • Scope: Works only within a single link; routers will not forward these packets to other networks.

  • Mandatory: Every IPv6-enabled interface has at least one Link-Local Address.


3. Structure

FE80::/10 + Interface ID

The Interface ID can be generated using EUI-64 or assigned manually.


4. Example

FE80::A8BB:CCFF:FEDD:EEFF

If two devices are on the same switch or Wi-Fi network, they can talk to each other using just their Link-Local addresses.


5. When is it Used?

  • Initial communication between IPv6 devices before they get a Global or Unique Local Address.

  • Router-to-router communication for exchanging routing protocols (like OSPFv3 or EIGRP for IPv6).

  • Testing and troubleshooting within a local network.


The ipv6 enable Command in IPv6

The ipv6 enable command is used in Cisco IOS to activate IPv6 processing on an interface and automatically assign it a Link-Local Address.


1. What It Does

  • Turns on IPv6 for that specific interface.

  • Generates a Link-Local Address (starting with FE80::/10) if one does not already exist.

  • Allows the interface to send and receive IPv6 traffic even if no Global or Unique Local Address is assigned.


2. When to Use It

  • If you only need IPv6 Link-Local communication on an interface.

  • When you want to enable IPv6 features without assigning a manual IPv6 address.

  • For testing or running routing protocols that work over Link-Local addresses.


3. How to Use It
Example:

Router> enable
Router# configure terminal
Router(config)# interface gigabitethernet 0/0
Router(config-if)# ipv6 enable

4. Verification
After enabling it, check the interface:

Router# show ipv6 interface brief
GigabitEthernet0/0 [up/up]
    FE80::A8BB:CCFF:FEDD:EEFF

You’ll see a Link-Local Address assigned automatically.

If you assign a manual IPv6 address using ipv6 address ..., the interface also automatically gets a Link-Local so ipv6 enable is mostly used when you want Link-Local only, without a global IPv6 address.


IPv6 Multicast Addresses and Their Scope

So far, we’ve talked about unicast and link-local addresses, which send traffic to a single destination. Now let’s look at multicast addresses, which are designed to send traffic to a group of devices at once.


1. What is a Multicast Address?
A multicast address in IPv6 identifies a group of interfaces that should receive the same packet. Instead of sending multiple copies to each device, IPv6 sends one packet, and the network delivers it to all members of that group.


2. Key Characteristics

  • Prefix: All multicast addresses start with FF00::/8.

  • No Broadcast in IPv6: IPv6 doesn’t have broadcast addresses like IPv4. Instead, multicast handles broadcast-like functions more efficiently.

  • Group Membership: Devices can join or leave multicast groups dynamically.


3. Structure of a Multicast Address

| 11111111 (8 bits) | Flags (4 bits) | Scope (4 bits) | Group ID (112 bits) |
  • 11111111: Fixed prefix for all IPv6 multicast addresses (FF in hex).

  • Flags: Control bits for special uses (most common value is 0000).

  • Scope: Indicates how far the multicast traffic can travel.

  • Group ID: Identifies the multicast group.


4. Multicast Scope Values
The scope field limits how far multicast traffic is forwarded:

Scope ValueNameDescription
1Interface-LocalStays within the same interface
2Link-LocalStays within the same link (LAN segment)
5Site-LocalWithin the same site or organization
8Organization-LocalAcross multiple sites in the same org
E (14)GlobalCan be routed across the internet

5. Examples

  • FF02::1 – All nodes on the local link

  • FF02::2 – All routers on the local link

  • FF05::2 – All routers in the same site


Image credits: jeremysitlab


Multicast Address Scope

Image credits: jeremysitlab

Image credits: jeremysitlab


IPv6 Anycast Address

We’ve covered unicast (one-to-one) and multicast (one-to-many). Now let’s talk about the third type of IPv6 address: the Anycast Address.


1. What is an Anycast Address?
An Anycast Address is assigned to multiple interfaces, usually on different devices, but it represents a single address. When a packet is sent to an Anycast Address, it is delivered to the nearest interface (in terms of routing distance) that has that address.


2. Key Characteristics

  • Uses Unicast Format: Anycast addresses look just like unicast addresses. There’s no special prefix to indicate “this is Anycast.”

  • Routing Decision: The “nearest” device is chosen based on the routing table, not geographic location.

  • One-to-One-of-Many: The sender talks to only one device, but which device depends on the network topology.

  • Common Use Cases:

    • Load balancing between servers.

    • Fast DNS resolution (multiple DNS servers share the same Anycast address).

    • Distributing client requests to the nearest content delivery network (CDN) node.


3. Example
Imagine three DNS servers in different locations all share the Anycast address 2001:db8::53.

  • A client in New York gets routed to the server in New York.

  • A client in Tokyo gets routed to the server in Tokyo.

  • Both are using the same IPv6 address, but each reaches the nearest one.


4. Key Difference from Multicast

  • Anycast: One device (nearest) responds.

  • Multicast: All members of the group receive the packet.


Anycast Address Configuration


Other IPv6 Addresses: Unspecified and Loopback

We’ve covered the main IPv6 address types; unicast, multicast, and anycast but there are also a couple of special addresses you’ll run into when working with IPv6: the unspecified address and the loopback address.


1. The Unspecified Address (::/128)

  • What it is: An address with all 128 bits set to zero.

  • Written as: ::

  • Purpose: Used when a device doesn’t yet have an IPv6 address and needs to indicate “no address.”

  • Common usage:

    • In a device’s configuration during the initial setup before it gets an address.

    • As a source address in some messages like DHCPv6 requests.

  • Important: You can’t assign this address to an interface, and it’s never used as a destination.


2. The Loopback Address (::1/128)

  • What it is: The IPv6 equivalent of IPv4’s 127.0.0.1.

  • Written as: ::1

  • Purpose: Allows a device to send packets to itself.

  • Common usage:

    • Testing IPv6 configuration locally on a machine or router without using the network.

    • Verifying that the IPv6 stack is functioning.

  • Example:

      ping ::1
    

    This should always succeed if IPv6 is enabled on the device.

These two addresses are simple, but they’re essential for troubleshooting and understanding IPv6 behavior.


IPv6 Address Representation and RFC 5952

Now that we’ve gone through different IPv6 address types and special addresses, let’s talk about how IPv6 addresses should be written consistently. This is where RFC 5952 comes in. It provides the official guidelines for representing IPv6 addresses in a clear, standardized way.


1. What is RFC 5952?
RFC 5952 is a set of rules published by the Internet Engineering Task Force (IETF) that defines the recommended way to write IPv6 addresses. Its goal is to reduce confusion and make addresses easier to read and compare.


2. Key Rules from RFC 5952

  • Use lowercase letters: Hex digits a to f should be in lowercase.

  • Shortest possible representation:

    • Use the :: abbreviation to compress the longest run of consecutive zero blocks, but only once per address.

    • Remove leading zeros in each block.

  • No unnecessary zeros: Avoid writing zeros that don’t add value (like 0db8 should be db8).

  • No extra colons or leading zeros: Stick exactly to the rules, don’t add extra characters or spaces.


3. Why It Matters
Following RFC 5952 ensures:

  • Consistency across documentation, configs, and tools.

  • Less chance of errors when copying or typing addresses.

  • Easier reading and comparison of addresses.


4. Example
Given this IPv6 address:

2001:0DB8:0000:0000:0000:0000:1428:57AB

RFC 5952 recommends writing it as:

2001:db8::1428:57ab

This standardized way of writing IPv6 addresses helps everyone stay on the same page whether you’re configuring devices, reading logs, or sharing addresses.


Understanding the IPv6 Header

Now that we’re comfortable with IPv6 addresses and how they’re represented, let’s take a look at the IPv6 header; the part of the packet that carries important information about routing and delivery.


1. What is the IPv6 Header?
The IPv6 header is the first part of every IPv6 packet. It contains essential data that helps routers and devices understand where the packet is from, where it’s going, and how to handle it.


2. IPv6 Header Basics
Compared to IPv4, the IPv6 header is:

  • Simpler and fixed in size (40 bytes) making processing faster.

  • Designed to support new features and improve performance.


3. Key Fields in the IPv6 Header

  • Version (4 bits): Always set to 6 for IPv6.

  • Traffic Class (8 bits): Used to prioritize packets (like QoS).

  • Flow Label (20 bits): Identifies packet flows for special handling.

  • Payload Length (16 bits): Size of the data after the header.

  • Next Header (8 bits): Indicates the type of header or protocol that follows (like TCP or UDP).

  • Hop Limit (8 bits): Like TTL in IPv4; decreases by 1 each hop, packet discarded at zero.

  • Source Address (128 bits): IPv6 address of the sender.

  • Destination Address (128 bits): IPv6 address of the receiver.


4. Why It Matters
Understanding the IPv6 header helps you:

  • Troubleshoot networking issues more effectively.

  • Understand how IPv6 packets move through the network.

  • Work with advanced features like flow labels and extension headers.


Solicited-Node Multicast Address in IPv6

We’ve talked about multicast addresses in general, but now let’s focus on a special kind called the Solicited-Node Multicast Address. This type plays a key role in how IPv6 devices find each other on a local network.


1. What is a Solicited-Node Multicast Address?
It’s a multicast address that corresponds to the last 24 bits of an IPv6 unicast or anycast address. Devices listen to this address to efficiently perform Neighbor Discovery (similar to ARP in IPv4) without flooding the whole network.


2. Why is it Important?
Instead of sending requests to every device on the local link, IPv6 uses solicited-node multicast to target only the device that owns the address being looked up. This reduces unnecessary traffic.


3. How is it Formed?
The solicited-node multicast address always starts with this fixed prefix:

FF02::1:FF00:0/104

Then, the last 24 bits of the device’s IPv6 address are appended.


4. Example
If a device has the IPv6 address:

2001:db8::1a2b:3c4d
  • Take the last 24 bits (2b:3c:4d)

  • Add it to the prefix:

FF02::1:FF2B:3C4D

This is the solicited-node multicast address the device listens to for neighbor discovery.


5. Usage in the Network

  • Used in Neighbor Solicitation messages to find MAC addresses associated with IPv6 addresses.

  • Helps reduce broadcast traffic and improves network efficiency.


Image credits: jeremysitlab

Image credits: jeremysitlab


Neighbor Discovery Protocol (NDP), Neighbor Solicitation (NS), and Neighbor Advertisement (NA)

Now that we understand the Solicited-Node Multicast Address, let’s dive into the Neighbor Discovery Protocol (NDP), a key part of how IPv6 devices communicate on a local network to find each other and manage addresses.


1. What is NDP?
NDP is an IPv6 protocol that replaces ARP (Address Resolution Protocol) used in IPv4. It helps devices discover the link-layer (MAC) addresses of neighbors, find routers, and detect duplicate addresses on the network.


2. Neighbor Solicitation (NS)

  • Sent by a device that wants to know the MAC address corresponding to a specific IPv6 address.

  • It uses the Solicited-Node Multicast Address to target only the device that owns the IPv6 address.

  • Example: If your device wants to communicate with another IPv6 address, it sends an NS message to that address’s solicited-node multicast group.


3. Neighbor Advertisement (NA)

  • Sent in response to an NS message.

  • The device owning the IPv6 address replies with its MAC address.

  • Also used to announce changes like a device moving to a new link or updating its address.


4. How They Work Together

  • Device A wants to send packets to Device B’s IPv6 address.

  • Device A sends an NS message to Device B’s solicited-node multicast address.

  • Device B replies with an NA message containing its MAC address.

  • Device A updates its neighbor table and can now send packets directly.


5. Why This Matters
NDP ensures efficient and secure communication on an IPv6 local network without flooding unnecessary traffic. It also supports functions like router discovery and duplicate address detection.


IPv6 Neighbor Table and the show ipv6 neighbor Command

After learning about Neighbor Discovery Protocol (NDP), it’s useful to know how to view the IPv6 neighbor table on your router or device. This table keeps track of IPv6 addresses and their corresponding MAC addresses. Basically, who’s who on your local network.


1. What is the IPv6 Neighbor Table?

  • It stores the mappings between IPv6 addresses and their link-layer (MAC) addresses.

  • Helps the device know where to send packets on the local network.

  • Similar to the ARP table in IPv4 but used for IPv6 NDP.


2. Using the show ipv6 neighbor Command
This command displays the IPv6 neighbor table entries on Cisco routers. It shows which devices your router has discovered and their link-layer addresses.

Example:

Router# show ipv6 neighbor
IPv6 Address                              Age Link-layer Addr State Interface
FE80::1A2B:3C4D:5E6F:7G8H                10  aabb.ccdd.eeff  REACH Gi0/0
2001:db8::1a2b:3c4d                      5   aabb.ccdd.eeff  STALE Gi0/0

3. Key Columns Explained:

  • IPv6 Address: The neighbor’s IPv6 address.

  • Age: How long (in seconds) since the last communication with the neighbor.

  • Link-layer Addr: The MAC address of the neighbor.

  • State: The status of the neighbor entry (e.g., REACH means reachable, STALE means it may need verification).

  • Interface: The router interface where the neighbor is reachable.


4. Why It’s Useful

  • Helps you troubleshoot connectivity on local networks.

  • Verify which neighbors are reachable or if any entries need refreshing.

  • Understand the current state of neighbor relationships on your device.


How NDP Automatically Discovers Routers: Router Solicitation (RS) and Router Advertisement (RA) with ICMPv6 Types

Building on how NDP helps devices find routers, let’s also cover the ICMPv6 message types associated with Router Solicitation and Router Advertisement. These messages are part of ICMPv6, which is essential for IPv6 network operations.


1. Router Solicitation (RS)

  • Purpose: Sent by a host to request routers to identify themselves.

  • ICMPv6 Type: 133

  • How it works:

    • The host sends an RS message to the all-routers multicast address (FF02::2).

    • This prompts routers on the local link to respond with Router Advertisements.


2. Router Advertisement (RA)

  • Purpose: Sent by routers to announce their presence and provide network configuration info.

  • ICMPv6 Type: 134

  • How it works:

    • Routers send RAs periodically or in response to an RS.

    • RAs contain information like prefixes, default gateways, and flags for address configuration.


3. Summary

Message TypeICMPv6 Type NumberSent ByDestination AddressPurpose
Router Solicitation133HostAll Routers Multicast (FF02::2)Request routers to send advertisements
Router Advertisement134RouterAll Nodes Multicast (FF02::1) or unicastAnnounce presence and network info

Knowing these ICMPv6 types helps in troubleshooting with packet captures or firewall configurations where you might need to allow or inspect specific ICMPv6 messages.


Stateless Address Autoconfiguration (SLAAC) in IPv6

Now that we understand how devices discover routers using Router Solicitation and Router Advertisement, let’s talk about SLAAC. The process that lets IPv6 devices automatically configure their own addresses without needing a DHCP server.


1. What is SLAAC?
Stateless Address Autoconfiguration (SLAAC) allows a device to create its own IPv6 address using information from Router Advertisements combined with its own interface identifier (often generated using EUI-64).


2. How SLAAC Works

  • A device sends a Router Solicitation (RS) message to find routers.

  • Routers respond with Router Advertisements (RA) containing network prefix information.

  • The device uses the prefix from the RA and appends its Interface ID to form a full IPv6 address.

  • The device performs checks to make sure the address is unique (Duplicate Address Detection).

  • Once confirmed, the device can start communicating on the network using that address.


3. Why SLAAC is Useful

  • No need for manual IP address configuration.

  • No dependency on DHCP servers for address assignment.

  • Simplifies network management, especially for large networks and mobile devices.


4. SLAAC and DHCPv6

  • SLAAC handles address assignment but doesn’t provide all network info like DNS servers.

  • DHCPv6 can be used alongside SLAAC for additional configuration details if needed.


Configuring SLAAC with ipv6 address autoconfig

Once your router is set up to send Router Advertisements, hosts can automatically configure their IPv6 addresses using SLAAC. On Cisco routers, you can also enable SLAAC on interfaces to accept or generate IPv6 addresses automatically.


1. What Does ipv6 address autoconfig Do?

  • Enables the interface to generate an IPv6 address automatically using SLAAC.

  • The router will listen for Router Advertisements and then create a global unicast IPv6 address based on the advertised prefix and the interface’s MAC address (via EUI-64).

  • Useful on routers acting as hosts or in lab setups.


2. How to Configure SLAAC on an Interface
Example: Enable SLAAC on GigabitEthernet 0/0

Router> enable
Router# configure terminal
Router(config)# interface gigabitethernet 0/0
Router(config-if)# ipv6 address autoconfig
Router(config-if)# no shutdown

3. Verification
To see the automatically configured IPv6 address, use:

Router# show ipv6 interface gigabitethernet 0/0

You should see an IPv6 address generated from the advertised prefix plus the interface ID.


4. Notes

  • SLAAC works only if the router receives Router Advertisements with the appropriate prefix info.

  • If you want to disable SLAAC, use no ipv6 address autoconfig.

  • On most end devices (like PCs), SLAAC is enabled by default and doesn’t require manual configuration.


Duplicate Address Detection (DAD) in IPv6

Now that we’ve covered how IPv6 devices automatically configure their addresses using SLAAC, it’s important to understand how they make sure those addresses are unique on the network. This is where Duplicate Address Detection (DAD) comes in.


1. What is DAD?
Duplicate Address Detection is a process IPv6 devices use to check if an address they want to use is already taken by another device on the same local network.


2. How DAD Works

  • When a device generates a new IPv6 address (using SLAAC or manual configuration), it sends a Neighbor Solicitation (NS) message for that address to the solicited-node multicast group.

  • If no device responds with a Neighbor Advertisement (NA), the address is considered unique and safe to use.

  • If another device responds, it means the address is already in use, and the device must choose a different address or take other action.


3. Why DAD Matters

  • Prevents IP address conflicts on the local network.

  • Ensures reliable communication without address collisions.

  • Helps maintain network stability and security.


4. How Long Does DAD Take?

  • By default, Cisco routers send 1 Neighbor Solicitation message and wait for a response before finalizing the address.

  • The process is usually quick but can add a small delay when bringing interfaces up.


IPv6 Static Routing

Now that we've covered how IPv6 addresses are assigned and managed, let’s move on to IPv6 routing. Starting with static routing, one of the simplest ways to direct traffic between networks.


1. What is IPv6 Static Routing?
Static routing means manually configuring specific routes on a router. You tell the router exactly where to send packets for particular destination networks, instead of relying on dynamic routing protocols.


2. Why Use Static Routing?

  • Simple and easy to set up for small networks.

  • Provides full control over routing paths.

  • Uses fewer resources since no routing protocols are running.

  • Useful for default routes or when routing paths rarely change.


3. Basic IPv6 Static Route Command
Example syntax:

ipv6 route <destination-network> <prefix-length> <next-hop-address or exit-interface>

Example:

ipv6 route 2001:db8:2::/64 2001:db8:1::1

This tells the router to send packets destined for 2001:db8:2::/64 to the next-hop IPv6 address 2001:db8:1::1.


4. Using an Exit Interface Instead of Next Hop
You can also specify the outgoing interface:

ipv6 route 2001:db8:3::/64 GigabitEthernet0/0

This sends packets for that network out the GigabitEthernet0/0 interface directly.


5. Verification
To see configured IPv6 static routes, use:

show ipv6 route static

Types of IPv6 Static Routes: Directly Attached, Recursive, and Fully Specified

When configuring IPv6 static routes, you’ll come across different ways to specify the next hop. Understanding these types helps you pick the best option for your network.


1. Directly Attached Static Route

  • What it is: The static route points directly to an interface on the router (the exit interface).

  • How it works: The router sends packets out that interface without needing to look up another next-hop IP.

  • Example configuration:

      ipv6 route 2001:db8:2::/64 GigabitEthernet0/1
    
  • When to use:

    • When the destination network is directly reachable via that interface.

    • Simple setups or point-to-point links.

  • Limitations:

    • Not ideal for multi-access interfaces (like Ethernet LANs) because the router doesn’t know the next-hop MAC address.

2. Recursive Static Route

  • What it is: The static route points to a next-hop IPv6 address, which the router must resolve via its routing table.

  • How it works: The router looks up the next-hop address in its routing table to find which interface to use.

  • Example configuration:

      ipv6 route 2001:db8:2::/64 2001:db8:1::1
    
  • When to use:

    • Most common method for static routes on Ethernet or multi-access networks.

    • Allows flexibility since you specify a next-hop IP, not just an interface.


3. Fully Specified Static Route

  • What it is: Combines both the exit interface and the next-hop IPv6 address.

  • How it works: The router knows exactly which interface to send the packet out and the next-hop IP to reach.

  • Example configuration:

      ipv6 route 2001:db8:2::/64 GigabitEthernet0/1 2001:db8:1::1
    
  • When to use:

    • Useful for multi-access interfaces where the next-hop must be resolved precisely.

    • Helps avoid ambiguity on Ethernet networks.


Which is Better?

  • For point-to-point links, directly attached static routes are simple and efficient.

  • For multi-access networks (like Ethernet LANs), recursive or fully specified routes are preferred.

  • Fully specified routes add extra clarity and can prevent routing issues, but they require more detailed configuration.


Summary Table:

TypeConfiguration ExampleBest Use Case
Directly Attachedipv6 route 2001:db8:2::/64 GigabitEthernet0/1Point-to-point interfaces
Recursiveipv6 route 2001:db8:2::/64 2001:db8:1::1Ethernet or multi-access networks
Fully Specifiedipv6 route 2001:db8:2::/64 Gig0/1 2001:db8:1::1Multi-access interfaces needing clarity

Now that we’ve covered different types of static routes, let’s talk about an important detail in IPv6 routing: using Link-Local addresses as next hops.


1. What Are Link-Local Next Hops?
In IPv6, routers often use Link-Local addresses (starting with FE80::/10) to specify the next-hop address for static routes, especially on point-to-point links. This is different from IPv4, where global or private IPs are typically used.


2. Why Use Link-Local Addresses as Next Hops?

  • Link-Local addresses are guaranteed to be reachable on the local link between routers.

  • They avoid issues with global or unique local addresses changing or being unavailable.

  • RFCs recommend using Link-Local addresses for next-hop in IPv6 static routes for more reliable routing.


3. How to Configure Static Routes with Link-Local Next Hops
Because Link-Local addresses are only unique per interface, you must specify the outgoing interface along with the Link-Local next-hop address.

Example:

ipv6 route 2001:db8:2::/64 FE80::1 GigabitEthernet0/0
  • FE80::1 is the Link-Local address of the next-hop router.

  • GigabitEthernet0/0 is the interface through which that router is reachable.


4. Important Notes

  • If you don’t specify the outgoing interface, the router won’t know which link the Link-Local next hop belongs to and the route won’t work.

  • This is different from global unicast next hops, where the interface is optional because the next-hop IP is unique globally.


Using Link-Local next hops is a common and recommended practice in IPv6 routing configurations, especially for static routes on point-to-point links.


Dynamic Routing in IPv6

Now that we’ve covered static routing and the details of next hops, let’s move on to dynamic routing; the method routers use to automatically learn and share routes in an IPv6 network.


1. What is Dynamic Routing?
Dynamic routing protocols let routers exchange information about network paths without manual configuration of every route. This helps networks adapt quickly to changes like new links or failures.


2. Why Use Dynamic Routing?

  • Automatically updates routing tables.

  • Scales better for larger or changing networks.

  • Reduces manual errors from configuring many static routes.


3. Common IPv6 Dynamic Routing Protocols

  • OSPFv3: The IPv6 version of OSPF, a widely used interior gateway protocol.

  • EIGRP for IPv6: Cisco’s enhanced interior gateway protocol supporting IPv6.

  • RIPng: An updated version of RIP for IPv6, though less common nowadays.

  • BGP: Mainly for routing between different organizations or large networks (IPv6-capable).


4. How Dynamic Routing Works
Routers running the same dynamic routing protocol share routing information regularly, learn new routes, and remove routes that are no longer reachable.


Configuring OSPFv3 for IPv6

Since OSPFv3 is one of the most popular dynamic routing protocols for IPv6, let’s walk through how to configure it on a Cisco router.


1. Enable IPv6 Routing
Make sure IPv6 routing is turned on:

Router(config)# ipv6 unicast-routing

2. Enable OSPFv3 on the Router
Start the OSPFv3 routing process and assign a process ID (any number you choose):

Router(config)# ipv6 router ospf 1

(Optional) Set the router ID (like an IPv4 address format):

Router(config-rtr)# router-id 1.1.1.1

3. Enable OSPFv3 on Interfaces
Assign interfaces to OSPFv3 by enabling OSPFv3 and specifying the area:

Router(config)# interface GigabitEthernet0/0
Router(config-if)# ipv6 ospf 1 area 0
Router(config-if)# no shutdown

Repeat for other interfaces as needed.


4. Verify OSPFv3 Configuration
Check OSPFv3 neighbor relationships:

Router# show ipv6 ospf neighbor

View the OSPFv3 routing table entries:

Router# show ipv6 route ospf

5. Notes

  • OSPFv3 runs directly over IPv6 and does not require a separate multicast address like OSPF for IPv4.

  • Make sure the interfaces have IPv6 addresses assigned before enabling OSPFv3.


Note on Configuring Other IPv6 Dynamic Routing Protocols

While we focused on configuring OSPFv3, the good news is that setting up other IPv6 dynamic routing protocols like EIGRP for IPv6 or RIPng is very similar to their IPv4 counterparts.

The main differences usually involve:

  • Enabling IPv6 routing (ipv6 unicast-routing) on the router.

  • Using IPv6 addresses on interfaces.

  • Running the IPv6 version of the routing protocol commands.

If you’ve configured dynamic routing for IPv4 before, switching to IPv6 won’t feel very different, just make sure you use the correct IPv6 syntax and addresses.


Verifying and Troubleshooting IPv6 Routing

After configuring static or dynamic IPv6 routes, it’s important to verify that everything is working correctly and troubleshoot any issues that come up. Here are some key commands and tips to help you do that:


1. Show the IPv6 Routing Table
Use this to see all routes the router knows:

show ipv6 route

This displays static routes, connected networks, and learned routes from dynamic protocols.


2. Show Specific Protocol Routes
For example, to see only OSPFv3 routes:

show ipv6 route ospf

Or for static routes:

show ipv6 route static

3. Check Neighbor Discovery Information
Verify IPv6 neighbors and their MAC addresses with:

show ipv6 neighbors

4. Check Interface IPv6 Status
See interface IPv6 addresses and protocol status:

show ipv6 interface brief

5. Ping and Traceroute with IPv6
Test connectivity using IPv6 addresses:

ping ipv6 <ipv6-address>
traceroute ipv6 <ipv6-address>

6. Debugging Tools
For deeper troubleshooting, you can use debug commands like:

debug ipv6 routing
debug ipv6 ospf events

(Use with caution on production devices.)


7. Common Troubleshooting Tips

  • Make sure IPv6 routing is enabled (ipv6 unicast-routing).

  • Verify interfaces have the correct IPv6 addresses.

  • Check for proper neighbor relationships (NDP working).

  • Confirm routing protocols are running and neighbors are established.

  • Review ACLs or firewalls that might block ICMPv6 or routing updates.


This set of commands and checks will help you confirm your IPv6 routing is set up correctly and quickly spot problems when they happen.


Floating Static Routes in IPv6

Before we wrap up, let’s quickly cover floating static routes; a simple way to add backup routes in IPv6 routing.


1. What is a Floating Static Route?
A floating static route is a static route with a higher administrative distance than the primary route. It stays “inactive” unless the main route fails, then it kicks in as a backup.


2. Why Use Floating Static Routes?

  • Provides automatic failover without needing dynamic routing protocols.

  • Simple and reliable backup for critical paths.


3. How to Configure a Floating Static Route
The default administrative distance (AD) for static routes is 1. To make a route “float,” assign a higher AD.

Example:

ipv6 route 2001:db8:2::/64 2001:db8:1::1 10
  • This sets a static route to 2001:db8:2::/64 via next-hop 2001:db8:1::1 with an AD of 10.

  • If a route with AD 1 exists for the same destination, this one won’t be used unless the AD 1 route fails.


4. Verification
Use:

show ipv6 route

You’ll see the active route with the lowest AD; floating routes show as backups.


Wrapping Up

We’ve covered a lot about IPv6 from addresses, header basics, and special address types, to configuring routing and troubleshooting.

IPv6 might seem complex at first, but understanding these fundamentals will help you confidently work with modern networks.

If you want to dive deeper, keep practicing configuration and exploring advanced topics like IPv6 security and dynamic routing protocols.

Thanks for following along!

0
Subscribe to my newsletter

Read articles from Pits directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Pits
Pits