IPv6's 128-bit address space fundamentally changes subnetting dynamics. While IPv4 subnetting often focuses on address conservation, IPv6 emphasizes hierarchical allocation and simplicity. The standard /64 subnet size is designed to:
2001:0db8:85a3:0000:0000:8a2e:0370:7334/64
- Provide 64-bit Interface Identifiers (EUI-64)
- Support SLAAC (Stateless Address Autoconfiguration)
- Enable efficient multicast scoping
The /64 standard exists because:
// Typical host configuration example
interface GigabitEthernet0/0
ipv6 address 2001:db8:abcd::/64 eui-64
ipv6 enable
Exceptions where smaller subnets apply:
- /127 for P2P links: Prevents ping-pong attacks (RFC 6164)
interface Serial0/0/0 ipv6 address fe80::1/127
- Virtualized environments: Containers/VMs may use /80 or /96
- Special cases: /126 for NTP servers, /112 for legacy systems
Direct mapping fails due to architectural differences:
IPv4 Range | Non-Equivalent IPv6 | Recommended IPv6 |
---|---|---|
/24 (256 hosts) | /120 (256 hosts) | /56 (256 subnets) |
/16 (65K hosts) | /112 (65K hosts) | /48 (65K subnets) |
A single interface can have:
// Multiple addresses from different subnets
interface Ethernet0/0
ipv6 address 2001:db8:cafe::1/64
ipv6 address 2001:db8:beef::1/64 anycast
ipv6 address fe80::1 link-local
The % symbol denotes zone IDs for link-local addresses:
ping fe80::1%eth0 # Linux syntax
ping fe80::1%12 # Windows interface index
IPv6's hierarchy makes "waste" intentional:
// Provider allocation example
2001:0db8:0000::/48 # Organization
2001:0db8:0001::/64 # Site 1
2001:0db8:0002::/64 # Site 2
2001:0db8:ffff::/64 # 65,535 possible sites
- No broadcast addresses - uses multicast
- EUI-64 eliminates manual addressing
- Neighbor Discovery replaces ARP
- RFC 6724 address selection rules
# Python example: Generate IPv6 subnets
import ipaddress
network = ipaddress.IPv6Network('2001:db8::/48')
for i, subnet in enumerate(network.subnets(new_prefix=64)):
print(f"Subnet {i}: {subnet}")
IPv6's 128-bit address space fundamentally changes subnetting paradigms. Unlike IPv4 where we conserve addresses, IPv6 adopts /64 as the standard subnet size for host networks due to:
- Required space for SLAAC (Stateless Address Autoconfiguration)
- EUI-64 interface identifier requirements
- Optimized neighbor discovery processes
# Example of typical IPv6 allocation
2001:0db8:85a3::/48 (Organization allocation)
2001:0db8:85a3:0000::/64 (First subnet)
2001:0db8:85a3:0001::/64 (Second subnet)
For router interconnects, /127 prefixes became recommended after RFC 6164 to prevent:
- Neighbor Discovery attacks
- Subnet-router anycast complications
Existing /64 router links should be migrated to /127 where possible:
# Before (vulnerable configuration)
interface GigabitEthernet0/0
ipv6 address 2001:db8:1:1::/64
# After (secure configuration)
interface GigabitEthernet0/0
ipv6 address 2001:db8:1:1::/127
VMs sometimes receive smaller than /64 allocations due to:
- Cloud provider address conservation policies
- Nested virtualization requirements
- Specialized container networking
Direct mapping between IPv4 and IPv6 subnets is problematic because:
- IPv6 doesn't follow classful concepts
- Typical assignments provide /56 or /48 to end sites
- Address planning follows different principles
# Bad practice - trying to mirror IPv4 structure
2001:db8:acad:1200::/120 (Attempt to mimic IPv4 /24)
# Recommended practice
2001:db8:acad:1200::/64 (Standard host network)
IPv6 interfaces typically have:
- Link-local address (fe80::/10)
- Global unicast address(es)
- Potentially temporary privacy addresses
These addresses can belong to different subnets since each serves distinct purposes.
The percent sign indicates a zone identifier used to:
- Disambiguate link-local addresses
- Specify interface context
Example: fe80::1%eth0 (address on eth0 interface)
While IPv6 provides abundant addresses (3.4×1038 total), proper allocation prevents:
- Routing table explosion
- Management complexity
- Future expansion limitations
Characteristic | IPv4 | IPv6 |
---|---|---|
Default subnet size | Variable (/24 common) | /64 standard |
Special addresses | Broadcast | All-nodes multicast |
Configuration | Often manual/DHCP | SLAAC common |
Point-to-point | /30 or /31 | /127 recommended |
The transition to IPv6 subnetting requires shifting from conservation mindset to optimization for operational efficiency and security.