IPv6 Cheatsheet

Your Complete Educational Guide from Beginner to Professional

IPv6 Overview

What is IPv6?

IPv6 (Internet Protocol version 6) is the most recent version of the Internet Protocol, designed to replace IPv4. It provides a vastly larger address space with 128-bit addresses, supporting approximately 340 undecillion (3.4×10³⁸) unique addresses.

Why IPv6?

Address Space

IPv6 provides 340 undecillion addresses vs IPv4's 4.3 billion, solving address exhaustion.

Built-in Security

IPsec is mandatory in IPv6, providing end-to-end encryption and authentication.

Simplified Header

More efficient routing with a streamlined 40-byte fixed header.

Auto-Configuration

SLAAC allows devices to configure themselves without DHCP servers.

IPv6 vs IPv4 Comparison

Feature IPv4 IPv6
Address Length 32 bits 128 bits
Address Format Dotted decimal (192.168.1.1) Hexadecimal with colons (2001:db8::1)
Address Space ~4.3 billion ~340 undecillion
Private Addresses 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 fc00::/7 (ULA)
Loopback 127.0.0.1 ::1
Link-Local 169.254.0.0/16 (APIPA) fe80::/10
Broadcast Yes (255.255.255.255) No (uses multicast)
Default Subnet Varies (/24 common) /64 (standard)
Configuration Manual or DHCP SLAAC, DHCPv6, or manual
Header Size 20-60 bytes (variable) 40 bytes (fixed)

IPv6 Address Format

Address Notation Rules

  • Full format: 2001:0db8:0000:0000:0001:0000:0000:0001
  • Compressed format: 2001:db8::1:0:0:1
  • Leading zeros can be omitted in each block
  • Double colon (::) replaces consecutive zero blocks (only once per address)
  • CIDR notation: 2001:db8::/32

IPv6 Address Compressor

Addressing & Subnetting

IPv6 Address Ranges

Link-Local Unicast (fe80::/10)

Automatically configured on all IPv6-enabled interfaces. Used for neighbor discovery and local network communication. Not routable beyond the local link.

fe80::/10 - Link-local range
fe80::/64 - Most common configuration
Example: fe80::1ff:fe23:4567:890a

Unique Local Addresses - ULA (fc00::/7)

IPv6 equivalent of IPv4 private addresses. Routable within an organization but not on the global Internet.

fc00::/8 - Centrally assigned (not yet defined)
fd00::/8 - Locally assigned
Example: fd12:3456:789a:1::1

Global Unicast (2000::/3)

Main IPv6 address space for Internet-routable addresses. Equivalent to public IPv4 addresses.

2000::/3 - Global unicast range
Allocated by IANA to RIRs
Example: 2001:db8:85a3::8a2e:370:7334

Multicast (ff00::/8)

One-to-many communication, replaces broadcast in IPv4.

ff02::1 - All nodes (link-local)
ff02::2 - All routers (link-local)
ff02::1:ff00:0/104 - Solicited-node multicast

Special IPv6 Addresses

Address Description IPv4 Equivalent
::1/128 Loopback address 127.0.0.1
::/128 Unspecified address 0.0.0.0
2001:db8::/32 Documentation prefix 192.0.2.0/24
::ffff:0:0/96 IPv4-mapped IPv6 N/A
64:ff9b::/96 IPv4/IPv6 translation N/A

VLSM (Variable Length Subnet Masking)

VLSM allows efficient use of IP address space by creating subnets of different sizes based on requirements. In IPv6, while the standard subnet is /64, you can use other prefix lengths for point-to-point links or special purposes.

IPv4 VLSM Example

Network: 10.0.0.0/8

  • Sales (224 hosts): 10.0.1.0/24
  • IT (32 hosts): 10.0.2.0/27
  • Management (14 hosts): 10.0.2.32/28
  • Point-to-point: 10.0.2.48/30

IPv6 VLSM Example

