Wiki DE Start in the browser

Wiki › Protocols

IPv6

128-bit addresses, prefixes, link-local, neighbor discovery instead of ARP and automatic addresses with SLAAC.

Layer
3 (Vermittlung)
Standard
RFC 8200, RFC 4291, RFC 5952 …
See an example
2 demos

Addresses

An IPv6 address has 128 bits, written as eight groups of four hexadecimal digits. Leading zeros are dropped, one run of zero groups may be replaced once by ::: 2001:db8:1:0:0:0:0:10 becomes 2001:db8:1::10.

TypeExamplePurpose
Global2001:db8:1::10/64routable worldwide (2001:db8::/32 only for examples)
Link-localfe80::…created automatically, only in your own network, e.g. for router neighbours
Unique localfd00::/8private, like RFC 1918 addresses in IPv4
Multicastff02::1 (all), ff02::2 (all routers)instead of broadcast

A network usually has a /64 prefix: 64 bits network, 64 bits for the device.

The IPv6 header

The header is always 40 bytes long, ten rows of 32 bits; the two addresses take eight of them. Values from a RIPng packet of the simulation.

IPv6Packet · RFC 8200, RFC 2474, RFC 3168
0481216202428
Version4 bits6
Traffic class8 bits0x00
Flow label20 bits0x00000
Payload length16 bits32
Next header8 bits17
Hop limit8 bits255
Source IPv6128 bitsfe80::ff:fe00:301
Destination IPv6128 bitsff02::9
Payload≤ 65535 bytes32 Byte
Each row has 32 bits (4 bytes), bit 0 on the left, as the RFCs draw their headers. Dashed: variable or optional. Point at a field for an explanation.
FieldLengthExample valueMeaning
Version4 bits66 for IPv6.
Traffic class8 bits0x00Like DSCP and ECN in IPv4: traffic class and congestion notification.
Flow label20 bits0x00000Marks packets of one flow so routers treat them alike; 0 = none.
Payload length16 bits (2 bytes)32Length after the 40-byte header (extension headers and data).
Next header8 bits17What follows: 6 TCP, 17 UDP, 58 ICMPv6, or an extension header (e.g. 44 fragment).
Hop limit8 bits255Like TTL in IPv4: each router subtracts 1.
Source IPv6128 bits (16 bytes)fe80::ff:fe00:301Sender, 128 bits.
Destination IPv6128 bits (16 bytes)ff02::9Destination, 128 bits; multicast instead of broadcast (e.g. ff02::1).
Payload≤ 65535 bytes32 ByteExtension headers and the next-layer segment. No header checksum, no fragmentation by routers.
Values: Real frame from the demo “RIPng for IPv6” (no. 1, 90 bytes), exactly as the packet list in leyoNET shows it.

Differences from IPv4 at a glance: Structure of frames and packets.

Neighbor discovery

IPv6 knows no ARP and no broadcast. Instead it uses ICMPv6:

  • Neighbor solicitation / advertisement: “Who has this address?” to a multicast address, reply with the MAC.
  • Router solicitation / advertisement: routers announce their prefix, their gateway and options (e.g. DNS server).

SLAAC

With SLAAC a device forms its address itself: prefix from the router advertisement plus a device part from the MAC (EUI-64). No DHCP server is needed. With the M flag set, devices get the address via DHCPv6 instead.

In leyoNET

The project’s IP version is chosen at the top of the toolbar: IPv4 only, both (dual stack) or IPv6 only. Routers get a /64 per interface, end devices “automatic” or a static address.

C:\> ipconfig
C:\> ping 2001:db8:2::20
C:\> netsh interface ipv6 show neighbors

How to do it in leyoNET

The same text as in the app’s help (F1 key).

IPv6

IPv6 addresses are 128 bits long and written as eight blocks of four hex digits, e.g. 2001:db8:1::10/64. Leading zeros are dropped, one run of zero blocks becomes :: (RFC 5952). 2001:db8::/32 is reserved for examples, private networks use fd00::/8.

