breakfixlearn.com

NET-04Networking

IPv6 essentials

Use this when: you read, shorten or configure an IPv6 address, or need to know which type it is and how it was assigned.

NET-04 IPv6 essentials cheat sheet. Every table on it is repeated as text below.
Tap the sheet for the full-size image. The text version below is screen-reader friendly.

Text version

Everything on the sheet, as plain HTML: handy for screen readers, copy-paste and search.

Anatomy of an address

An IPv6 address is 128 bits written as 8 groups of hex. Example: 2001:db8:acad:1::10/64, which expands to 2001:0db8:acad:0001:0000:0000:0000:0010.

PartSizeIn the exampleSet by
Global routing prefix48 bits2001:0db8:acadYour ISP or RIR
Subnet ID16 bits0001You (65,536 LANs)
Interface ID64 bits0000:0000:0000:0010Host: SLAAC, EUI-64 or manual

Shorten it (RFC 5952): drop leading zeros in each group, then replace the longest run of all-zero groups with ::. Use :: once only, never for a single zero group, and write hex in lowercase. The example becomes 2001:db8:acad:1::10.

Address types

IPv6 has no broadcast. Multicast does that job.

PrefixTypeNotes
2000::/3Global unicastRoutable on the internet
fe80::/10Link-localOne link only; every interface has one
fc00::/7Unique localPrivate; in practice fd00::/8
ff00::/8MulticastOne to many; replaces broadcast
::1/128LoopbackThis host (::/128 means no address yet)
2001:db8::/32DocumentationUse in examples, never on a live network

Useful multicast groups: ff02::1 all nodes, ff02::2 all routers, and ff02::1:ffXX:XXXX solicited-node.

Neighbor Discovery (replaces ARP)

ICMPv6 typeMessagePurpose
133Router Solicitation (RS)Host asks for routers
134Router Advertisement (RA)Router announces prefix and gateway
135Neighbor Solicitation (NS)"Who has this address?"
136Neighbor Advertisement (NA)"I do, here is my MAC"
137RedirectRouter names a better first hop

NS and NA do the job of ARP and also find duplicate addresses. Every ND message uses hop limit 255, so messages from off-link senders are ignored.

How a host gets its address

MethodHow it works
SLAACThe host builds its interface ID from the RA prefix. Needs a /64.
DHCPv6Stateless adds DNS and options; stateful assigns the address.
EUI-64Flip bit 7 of the MAC and insert fffe in the middle.

Example: MAC 00:00:5e:00:53:01 becomes interface ID 0200:5eff:fe00:5301, so the link-local address is fe80::200:5eff:fe00:5301.

IPv4 vs IPv6

IPv4IPv6
Address32 bits, dotted decimal128 bits, hex
Header20 bytes or more, with checksum40 bytes fixed, no checksum
FragmentingRouters canSource only (minimum link MTU 1280)
NATCommonNot needed; use a firewall

Configure and check

CommandWhat it does
ipv6 unicast-routingTurn on IPv6 routing on the router
ipv6 address 2001:db8:acad:1::1/64Static address
ipv6 address 2001:db8:acad:1::/64 eui-64Prefix plus EUI-64 interface ID
ipv6 route ::/0 2001:db8:acad:1::2Default route
show ipv6 interface briefAddresses and up/up status
show ipv6 route, show ipv6 neighborsRouting table, ND cache
ping -6, ipconfig, ip -6 addrWindows, Windows, Linux

Secure it

Danger. A rogue Router Advertisement can hijack every host on the LAN. Enable RA Guard on access ports.

Caution. Never block all ICMPv6. Types 133 to 136 and Packet Too Big must pass, or addressing and paths break.

Caution. IPv6 is on by default. Firewall rules must cover it too.

Remember

  • /64 per LAN, /48 or /56 per site
  • fe80:: is on every interface
  • :: only once per address

Sources

Go deeper on the blog