Network: 2001:db8::/32

  • Site A: 2001:db8:a::/48
  • Building 1: 2001:db8:a:1::/64
  • Building 2: 2001:db8:a:2::/64
  • P2P links: 2001:db8:a:fff::/127

Dual-Stack Configuration

Dual-stack allows running both IPv4 and IPv6 simultaneously on the same interface. This is the most common migration strategy.

# Cisco Router Dual-Stack Configuration
interface GigabitEthernet0/0
ip address 192.168.1.1 255.255.255.0
ipv6 address 2001:db8:1::1/64
ipv6 enable
no shutdown

Subnet Prefix Lengths

Prefix Length Number of Subnets Use Case
/32 4,294,967,296 /64s ISP allocation
/48 65,536 /64s Enterprise site
/56 256 /64s Small organization
/64 Standard subnet LAN segment
/127 2 addresses Point-to-point links
/128 Single address Host route

Routing & Protocols

Dynamic Routing Protocols

OSPFv3 (Open Shortest Path First for IPv6)

Link-state routing protocol for IPv6. Runs directly over IPv6, uses link-local addresses for neighbor communication.

# Cisco OSPFv3 Configuration
ipv6 router ospf 1
router-id 1.1.1.1
log-adjacency-changes

interface GigabitEthernet0/0
ipv6 address 2001:db8:1::1/64
ipv6 ospf 1 area 0

EIGRP for IPv6

Cisco's advanced distance-vector protocol. Enhanced IGRP with support for IPv6.

# Cisco EIGRP IPv6 Configuration
ipv6 router eigrp 100
eigrp router-id 1.1.1.1
no shutdown

interface GigabitEthernet0/0
ipv6 address 2001:db8:1::1/64
ipv6 eigrp 100

RIPng (RIP next generation)

Distance-vector routing protocol for IPv6. Uses hop count as metric (max 15 hops).

# Cisco RIPng Configuration
ipv6 router rip RIPNG

interface GigabitEthernet0/0
ipv6 address 2001:db8:1::1/64
ipv6 rip RIPNG enable

BGP4+ (BGP for IPv6)

Exterior Gateway Protocol for IPv6. Used between autonomous systems.

# Cisco BGP IPv6 Configuration
router bgp 65001
bgp router-id 1.1.1.1
neighbor 2001:db8::2 remote-as 65002
address-family ipv6
neighbor 2001:db8::2 activate
network 2001:db8:1::/48

Static Routing

Static routes are manually configured and don't change unless administratively modified. Useful for small networks or specific routing requirements.

# IPv6 Static Route Examples

# Basic static route
ipv6 route 2001:db8:2::/64 2001:db8:1::2

# Static route with exit interface
ipv6 route 2001:db8:3::/64 GigabitEthernet0/1

# Static route with both next-hop and exit interface
ipv6 route 2001:db8:4::/64 GigabitEthernet0/1 2001:db8:1::2

# Default route
ipv6 route ::/0 2001:db8:1::1

Default Routing

A default route (::/0) is the "gateway of last resort" - used when no specific route matches the destination.

# Configure default route to ISP
ipv6 route ::/0 Serial0/0/0 2001:db8:ff::1

# Verify default route
show ipv6 route

# Output should show:
S ::/0 [1/0]
via 2001:db8:ff::1, Serial0/0/0

Migration Mechanisms

Dual Stack

Most recommended method

  • Run IPv4 and IPv6 simultaneously
  • Devices choose best protocol
  • Gradual transition
  • No translation needed

🚇 Tunneling

Encapsulate IPv6 in IPv4

  • 6to4: Automatic tunnel
  • ISATAP: Intra-site tunnel
  • Teredo: NAT traversal
  • GRE: Manual tunnel

🔀 Translation

Convert between protocols

  • NAT64: Network translation
  • DNS64: DNS translation
  • Used when dual-stack not possible
  • Can break some applications

Routing Protocol Comparison

Protocol Type Metric Best For
OSPFv3 Link-state Cost Large enterprises
EIGRP Advanced distance-vector Composite Cisco networks
RIPng Distance-vector Hop count Small networks
BGP4+ Path-vector Path attributes Internet/ISP