IP version of the project (at the top of the toolbar): IPv4 (as before), v4 + v6 (dual stack, both at once) or IPv6 (IPv4 switched off).

  • Link-local: every IPv6 interface automatically has an address fe80::… formed from the MAC (EUI-64). It is only valid on its own link.
  • Neighbor Discovery instead of ARP: to find the MAC for an address, a device sends a Neighbor Solicitation to a multicast group; the owner answers with a Neighbor Advertisement. Before using an address, every device checks that it is free (DAD). netsh interface ipv6 show neighbors lists the neighbours.
  • SLAAC: routers send router advertisements with their prefix (/64). End devices set to “IPv6 automatic” form their own address from it and take the router as default gateway.
  • DHCPv6: if “Hand out addresses by DHCPv6” is set on the router port, the router advertisement carries the M flag and end devices get their address by Solicit – Advertise – Request – Reply.
  • Layer 3 switch: every VLAN interface (SVI) gets an IPv6 address and announces its prefix in the VLAN (also over trunks). The switch routes between the VLANs; with “no ip routing” it does not.
  • Routing: connected prefixes, static routes (Routing tab → IPv6 routes) or Automatic routing.
  • Ping and tracert work with IPv6 addresses, ipconfig shows all addresses.
  • DNS over IPv6: a DNS server can be set on the router port. It is carried in the router advertisement (RDNSS option, RFC 8106) and in the DHCPv6 reply; end devices with a fixed address enter it themselves. AAAA records return IPv6 addresses.
  • Applications: ping, tracert, browser, e-mail and SSH work over IPv6, by address or by name. In dual stack, a device with a global IPv6 address uses the AAAA record first, otherwise the A record. In URLs an IPv6 address goes in square brackets: http://[2001:db8:1::80]/.

Dynamic routing for IPv6: OSPFv3 (IPv6) and RIPng (IPv6).

Simplified: no MLD, no extension headers, no privacy addresses, no NAT for IPv6.

See an example

  • Demo “IPv6: SLAAC, DHCPv6 and Neighbor Discovery” in leyoNETDemo “IPv6: SLAAC, DHCPv6 and Neighbor Discovery” in leyoNET
    IPv6: SLAAC, DHCPv6 and Neighbor Discovery

    A router with two IPv6 networks. On the left the PCs form their own address (SLAAC), on the right the notebook gets one by DHCPv6.

    Router advertisements, duplicate address detection, then a ping with neighbour solicitation instead of ARP. Filter «ndp» shows Neighbor Discovery.

    Watch live Project file

  • Demo “Web, mail and SSH over IPv6” in leyoNETDemo “Web, mail and SSH over IPv6” in leyoNET
    Web, mail and SSH over IPv6

    A pure IPv6 network: the PC gets its address and DNS server from the router (SLAAC and RDNSS), the school DNS has AAAA records, the web and mail server sits in the second network.

    PC 1 resolves www.schule.example via AAAA, loads the page over TCP and IPv6 and sends a mail by SMTP. The filter “ipv6 and tcp” shows the application traffic.

    Watch live Project file

“Watch live” opens the network in leyoNET, the simulation runs in a loop. In the app you find it under File → Demo networks, with a step-by-step tour.

Practise

  • ★★★☆☆ Set up IPv6 · 2 goals · Worksheet (German)
  • ★★☆☆☆ IPv6 BC 1: Structure of an IPv6 address · 7 goals · Worksheet (German)
  • ★★☆☆☆ IPv6 BC 2: Address types and scope · 8 goals · Worksheet (German)
  • ★★★☆☆ IPv6 BC 3: ICMPv6 – ping, traceroute and error messages · 6 goals · Worksheet (German)
  • ★★★☆☆ IPv6 BC 4: Neighbor Discovery and SLAAC · 8 goals · Worksheet (German)
  • ★★★★☆ IPv6 BC 6: Lab «My first IPv6 network» · 6 goals · Worksheet (German)

In leyoNET under Tools → Exercise catalogue. Every exercise checks itself.

What leyoNET simplifies

ProtocolLayerSimplification in the simulation
IPv63No extension headers, no fragmentation, no flow labels; link-local via EUI-64 (RFC 4291), over Ethernet with multicast MAC 33:33:… (RFC 2464)
ICMPv6, Neighbor Discovery3Echo, destination unreachable, time exceeded; neighbor and router solicitation/advertisement instead of ARP; no MLD (multicast groups without registration), no redirect; router advertisements every 30 s
SLAAC3Address from prefix (/64) and EUI-64; optimistic duplicate address detection (address usable at once, conflicts are reported); no privacy addresses

Standards

  • RFC 8200 – Internet Protocol, Version 6 (IPv6) Specification
  • RFC 4291 – IP Version 6 Addressing Architecture
  • RFC 5952 – A Recommendation for IPv6 Address Text Representation
  • RFC 4861 – Neighbor Discovery for IP version 6 (IPv6)
  • RFC 4862 – IPv6 Stateless Address Autoconfiguration
  • RFC 3849 – IPv6 Address Prefix Reserved for Documentation

Read on

Found a mistake or have an idea? Source of this page on GitHub.