IPv6
Internet Protocol version 6 replaces IPv4 with 128-bit addresses, a fixed 40-byte header and extension headers. It is often enabled and unmonitored on networks that think they run IPv4 only.
- OSI layer
- 3 Network
- Carried in
- Ethernet / any link layer
- Identified by
- EtherType 0x86DD (IP protocol 41 when tunnelled in IPv4)
- Wireshark filter
ipv6- Encrypted
- no
Packet structure
Select a field to see what it does.
Compared with IPv4: no header checksum, no fragmentation fields (moved to an extension header, and only the sender may fragment), no options (extension headers instead), and a header that is always 40 bytes.
How it works
Addresses are 128 bits, written in 8 groups of hex, with one run of zero groups shortened to :: (2001:db8::1).
| Prefix | Meaning |
|---|---|
::1/128 | Loopback |
::/128 | Unspecified (source during address setup) |
fe80::/10 | Link-local, on every interface, never routed |
fc00::/7 (in practice fd00::/8) | Unique local addresses, the private ranges of IPv6 |
2000::/3 | Global unicast |
ff00::/8 | Multicast; ff02::1 all nodes, ff02::2 all routers, ff02::1:ffXX:XXXX solicited-node |
::ffff:0:0/96 | IPv4-mapped addresses |
64:ff9b::/96 | NAT64 |
2001:db8::/32 | Documentation only |
Address configuration: routers send Router Advertisements (ICMPv6 134). Hosts build an address from the advertised prefix themselves (SLAAC) and/or ask DHCPv6. Neighbor Discovery (ICMPv6 135/136) replaces ARP, and Duplicate Address Detection checks that the address is free.
Extension headers form a chain, each one naming the next with its Next Header field: IPv6 → Hop-by-Hop → Routing → Fragment → ESP → TCP. Routers only have to look at Hop-by-Hop.
In Wireshark
| Filter | Shows |
|---|---|
ipv6 | All IPv6 |
ipv6.addr == 2001:db8::10 | Traffic from or to an address |
ipv6.src == fe80::/10 | Link-local senders |
icmpv6.type == 134 | Router Advertisements (who is acting as router?) |
icmpv6.type == 135 || icmpv6.type == 136 | Neighbor Discovery |
ipv6.nxt == 44 or ipv6.fragment | Fragmented packets |
ipv6.routing | Routing headers (type 0 is deprecated and dangerous) |
dhcpv6 | DHCPv6 |
ip.proto == 41 | IPv6 tunnelled in IPv4 (6in4, 6to4) |
udp.port == 3544 | Teredo tunnels |
What normal looks like: link-local Neighbor Discovery and multicast chatter (mDNS, LLMNR, DHCPv6 solicits from Windows) even on “IPv4-only” networks. Router Advertisements should come from your routers only.
Security notes
- Shadow IPv6: hosts have IPv6 enabled by default. If firewalls, IDS and logging only cover IPv4, attackers can use IPv6 unnoticed.
- Rogue Router Advertisements: anyone on the link can announce themselves as router or DNS server (RDNSS) and become man-in-the-middle;
mitm6combines this with DHCPv6 to take over Windows DNS. Fixes: RA Guard, DHCPv6 Guard on switches, or disable IPv6 where it is really unused. - Neighbor Discovery spoofing: the IPv6 version of ARP spoofing. Defence: ND inspection, SEND (rarely deployed).
- Extension header abuse: long or unusual header chains and tiny fragments can hide the upper-layer header from firewalls (RFC 7112 requires the full header chain in the first fragment). Routing header type 0 enabled amplification and is deprecated.
- Tunnels: 6in4, 6to4 and Teredo can carry IPv6 through IPv4 firewalls. Block protocol 41 and UDP 3544 unless needed.
- Scanning: the address space is too big to sweep, so attackers use DNS, multicast (
ping ff02::1), predictable addresses (::1, embedded MACs) and logs instead.
Versions and related
- IPv4: predecessor; dual stack runs both side by side.
- ICMPv6: much more important than ICMP in IPv4, since Neighbor Discovery and PMTUD depend on it. Do not block it wholesale.
- IPsec: originally mandatory for IPv6, now recommended; AH and ESP are extension headers.