Neighbor Discovery Protocol (NDP)

NDP is fundamental to IPv6 operation. It replaces ARP, ICMP Router Discovery, and ICMP Redirect from IPv4.

Router Solicitation (RS)

Hosts send RS to find routers on the link

ICMPv6 Type 133

Router Advertisement (RA)

Routers send RA with network info

ICMPv6 Type 134

Neighbor Solicitation (NS)

Address resolution and duplicate detection

ICMPv6 Type 135

Neighbor Advertisement (NA)

Response to NS messages

ICMPv6 Type 136

Network Design & Hardware

WAN Connectivity

Wide Area Network (WAN) connections link geographically dispersed networks. Serial interfaces are commonly used for WAN connections to ISPs.

# Serial Interface Configuration for IPv6
interface Serial0/0/0
description Connection to ISP
ipv6 address 2001:db8:ffff::2/64
ipv6 enable
clock rate 128000
no shutdown

# Add default route through ISP
ipv6 route ::/0 Serial0/0/0 2001:db8:ffff::1

Physical Topology Design

Star Topology

All devices connect to central switch/router

  • ✅ Easy to troubleshoot
  • ✅ Failure isolation
  • ❌ Single point of failure

Hierarchical (3-Tier)

Core, Distribution, Access layers

  • ✅ Highly scalable
  • ✅ Redundancy options
  • ✅ Best for large networks

Mesh Topology

Multiple redundant paths

  • ✅ High redundancy
  • ✅ Multiple paths
  • ❌ Complex and expensive

Hub-and-Spoke

Central hub with branch connections

  • ✅ Cost-effective for WAN
  • ✅ Centralized management
  • ❌ Hub is bottleneck

Network Segmentation

Proper network segmentation improves security, performance, and management. In IPv6, you typically have abundant address space to implement logical segmentation.

Sample Enterprise IPv6 Addressing Plan

Department IPv6 Prefix Hosts
Management 2001:db8:a:10::/64 Unlimited
Sales 2001:db8:a:20::/64 Unlimited
IT Department 2001:db8:a:30::/64 Unlimited
Guest WiFi 2001:db8:a:40::/64 Unlimited
Servers 2001:db8:a:50::/64 Unlimited
P2P Links 2001:db8:a:fff0::/64 /127 subnets

Basic Device Security

# Basic Cisco Router Security Configuration

# Set hostname
hostname Router-HQ

# Secure privileged EXEC mode (use strong unique passwords)
enable secret [ENABLE_SECRET_PASSWORD]

# Secure console access
line console 0
password [CONSOLE_PASSWORD]
login
logging synchronous
exec-timeout 5 0

# Secure VTY (Telnet/SSH) access
line vty 0 4
password [VTY_PASSWORD]
login local
transport input ssh
exec-timeout 10 0

# Create local users
username admin privilege 15 secret [ADMIN_PASSWORD]

# Enable SSH
ip domain-name company.local
crypto key generate rsa modulus 2048
ip ssh version 2

# Disable unused services
no ip http server
no ip http secure-server
no cdp run

# Banner message
banner motd #
****************************************************
* Unauthorized access is prohibited! *
* All activity is logged and monitored. *
****************************************************
#

# Save configuration
copy running-config startup-config

IPv6 Firewall Considerations

Important: Unlike IPv4 with NAT, IPv6 hosts are directly addressable from the Internet. Proper firewall configuration is critical!

Allow Inbound

  • ICMPv6 (essential for NDP)
  • Established connections
  • Required services only

Block Inbound

  • Unsolicited traffic
  • Known malicious sources
  • Unnecessary services

Allow Outbound

  • User-initiated traffic
  • DNS queries
  • Required protocols

Monitor

  • Connection attempts
  • Unusual traffic patterns
  • Failed authentication

Gateway Configuration

In IPv6, devices can learn their default gateway automatically through Router Advertisements, but static configuration is also supported.

Automatic (SLAAC)

