Your Complete Educational Guide from Beginner to Professional
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.
IPv6 provides 340 undecillion addresses vs IPv4's 4.3 billion, solving address exhaustion.
IPsec is mandatory in IPv6, providing end-to-end encryption and authentication.
More efficient routing with a streamlined 40-byte fixed header.
SLAAC allows devices to configure themselves without DHCP servers.
| 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) |
2001:0db8:0000:0000:0001:0000:0000:00012001:db8::1:0:0:12001:db8::/32Automatically 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
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
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
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
| 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 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.
Network: 10.0.0.0/8
Network: 2001:db8::/32
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
| 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 |
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
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
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
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 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
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
Most recommended method
Encapsulate IPv6 in IPv4
Convert between protocols
| 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 |
NDP is fundamental to IPv6 operation. It replaces ARP, ICMP Router Discovery, and ICMP Redirect from IPv4.
Hosts send RS to find routers on the link
ICMPv6 Type 133
Routers send RA with network info
ICMPv6 Type 134
Address resolution and duplicate detection
ICMPv6 Type 135
Response to NS messages
ICMPv6 Type 136
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
All devices connect to central switch/router
Core, Distribution, Access layers
Multiple redundant paths
Central hub with branch connections
Proper network segmentation improves security, performance, and management. In IPv6, you typically have abundant address space to implement logical segmentation.
| 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 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
Important: Unlike IPv4 with NAT, IPv6 hosts are directly addressable from the Internet. Proper firewall configuration is critical!
In IPv6, devices can learn their default gateway automatically through Router Advertisements, but static configuration is also supported.
# 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
# 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
Cisco Packet Tracer is a network simulation tool for designing, configuring, and troubleshooting networks. Perfect for learning IPv6 without physical hardware.
# 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
# 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
# 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
# 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
show interface statusshow ipv6 interface briefping fe80::...show ipv6 neighborsping 2001:db8::1show ipv6 routeshow ipv6 access-list| 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 |
Use this tool to calculate Variable Length Subnet Masks and generate IP allocation tables for your network design.
| CIDR | Hosts | Subnet Mask |
|---|---|---|
| /30 | 2 | 255.255.255.252 |
| /29 | 6 | 255.255.255.248 |
| /28 | 14 | 255.255.255.240 |
| /27 | 30 | 255.255.255.224 |
| /26 | 62 | 255.255.255.192 |
| /25 | 126 | 255.255.255.128 |
| /24 | 254 | 255.255.255.0 |
| Prefix | Subnets | Use Case |
|---|---|---|
| /32 | 65,536 /48s | ISP |
| /40 | 256 /48s | Large ISP customer |
| /48 | 65,536 /64s | Enterprise site |
| /56 | 256 /64s | Small business |
| /60 | 16 /64s | Home network |
| /64 | Standard | LAN segment |
Given: 10.0.0.0/8 network
Requirements:
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 |
Given: 2001:db8::/32 allocation
Requirements:
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 |
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
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
Situation: A small business with 50 employees needs to migrate from IPv4 to IPv6 while maintaining IPv4 connectivity.
Requirements:
Solution:
# 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
Situation: Enterprise with HQ and 2 branch offices connected via WAN links.
Requirements:
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
Task: Connect 2 routers with IPv6
Skills: Interface configuration, basic connectivity
Task: Configure static routes between 3 networks
Skills: Routing, troubleshooting
Task: Implement OSPFv3 in multi-router network
Skills: Dynamic routing, convergence
Task: Implement IPv6 ACLs
Skills: Security, access control