# Linux
sysctl -w net.ipv6.conf.all.autoconf=1

# Windows (automatic by default)
netsh interface ipv6 set interface "Ethernet" routerdiscovery=enabled

# Router sends RAs automatically
interface GigabitEthernet0/0
ipv6 nd prefix-default 100 200

Manual Configuration

# Linux
ip -6 addr add 2001:db8:1::100/64 dev eth0
ip -6 route add default via 2001:db8:1::1

# Windows
netsh interface ipv6 add address "Ethernet" 2001:db8:1::100/64
netsh interface ipv6 add route ::/0 "Ethernet" 2001:db8:1::1

# Cisco IOS
interface GigabitEthernet0/0
ipv6 address 2001:db8:1::1/64

Tools & Troubleshooting

Cisco Packet Tracer

Cisco Packet Tracer is a network simulation tool for designing, configuring, and troubleshooting networks. Perfect for learning IPv6 without physical hardware.

Basic Packet Tracer IPv6 Lab Setup

  1. Add Devices: Drag routers, switches, and PCs onto workspace
  2. Connect Devices: Use cables (copper straight-through, crossover, or fiber)
  3. Configure IPv6: Click device → CLI → Enter configuration commands
  4. Test Connectivity: Use ping, traceroute commands
  5. Verify: Use show commands to verify configuration

Essential IPv6 Commands

🖥️ Windows Commands

# Show IPv6 configuration
ipconfig

# Show IPv6 routing table
netsh interface ipv6 show route

# Show neighbor cache
netsh interface ipv6 show neighbors

# Ping IPv6 address
ping 2001:db8::1

# Traceroute
tracert 2001:db8::1

# Test connectivity to link-local
ping fe80::1%Ethernet

🐧 Linux/Unix Commands

# Show IPv6 configuration
ip -6 addr show

# Show IPv6 routing table
ip -6 route show

# Show neighbor cache
ip -6 neigh show

# Ping IPv6 address
ping6 2001:db8::1

# Traceroute
traceroute6 2001:db8::1

# Enable IPv6 forwarding
sysctl -w net.ipv6.conf.all.forwarding=1

Cisco IOS Commands

# Show IPv6 interface brief
show ipv6 interface brief

# Show IPv6 routing table
show ipv6 route

# Show IPv6 neighbors
show ipv6 neighbors

# Show IPv6 protocols
show ipv6 protocols

# Ping IPv6 address
ping ipv6 2001:db8::1

# Traceroute
traceroute ipv6 2001:db8::1

# Debug IPv6 packets
debug ipv6 packet

🍎 macOS Commands

# Show IPv6 configuration
ifconfig

# Show IPv6 routing table
netstat -rn -f inet6

# Show neighbor cache
ndp -an

# Ping IPv6 address
ping6 2001:db8::1

# Traceroute
traceroute6 2001:db8::1

# Clear neighbor cache
sudo ndp -c

Troubleshooting Flowchart

Step-by-Step IPv6 Troubleshooting

  1. Check Physical Layer
    • Are cables connected?
    • Are interface lights on?
    • Check: show interface status
  2. Verify IPv6 Configuration
    • Is IPv6 enabled on interface?
    • Is IPv6 address configured correctly?
    • Check: show ipv6 interface brief
  3. Test Local Connectivity
    • Can you ping link-local addresses?
    • Check: ping fe80::...
    • Verify: show ipv6 neighbors
  4. Test Network Connectivity
    • Can you ping default gateway?
    • Can you ping remote networks?
    • Check: ping 2001:db8::1
  5. Verify Routing
    • Is there a route to destination?
    • Is default route configured?
    • Check: show ipv6 route
  6. Check Firewall/ACLs
    • Are packets being blocked?
    • Is ICMPv6 allowed?
    • Check: show ipv6 access-list

Common Issues and Solutions

Issue Possible Cause Solution
No IPv6 address IPv6 not enabled or no RA Enable IPv6, check router RAs
Can't ping gateway Wrong subnet or gateway down Verify subnet, check gateway status
No route to host Missing routing entry Add static route or enable routing protocol
Duplicate address DAD failure Change address or find duplicate
Slow connectivity MTU issues Check MTU size (min 1280 for IPv6)
Can't resolve DNS No DNS server configured Configure DNS via DHCPv6 or manual

Interactive Ping Tool

IPv6 Ping Simulator

VLSM & IP Allocation Table Builder

Use this tool to calculate Variable Length Subnet Masks and generate IP allocation tables for your network design.

IPv4 VLSM Calculator

Subnet Requirements:

IPv6 Allocation Table Builder

Site/Subnet Requirements:

Subnet Size Reference

IPv4 Subnet Sizes

CIDR Hosts Subnet Mask
/302255.255.255.252
/296255.255.255.248
/2814255.255.255.240
/2730255.255.255.224
/2662255.255.255.192
/25126255.255.255.128
/24254255.255.255.0

IPv6 Prefix Allocations

Prefix Subnets Use Case
/3265,536 /48sISP
/40256 /48sLarge ISP customer
/4865,536 /64sEnterprise site
/56256 /64sSmall business
/6016 /64sHome network
/64StandardLAN segment

Sample VLSM Scenarios

Scenario 1: Multi-Department Office

Given: 10.0.0.0/8 network

Requirements:

  • Sales: 224 hosts
  • Engineering: 120 hosts
  • IT: 32 hosts
  • Management: 14 hosts
  • WAN Link: 2 hosts

Solution:

Department Network Mask Usable IPs
Sales 10.0.0.0 /24 10.0.0.1 - 10.0.0.254
Engineering 10.0.1.0 /25 10.0.1.1 - 10.0.1.126
IT 10.0.2.0 /27 10.0.2.1 - 10.0.2.30
Management 10.0.2.32 /28 10.0.2.33 - 10.0.2.46
WAN Link 10.0.2.48 /30 10.0.2.49 - 10.0.2.50

Scenario 2: Multi-Site IPv6 Deployment

Given: 2001:db8::/32 allocation

Requirements:

  • Headquarters: Multiple buildings with many subnets
  • Branch Office A: Smaller office
  • Branch Office B: Smaller office
  • Data Center: Multiple VLANs

Solution:

Location Prefix Available /64 Subnets
Headquarters 2001:db8:1::/48 65,536
Branch Office A 2001:db8:2::/48 65,536
Branch Office B 2001:db8:3::/48 65,536
Data Center 2001:db8:100::/48 65,536

Practical Examples & Activities

Activity 1: Configure Basic IPv6 on Router

Interactive Lab: Basic Router Configuration

Follow these steps to configure IPv6 on a Cisco router:

# Step 1: Enable IPv6 routing
Router> enable
Router# configure terminal
Router(config)# ipv6 unicast-routing

# Step 2: Configure interface with IPv6
Router(config)# interface GigabitEthernet0/0
Router(config-if)# ipv6 address 2001:db8:1::1/64
Router(config-if)# ipv6 enable
Router(config-if)# no shutdown
Router(config-if)# exit

# Step 3: Verify configuration
Router(config)# exit
Router# show ipv6 interface brief
Router# show ipv6 route

Activity 2: Configure SLAAC

Interactive Lab: Enable SLAAC

Configure a router to advertise IPv6 prefixes using SLAAC:

# Configure interface
Router(config)# interface GigabitEthernet0/0
Router(config-if)# ipv6 address 2001:db8:1::1/64
Router(config-if)# ipv6 enable

# Configure Router Advertisement
Router(config-if)# ipv6 nd prefix default 100 200
Router(config-if)# ipv6 nd ra lifetime 1800
Router(config-if)# no shutdown

# Verify RA is being sent
Router# show ipv6 interface GigabitEthernet0/0

Activity 3: Configure Static Routing

Interactive Lab: IPv6 Static Routes

Activity 4: Subnet Calculator

IPv6 Subnet Information

Activity 5: Address Type Identifier

Identify IPv6 Address Type

Real-World Scenarios

Scenario: Small Business Network Migration

Situation: A small business with 50 employees needs to migrate from IPv4 to IPv6 while maintaining IPv4 connectivity.

Requirements:

  • IPv6 prefix: 2001:db8:1000::/48
  • 3 VLANs: Office (30 hosts), Servers (10 hosts), Guest (20 hosts)
  • Maintain IPv4 connectivity during transition
  • Secure guest network

Solution:

  1. Implement Dual-Stack: Run IPv4 and IPv6 simultaneously
  2. Allocate IPv6 Subnets:
    • Office: 2001:db8:1000:10::/64
    • Servers: 2001:db8:1000:20::/64
    • Guest: 2001:db8:1000:30::/64
  3. Configure SLAAC with Privacy Extensions for office network
  4. Use DHCPv6 for servers (static addressing)
  5. Implement IPv6 firewall rules to isolate guest network
# Router Configuration
ipv6 unicast-routing

interface GigabitEthernet0/0.10
encapsulation dot1Q 10
ip address 192.168.10.1 255.255.255.0
ipv6 address 2001:db8:1000:10::1/64
ipv6 enable

interface GigabitEthernet0/0.20
encapsulation dot1Q 20
ip address 192.168.20.1 255.255.255.0
ipv6 address 2001:db8:1000:20::1/64
ipv6 enable

interface GigabitEthernet0/0.30
encapsulation dot1Q 30
ip address 192.168.30.1 255.255.255.0
ipv6 address 2001:db8:1000:30::1/64
ipv6 enable
ipv6 traffic-filter GUEST-IN in

Scenario: Multi-Site Enterprise with WAN

Situation: Enterprise with HQ and 2 branch offices connected via WAN links.

Requirements:

  • HQ: 200 users, multiple VLANs
  • Branch A: 50 users
  • Branch B: 30 users
  • Dynamic routing between sites
  • Redundant internet connection at HQ

IPv6 Addressing Plan:

Location Prefix Purpose
HQ 2001:db8::/48 Main site allocation
HQ VLAN 10 2001:db8:0:10::/64 Management
HQ VLAN 20 2001:db8:0:20::/64 Users
HQ VLAN 30 2001:db8:0:30::/64 Servers
Branch A 2001:db8:1::/48 Branch A allocation
Branch B 2001:db8:2::/48 Branch B allocation
WAN Links 2001:db8:ff::/48 Point-to-point links (/127)

Routing Configuration (OSPFv3):

# HQ Router
ipv6 router ospf 1
router-id 1.1.1.1

interface range GigabitEthernet0/0 - 2
ipv6 ospf 1 area 0

# Branch A Router
ipv6 router ospf 1
router-id 2.2.2.2

interface GigabitEthernet0/0
ipv6 ospf 1 area 0

# Branch B Router
ipv6 router ospf 1
router-id 3.3.3.3

interface GigabitEthernet0/0
ipv6 ospf 1 area 0

Hands-On Practice Exercises

Exercise 1: Basic Connectivity

Task: Connect 2 routers with IPv6

  1. Configure IPv6 addresses on both routers
  2. Verify link-local addresses
  3. Ping between routers
  4. View neighbor table

Skills: Interface configuration, basic connectivity

Exercise 2: Static Routing

Task: Configure static routes between 3 networks

  1. Design network topology
  2. Assign IPv6 addresses
  3. Configure static routes
  4. Test end-to-end connectivity

Skills: Routing, troubleshooting

Exercise 3: Dynamic Routing

Task: Implement OSPFv3 in multi-router network

  1. Create 4-router topology
  2. Configure OSPFv3
  3. Verify neighbor adjacencies
  4. Test failover scenarios

Skills: Dynamic routing, convergence

Exercise 4: Access Control

Task: Implement IPv6 ACLs

  1. Create network with servers and clients
  2. Configure IPv6 ACLs
  3. Test access restrictions
  4. Allow specific ICMPv6 types

Skills: Security, access control