Octet

IPv6

0 of 38 nailed

Core14

  1. Why do we need IPv6, and what does it fix besides the number of addresses?

    Say this first

    IPv4 has about 4.3 billion addresses and the free pools are gone: IANA handed out its last blocks in 2011 and the regional registries ran dry after that. Every workaround (NAT, CGNAT, buying addresses) costs money and breaks end-to-end connectivity. IPv6 has 128-bit addresses, so address space stops being the constraint. It also cleans up the protocol: a fixed 40-byte header, no broadcast, built-in autoconfiguration with SLAAC, and no fragmentation by routers.

    Go deeper

    The address problem

    • 2^32 is about 4.3 billion, and a large part of that is reserved (multicast, private, loopback, class E).
    • IANA allocated its last /8 blocks in February 2011. APNIC hit its final-block policy in 2011, RIPE NCC in 2012 and ARIN ran out in 2015. New IPv4 space now comes from the transfer market.

    What the workarounds cost

    • NAT and CGNAT need state on a box in the path, run out of ports, and force you to log every port block if you must trace a user later.
    • Inbound connections, peer-to-peer, some VoIP and games need extra tricks (port forwarding, STUN, ALGs).
    • Mergers collide: two companies both using 10.0.0.0/8 is a classic integration project.
    • Cloud providers now charge for public IPv4 (AWS has billed every public IPv4 address since 2024).

    What IPv6 changes

    AreaIPv4IPv6
    Address size32 bits128 bits
    Header20 to 60 bytes, checksumfixed 40 bytes, no checksum
    Optionsin the headerextension headers
    Fragmentationrouters and hostssource host only
    Address resolutionARP broadcastNDP over ICMPv6 multicast
    Host configDHCP or staticSLAAC, DHCPv6 or static

    Where it stands

    Mobile carriers run large IPv6-only networks with 464XLAT, and close to half of the users reaching Google do it over IPv6. Enterprises lag, mostly because IPv4 with NAT still works inside the building.

    Traps

    • Saying IPv6 is more secure because of IPsec. That was a myth even when the RFC said MUST.
    • Saying NAT is a security feature you lose. The stateful firewall does the protecting, not the address translation.
    How did you do?Book 4.2 IP Version 6Own page
  2. Describe the format of an IPv6 address.

    Say this first

    128 bits written as eight groups of 16 bits (hextets), each as up to four hex digits, separated by colons. The prefix length follows a slash, like 2001:db8:acad:10::1/64. On a LAN the first 64 bits are the network prefix (global routing prefix plus subnet ID) and the last 64 bits are the interface ID.

    Go deeper

    The pieces

    Output
    2001:0db8:acad:0010:0000:0000:0000:0001/64
    |-- global routing prefix --|subnet|----- interface ID -----|
         48 bits                 16 bits        64 bits
    • Each hex digit is 4 bits (a nibble), so prefix lengths on multiples of 4 line up with digits. That is why address plans use /48, /52, /56, /60, /64.
    • Letters are case-insensitive. Write them lowercase (RFC 5952). Cisco shows them uppercase anyway.
    • There is no subnet mask. You always write the prefix length.

    Where the notation bites

    • URLs: wrap the address in brackets so the colons do not look like a port: http://[2001:db8::10]:8080/.
    • Link-local: the same fe80:: address can exist on every interface, so hosts need a zone ID: ping fe80::1%eth0 on Linux, ping fe80::1%12 on Windows.
    • IPv4 inside IPv6: the last 32 bits may be written dotted, as in ::ffff:192.0.2.1 or 64:ff9b::192.0.2.33.

    Quick numbers

    BlockContains
    /3265,536 /48s
    /4865,536 /64s
    /56256 /64s
    /642^64 addresses, about 1.8 x 10^19

    Traps

    • Calling the groups octets. They are 16 bits each.
    • Writing an address in a URL without brackets.
    How did you do?Book 4.2 IP Version 6Own page
  3. What are the rules for shortening an IPv6 address?

    Say this first

    Two rules. First, drop leading zeros inside each hextet (0db8 becomes db8, 0000 becomes 0), never trailing zeros. Second, replace one run of consecutive all-zero hextets with ::, and only once per address. The canonical form (RFC 5952) uses :: on the longest run, the leftmost run if two are equal, never on a single zero hextet, and writes hex in lowercase.

    Go deeper

    Worked example

    Output
    2001:0db8:0000:0000:0000:ff00:0042:8329
    2001:db8:0:0:0:ff00:42:8329      leading zeros removed
    2001:db8::ff00:42:8329           longest zero run replaced with ::

    Why :: only once

    The reader rebuilds the address by counting the hextets that are written and filling the gap with zeros until there are eight. With two :: there is no way to know how many zeros go in each gap.

    Expanding an address

    Count the written hextets, then insert zeros for the rest.

    Output
    2001:db8:0:a::b:0      6 hextets written, so :: stands for 2
    2001:0db8:0000:000a:0000:0000:000b:0000

    RFC 5952 canonical form

    Any valid form is accepted as input. RFC 5952 defines the one form tools should print, so logs, configs and search results match:

    • lowercase hex
    • leading zeros removed
    • :: on the longest run of two or more zero hextets, the first one on a tie
    • no :: for a single 0 hextet: 2001:db8:0:1:1:1:1:1 stays as is

    Traps

    • Removing trailing zeros. 0100 is 100, not 1.
    • Using :: twice in one address.
    • Using :: to replace a single zero hextet. It is valid input but not canonical.
    How did you do?Book 4.2 IP Version 6Own page
  4. What types of IPv6 addresses are there, and what are their prefixes?

    Say this first

    Three kinds: unicast, multicast and anycast. There is no broadcast. Unicast splits into global unicast (2000::/3, routable on the internet), link-local (fe80::/10, one link only, every interface has one), and unique local (fc00::/7, in practice fd00::/8, private). Multicast is ff00::/8. Anycast has no prefix of its own: it is a unicast address configured on several nodes. Then the specials: ::1 loopback and :: unspecified.

    Go deeper

    The main table

    TypePrefixScopeUsed for
    Global unicast (GUA)2000::/3internetnormal addressing
    Link-local (LLA)fe80::/10 (used as fe80::/64)one linkNDP, routing protocol neighbors, next hops
    Unique local (ULA)fc00::/7, fd00::/8 in useorganizationprivate addressing, not routed on the internet
    Multicastff00::/8by scope fieldone to many, replaces broadcast
    Anycastfrom unicast spaceanynearest of several nodes
    Loopback::1/128the nodesame as 127.0.0.1
    Unspecified::/128nonesource before an address exists (DAD), "any" in sockets

    Special ranges worth knowing

    PrefixMeaning
    2001:db8::/32documentation (RFC 3849)
    ::ffff:0:0/96IPv4-mapped, used inside dual-stack socket APIs
    64:ff9b::/96NAT64 well-known prefix (RFC 6052)
    2002::/166to4, deprecated
    2001::/32Teredo
    fec0::/10site-local, deprecated by RFC 3879

    Multiple addresses are normal

    A typical laptop has a link-local, a stable global address, one or more temporary global addresses, and it has joined several multicast groups. Seeing five addresses on one interface is not a fault.

    Traps

    • Saying IPv6 has broadcast. It does not; ff02::1 (all nodes) is the closest thing.
    • Treating ULA as the IPv6 RFC 1918 that must be NATed. That is not how IPv6 is meant to be run.
    How did you do?Book 4.2 IP Version 6Own page
  5. IPv6 has no broadcast. What does it use instead, and why is that better?

    Say this first

    Multicast. Anything that went to everyone in IPv4 goes to a specific group in IPv6: all nodes ff02::1, all routers ff02::2, and for address resolution the solicited-node group of the target. The gain is that a host's network card filters multicast in hardware, so only the few hosts that joined the group spend CPU on the packet. An ARP broadcast interrupts every host in the VLAN.

    Go deeper

    What replaced each broadcast use

    IPv4 broadcast useIPv6 replacement
    ARP requestNS to the solicited-node group ff02::1:ffXX:XXXX
    DHCP discoverDHCPv6 Solicit to ff02::1:2
    Router discoveryRS to ff02::2, RA to ff02::1
    Directed broadcastgone

    The real saving

    A solicited-node group is built from the last 24 bits of the address, so on a normal LAN only one or two hosts are in each group. The NIC is told which multicast MACs (33:33:ff:xx:xx:xx) to accept and drops the rest without bothering the operating system.

    What does not change

    A switch without MLD snooping still floods multicast to every port in the VLAN, the same way it floods a broadcast. The bandwidth on the wire is similar. The saving is in host CPU and in not waking up devices that do not care.

    Traps

    • Saying anycast replaced broadcast. Multicast did.
    • Claiming IPv6 multicast saves bandwidth on every switch. Only with MLD snooping.
    How did you do?Book 4.2 IP Version 6Book 4.3 MulticastOwn page
  6. How does EUI-64 build an interface ID from a MAC address? Work an example.

    Say this first

    Split the 48-bit MAC in half, insert fffe in the middle to get 64 bits, then flip the seventh bit of the first byte, the universal/local bit. MAC 00:1a:2b:3c:4d:5e becomes 001a:2bff:fe3c:4d5e, and flipping the bit turns 00 into 02, so the interface ID is 021a:2bff:fe3c:4d5e. With prefix 2001:db8:acad:10::/64 the address is 2001:db8:acad:10:21a:2bff:fe3c:4d5e.

    Go deeper

    Step by step

    Output
    MAC                  00:1a:2b | 3c:4d:5e
    Insert fffe          00:1a:2b:ff:fe:3c:4d:5e
    First byte 00        0000 0000
    Flip the 7th bit     0000 0010  = 02
    Interface ID         021a:2bff:fe3c:4d5e
    Address              2001:db8:acad:10:21a:2bff:fe3c:4d5e

    A second one you meet in labs

    Lab routers often have MACs like aabb.cc00.0100.

    Output
    aa = 1010 1010   flip   1010 1000 = a8
    Interface ID   a8bb:ccff:fe00:0100
    Link-local     fe80::a8bb:ccff:fe00:100

    Flipping fast

    Only the second hex digit changes: 0 and 2 swap, 1 and 3, 4 and 6, 5 and 7, 8 and a, 9 and b, c and e, d and f. So 02:50:56:aa:bb:cc gives 0050:56ff:feaa:bbcc: the bit goes from 1 to 0.

    Why flip at all

    In a MAC, the bit set to 0 means "universally administered". IPv6 inverts it so that 1 means universal. That way hand-made interface IDs such as ::1 carry a 0 and are correctly marked local.

    On Cisco

    Cisco IOS
    interface GigabitEthernet0/0/0
     ipv6 address 2001:db8:acad:10::/64 eui-64

    IOS also builds link-local addresses with EUI-64 unless you set one by hand.

    Why hosts moved away from it

    An EUI-64 address carries the MAC, so a laptop can be tracked across every network it joins. Windows uses random interface IDs, and many Linux and Apple systems use stable but opaque IDs (RFC 7217) plus temporary addresses. Routers and servers often still use EUI-64 or static IDs.

    Traps

    • Flipping the wrong bit. It is the bit worth 2 in the first byte.
    • Putting fffe at the end instead of in the middle.
    How did you do?Book 4.2 IP Version 6Own page
  7. What prefix lengths do you use for LANs, point-to-point links and loopbacks in IPv6, and why?

    Say this first

    A /64 for every LAN segment, because SLAAC and many host stacks assume a 64-bit interface ID. A /127 on router-to-router links (RFC 6164), usually carved from a /64 reserved per link. A /128 for loopbacks. A site gets a /48, which is 65,536 /64s. ISPs commonly give homes a /56 or /48.

    Go deeper

    The usual sizes

    UseSizeNote
    Organization from an RIR/32 to /48LIRs get /32 or more, end sites /48
    Site/4816 bits of subnet ID
    Home from an ISP/56 or /48256 or 65,536 LANs
    LAN or VLAN/64always
    Point-to-point/127RFC 6164
    Loopback/128one address

    Why not smaller LANs

    A /120 on a LAN breaks SLAAC, and some devices and features assume /64. IPv6 does not need you to save addresses. It needs you to have enough subnets.

    Why /127 on links

    • NDP exhaustion: on a /64 link, a scan of nonexistent addresses makes the router create an incomplete neighbor entry for each one. A /127 has two addresses, nothing to scan.
    • Looping: on point-to-point links, old implementations bounced packets for unused addresses back and forth until the hop limit ran out.
    • The old worry, that one of the two addresses is the subnet-router anycast address, is handled by RFC 6164: routers do not use that anycast address on a /127.

    Many teams reserve a whole /64 per link and configure the /127 from its start. The plan stays tidy and you can change your mind later.

    Traps

    • Using /112 or /120 on LANs to "save space".
    • Forgetting loopbacks are /128, not /64.
    How did you do?Book 4.2 IP Version 6Own page
  8. What is NDP and what are its message types?

    Say this first

    Neighbor Discovery Protocol (RFC 4861) does the jobs ARP, ICMP router discovery and ICMP redirect did in IPv4. It runs inside ICMPv6 with five messages: Router Solicitation (133), Router Advertisement (134), Neighbor Solicitation (135), Neighbor Advertisement (136) and Redirect (137). It handles address resolution, router and prefix discovery, duplicate address detection and neighbor reachability.

    Go deeper

    The five messages

    TypeMessageSent byUsually toJob
    133Router Solicitation (RS)hostff02::2ask routers for an RA now
    134Router Advertisement (RA)routerff02::1, or the host that askedprefixes, flags, default router, MTU, hop limit
    135Neighbor Solicitation (NS)any nodesolicited-node group, or unicastresolve a MAC, DAD, check reachability
    136Neighbor Advertisement (NA)any nodethe asker, or ff02::1 if unsolicitedgive a MAC, announce a change
    137Redirectrouterhosta better first hop, or "this destination is on-link"

    Useful details

    • Hop limit 255. Every NDP message is sent with hop limit 255 and receivers drop any with less. A packet that crossed a router would have 254 or lower, so this proves the sender is on the link.
    • NA flags. R says the sender is a router, S says the NA answers a solicitation, O says "override your cached MAC for me".
    • Options. Source and target link-layer address, Prefix Information, MTU, Route Information, and RDNSS for DNS servers (RFC 8106).

    Why this matters for filtering

    NDP is ICMPv6. An ACL or firewall that drops all ICMPv6 drops address resolution with it and the link stops working. Cisco IPv6 ACLs carry implicit permits for NS and NA for this reason.

    Traps

    • Saying NDP runs over UDP or directly over Ethernet. It is ICMPv6, IP next header 58.
    • Forgetting Redirect, the fifth message.
    How did you do?Book 4.2 IP Version 6Book 3.3 Internet (IP)Own page
  9. What is duplicate address detection and how does it work?

    Say this first

    Before using any unicast address, a node marks it tentative, joins its solicited-node group and sends a Neighbor Solicitation for it from the unspecified address ::. If another node answers with an NA, or is doing DAD for the same address at the same time, the address is a duplicate and is not used. If nothing comes back within about a second, the address becomes usable. It runs for link-local, SLAAC, DHCPv6 and static addresses alike.

    Go deeper

    The packet

    Output
    NS  src ::                           (no address yet)
        dst ff02::1:ff3c:4d5e            (solicited-node of the tentative address)
        target 2001:db8:acad:10:21a:2bff:fe3c:4d5e

    Using :: as source means nobody caches a mapping for an address that may turn out to be someone else's.

    Timing and knobs

    • One NS by default (DupAddrDetectTransmits = 1), then wait RetransTimer, 1 second.
    • IOS: ipv6 nd dad attempts 1 is the default; 0 disables DAD on the interface.
    • Optimistic DAD (RFC 4429) lets a host use the address while DAD runs, with restrictions, to save time.
    • Anycast addresses skip DAD.

    When it fails on a router

    IOS logs %IPV6_ND-4-DUPLICATE and marks the address [DUP] in show ipv6 interface. The address is not used. If the duplicate is a link-local built from the hardware address, RFC 4862 says IPv6 on that interface should be disabled, because the MAC itself is probably duplicated.

    Common real causes

    • Two routers configured with the same static address, or the same fe80::1 on one link.
    • Copy-pasted VM templates with static addresses.
    • A looped port, where the node hears its own NS. RFC 7527 adds a nonce so a node can recognize its own message.

    Traps

    • Saying DAD is sourced from the address being tested. It uses ::.
    • Saying DAD only runs for SLAAC addresses.
    How did you do?Book 4.2 IP Version 6Own page
  10. Explain SLAAC step by step.

    Say this first

    Stateless address autoconfiguration (RFC 4862) lets a host build its own global address with no server. It creates a link-local address and runs DAD, sends a Router Solicitation, and gets a Router Advertisement with one or more /64 prefixes marked autonomous (A flag). It appends its own 64-bit interface ID, runs DAD again, and uses the router's link-local address from the RA as its default gateway. The router never knows which addresses the hosts picked.

    Go deeper

    The sequence

    1. Interface comes up. The host builds fe80:: plus an interface ID and runs DAD.
    2. Host sends an RS from its link-local address to ff02::2, instead of waiting for the next periodic RA.
    3. Router answers with an RA. It contains:
      • flags M and O (whether to use DHCPv6)
      • router lifetime (non-zero means "use me as a default router")
      • Prefix Information Options: prefix, L (on-link) flag, A (autonomous) flag, valid and preferred lifetimes
      • optionally MTU and RDNSS (DNS servers)
    4. For each /64 prefix with A=1, the host appends an interface ID: EUI-64, a stable opaque ID (RFC 7217) or a random one, plus temporary addresses if privacy extensions are on.
    5. DAD for each new address.
    6. Default route via the RA's source link-local address.

    Lifetimes

    • Preferred lifetime: while it runs, the address is used for new connections. After it, the address is deprecated, still valid for existing sessions.
    • Valid lifetime: after it the address is removed.
    • IOS defaults: valid 2,592,000 s (30 days), preferred 604,800 s (7 days). RAs every 200 s, router lifetime 1800 s.

    Router side on Cisco

    Cisco IOS
    ipv6 unicast-routing
    interface GigabitEthernet0/0/0
     ipv6 address 2001:db8:acad:10::1/64

    That is enough. With ipv6 unicast-routing on, the interface sends RAs for its /64 with A=1.

    Traps

    • Saying the router hands out the address. The host picks it.
    • Forgetting that SLAAC needs ipv6 unicast-routing on IOS, or the router never sends RAs.
    How did you do?Book 4.2 IP Version 6Own page
  11. What is the difference between stateful and stateless DHCPv6?

    Say this first

    Stateful DHCPv6 assigns addresses and keeps a binding for each client, like DHCP in IPv4. Stateless DHCPv6 hands out only settings such as DNS servers and domain name, while the host builds its address with SLAAC, so the server keeps no per-client state. Both use UDP ports 546 (client) and 547 (server), and clients send to ff02::1:2. Neither gives a default gateway; that always comes from the RA.

    Go deeper

    Message flow

    ModeExchangeRA flags
    StatefulSolicit, Advertise, Request, Reply (Solicit and Reply with Rapid Commit)M=1, often A=0
    StatelessInformation-Request, ReplyM=0, O=1, A=1

    Identity

    Clients identify themselves with a DUID (DHCP Unique Identifier) and an IAID per interface, not with a MAC. That makes MAC-based reservations awkward. RFC 6939 lets the first relay add the client's link-layer address for this reason.

    Stateful on IOS

    Cisco IOS
    ipv6 dhcp pool LAN20
     address prefix 2001:db8:acad:20::/64
     dns-server 2001:db8:acad:100::53
     domain-name corp.example.com
    !
    interface GigabitEthernet0/0/1
     ipv6 address 2001:db8:acad:20::1/64
     ipv6 nd managed-config-flag
     ipv6 nd prefix default no-autoconfig
     ipv6 dhcp server LAN20

    Stateless on IOS

    Cisco IOS
    ipv6 dhcp pool LAN10-INFO
     dns-server 2001:db8:acad:100::53
     domain-name corp.example.com
    !
    interface GigabitEthernet0/0/0
     ipv6 address 2001:db8:acad:10::1/64
     ipv6 nd other-config-flag
     ipv6 dhcp server LAN10-INFO

    Choosing

    Stateful gives you a lease table for audits and IPAM, but Android will not use it. Stateless with SLAAC works on every client; you then map addresses to devices from NDP tables or switch device tracking.

    Traps

    • Saying DHCPv6 uses broadcast. It uses ff02::1:2.
    • Thinking stateless DHCPv6 means no server is needed. It still needs one, just without bindings.
    How did you do?Book 4.2 IP Version 6Book 3.3 Internet (IP)Own page
  12. Walk me through the IPv6 header. What was removed compared with IPv4, and why?

    Say this first

    It is a fixed 40 bytes with eight fields: Version, Traffic Class, Flow Label, Payload Length, Next Header, Hop Limit, and the 128-bit source and destination addresses. Compared with IPv4, the header length field, the header checksum, the fragmentation fields and options are gone. A fixed header with no checksum is cheaper for routers, fragmentation moved to an extension header used only by the source, and options moved to extension headers that most routers never look at.

    Go deeper

    The fields

    FieldBitsNotes
    Version4always 6
    Traffic Class8DSCP (6 bits) and ECN (2 bits), same as IPv4 ToS
    Flow Label20marks packets of one flow, used for ECMP and LAG hashing
    Payload Length16bytes after the 40-byte header, extension headers included
    Next Header8next extension header or the upper layer: 6 TCP, 17 UDP, 58 ICMPv6
    Hop Limit8the TTL, renamed; decremented at each router
    Source address128
    Destination address128

    What changed and why

    IPv4IPv6Reason
    IHL (header length)goneheader is always 40 bytes
    Header checksumgonelayer 2 FCS and layer 4 checksums already cover errors; routers no longer recompute a checksum at every hop
    Identification, flags, fragment offsetFragment extension headeronly the source fragments
    Optionsextension headerskeep the fast path simple
    ProtocolNext Headercan point to an extension header
    TTLHop Limitname now matches what it does

    Consequences

    • The UDP checksum, optional in IPv4, is mandatory in IPv6 (tunnel protocols have a narrow exception).
    • Payloads above 65,535 bytes need the Jumbo Payload option in a Hop-by-Hop header. Almost nothing uses it.

    Traps

    • Saying Payload Length includes the 40-byte header. It does not.
    • Saying IPv6 removed TTL. It renamed it.
    How did you do?Book 4.2 IP Version 6Own page
  13. What is dual stack, and what problems do you hit running it?

    Say this first

    Dual stack means every interface, host and service runs IPv4 and IPv6 side by side, each with its own addresses, routing and policy. It is the standard way to deploy IPv6. Hosts prefer IPv6 when a name has both A and AAAA records, and Happy Eyeballs (RFC 8305) races the two so a broken IPv6 path costs a fraction of a second instead of a long timeout. The usual problems are security policy that exists only for IPv4, partly broken IPv6 paths, and twice the things to monitor.

    Go deeper

    On Cisco

    Cisco IOS
    ipv6 unicast-routing
    !
    interface GigabitEthernet0/0/0
     ip address 10.10.10.1 255.255.255.0
     ipv6 address 2001:db8:acad:10::1/64
     ipv6 address fe80::1 link-local

    Without ipv6 unicast-routing the router will not forward IPv6 or send RAs.

    How hosts choose

    • RFC 6724 orders destinations; native IPv6 beats IPv4 by default.
    • Happy Eyeballs v2 starts the IPv6 attempt, waits about 250 ms, then starts IPv4 in parallel and keeps whichever connects first.

    Problems that come up

    ProblemEffect
    Firewall rules only for IPv4IPv6 wide open, or IPv6 blocked and apps fall back slowly
    IPv6 path broken (rogue RA, PMTUD, missing route)slow page loads, some sites fail
    Monitoring and logs only for IPv4half of the traffic invisible
    DNS AAAA records published before the service listens on IPv6clients try IPv6 first and wait
    Two routing tables, two sets of ACLsmore config and more mistakes

    Order of rollout

    Core and routing first, then security policy and monitoring, then server and DNS, then users. Publishing AAAA records is the last step, not the first.

    Traps

    • Forgetting to give IPv6 the same firewall policy as IPv4.
    • Publishing AAAA records for services that do not answer on IPv6.
    How did you do?Book 4.2 IP Version 6Own page

Working17

  1. I am going to read you some addresses. Compress each one properly and tell me which ones are invalid.

    Say this first

    I apply the rules in order: strip leading zeros in each hextet, then put :: on the longest run of two or more zero hextets, leftmost on a tie, and never on a single zero. An address is invalid if it has two ::, more than eight hextets, a hextet over four hex digits, or a non-hex character.

    Go deeper

    Compress these

    Written outCanonicalWhy
    2001:0db8:0000:0000:0000:0000:0000:00012001:db8::1one long run
    2001:0db8:0000:0001:0000:0000:0000:00012001:db8:0:1::1the run of three wins over the single zero
    2001:0db8:0000:0000:0001:0000:0000:00012001:db8::1:0:0:1two runs of two, the leftmost wins
    2001:0db8:0000:0000:0001:0000:0000:00002001:db8:0:0:1::the run of three at the end beats the run of two
    2001:0db8:00a0:0000:0b00:0000:0000:0c002001:db8:a0:0:b00::c00only leading zeros go, 0b00 keeps its zeros
    2001:0db8:0000:0001:0001:0001:0001:00012001:db8:0:1:1:1:1:1a single zero hextet never gets ::
    FE80:0000:0000:0000:0202:B3FF:FE1E:8329fe80::202:b3ff:fe1e:8329lowercase, 0202 to 202
    0:0:0:0:0:0:0:1::1loopback
    0:0:0:0:0:0:0:0::unspecified

    Spot the invalid ones

    AddressProblem
    2001:db8::5::1two ::
    2001:db8:1:2:3:4:5:6:7nine hextets
    2001:db8:10000::110000 is 17 bits
    2001:db8:acad:1g::1g is not hex
    2001:db8:1:2:3:4:5::6eight hextets written plus ::, which must stand for at least one more

    How I check out loud

    "I count the hextets. If :: is there, it fills the gap up to eight. Then I check each group is at most four hex digits." Saying the method shows the interviewer you are not guessing.

    Traps

    • Putting :: on the first zero run even when a later run is longer.
    • Calling 2001:db8:0:1:1:1:1:1 wrong. It is valid and already canonical.
    How did you do?Book 4.2 IP Version 6Own page
  2. Walk me through the IPv6 multicast address format and the well-known groups you see on a LAN.

    Say this first

    Multicast addresses start with ff. The next 4 bits are flags and the 4 after that are the scope, so ff02:: is link scope and ff05:: is site scope. On a LAN you see ff02::1 all nodes, ff02::2 all routers, ff02::5 and ff02::6 for OSPFv3, ff02::1:2 for DHCPv6 and the solicited-node groups ff02::1:ffXX:XXXX. On Ethernet each group maps to MAC 33:33 plus the low 32 bits of the address.

    Go deeper

    Format

    Output
    | 8 bits | 4 bits | 4 bits |       112 bits      |
    |  ff    | flags  | scope  |      group ID       |

    Flags: T=0 means a permanent, well-known group; T=1 a transient one. The P and R flags mark prefix-based and embedded-RP addresses used in multicast routing.

    Scope valueScope
    1interface-local
    2link-local
    4admin-local
    5site-local
    8organization-local
    eglobal

    Groups worth knowing by heart

    AddressGroup
    ff02::1all nodes
    ff02::2all routers
    ff02::5OSPFv3 all SPF routers
    ff02::6OSPFv3 DR and BDR
    ff02::9RIPng
    ff02::aEIGRP
    ff02::dPIM
    ff02::12VRRP
    ff02::16MLDv2 reports
    ff02::1:2all DHCPv6 relay agents and servers
    ff05::1:3all DHCPv6 servers (site scope)
    ff02::1:ff00:0/104solicited-node groups

    MAC mapping

    33:33 followed by the last 32 bits of the group. ff02::1 becomes 33:33:00:00:00:01, and ff02::1:ff3c:4d5e becomes 33:33:ff:3c:4d:5e. Only 32 of the 112 group bits make it into the MAC, so several groups can share one MAC. The NIC lets them all in and the IP stack does the final check.

    Traps

    • Saying ff02::2 reaches all routers in the network. Only the ones on the link.
    • Mixing up the IPv4 multicast MAC prefix 01:00:5e with the IPv6 one 33:33.
    How did you do?Book 4.3 MulticastBook 4.2 IP Version 6Own page
  3. What is a solicited-node multicast address and how do you derive it? Give me an example.

    Say this first

    It is the multicast group a node joins for each of its unicast and anycast addresses, and it is where neighbor solicitations go instead of an ARP broadcast. Take the prefix ff02::1:ff00:0/104 and append the last 24 bits of the unicast address. For 2001:db8:acad:10:21a:2bff:fe3c:4d5e the last 24 bits are 3c:4d5e, so the group is ff02::1:ff3c:4d5e and its Ethernet MAC is 33:33:ff:3c:4d:5e.

    Go deeper

    Derivation step by step

    Output
    Unicast:         2001:db8:acad:10:21a:2bff:fe3c:4d5e
    Last 24 bits:                              3c:4d5e
    Prefix:          ff02::1:ff00:0/104
    Group:           ff02::1:ff3c:4d5e
    Ethernet MAC:    33:33:ff:3c:4d:5e

    More examples

    UnicastSolicited-node
    2001:db8:acad:10::1ff02::1:ff00:1
    2001:db8:acad:10::20ff02::1:ff00:20
    fe80::a8bb:ccff:fe00:100ff02::1:ff00:100
    2001:db8::abcd:1234:5678ff02::1:ff34:5678

    Write every hextet out to four digits before you take the last 24 bits. fe00:100 is fe00:0100, so the last 24 bits are 00:0100.

    Why it exists

    • Address resolution: to find the MAC of 2001:db8:acad:10::20, a host sends an NS to ff02::1:ff00:20. Only nodes whose addresses end in 00:0020 have joined that group.
    • DAD: a node checks its tentative address by sending an NS to the same group.

    On a router

    show ipv6 interface lists the groups under "Joined group address(es)". A router with fe80::1 and 2001:db8:acad:10::1 shows a single FF02::1:FF00:1, because both addresses share the last 24 bits.

    Traps

    • Taking the last 24 bits of the MAC address. That only matches when the address was built with EUI-64.
    • Dropping leading zeros before taking the bits, which shifts the result.
    How did you do?Book 4.2 IP Version 6Own page
  4. How does anycast work in IPv6, and what is the subnet-router anycast address?

    Say this first

    An anycast address is an ordinary unicast address configured on more than one node. Nothing in the address marks it as anycast; routing delivers each packet to the nearest instance. Nodes skip DAD for it. The subnet-router anycast address is the subnet prefix with an all-zero interface ID, for example 2001:db8:acad:10::, and it reaches any one router on that subnet.

    Go deeper

    How it works

    Several nodes advertise or are configured with the same address. Routing protocols pick the best path, so each client reaches the closest one by metric. That is how DNS resolvers, root servers and CDNs spread load and survive site failures, in IPv4 and IPv6 alike.

    On Cisco

    Cisco IOS
    interface Loopback53
     ipv6 address 2001:db8:acad:ff::53/128 anycast

    The anycast keyword tells IOS to skip DAD for this address. The loopback is then redistributed or advertised from every site that hosts the service.

    Subnet-router anycast

    RFC 4291 reserves the address with the interface ID all zeros on every subnet, and routers must answer to it. It is rarely used directly, but it explains two things:

    • Why you should not assign prefix:: to a host on a /64.
    • Why /127 links were once discouraged: one of the two addresses is the subnet-router anycast address. RFC 6164 settles it by saying routers do not use subnet-router anycast on /127 links.

    What anycast is not

    The "anycast gateway" in data center fabrics is a different idea: the same gateway IP and MAC on every leaf switch, each serving its own locally attached hosts.

    Traps

    • Saying anycast addresses come from a special prefix.
    • Confusing anycast with multicast. Anycast reaches one receiver, multicast reaches all that joined.
    How did you do?Book 4.2 IP Version 6Own page
  5. Walk me through how a host finds the MAC address of a neighbor in IPv6, and the neighbor cache states.

    Say this first

    The host checks the destination is on-link, then looks in its neighbor cache. On a miss it creates an INCOMPLETE entry and sends an NS to the target's solicited-node group, carrying its own MAC. The target answers with a unicast NA carrying its MAC, and the entry becomes REACHABLE. After about 30 seconds without confirmation it drops to STALE. When the host uses a STALE entry it goes to DELAY for 5 seconds, then PROBE with unicast NSs, and the entry is removed if nobody answers.

    Go deeper

    The exchange

    Output
    PC1 2001:db8:acad:10::10   wants   PC2 2001:db8:acad:10::20
    
    NS  src 2001:db8:acad:10::10  dst ff02::1:ff00:20
        target 2001:db8:acad:10::20, source link-layer option = PC1's MAC
    NA  src 2001:db8:acad:10::20  dst 2001:db8:acad:10::10
        flags S=1 O=1, target link-layer option = PC2's MAC

    PC2 also learns PC1's MAC from the NS, so it can answer without asking back.

    Neighbor cache states

    StateMeaning
    INCOMPLETENS sent, no answer yet
    REACHABLEconfirmed recently, within ReachableTime (30 s base, randomized 15 to 45 s)
    STALEnot confirmed lately; still used, no traffic sent to check
    DELAYa packet was sent to a STALE entry; wait 5 s for an upper-layer hint
    PROBEsend up to 3 unicast NSs, 1 s apart; delete the entry if none is answered

    Neighbor Unreachability Detection

    Reachability is confirmed two ways: an NA in reply to a unicast NS, or a hint from the upper layer, such as TCP seeing its data acknowledged. The DELAY state exists to give TCP that chance before sending a probe.

    What you see

    Output
    R1# show ipv6 neighbors
    IPv6 Address                              Age Link-layer Addr State Interface
    2001:DB8:ACAD:10::20                        0 0050.56aa.bb20  REACH Gi0/0/0
    FE80::250:56FF:FEAA:BB20                    3 0050.56aa.bb20  STALE Gi0/0/0
    Shell
    $ ip -6 neigh show dev eth0
    fe80::1 lladdr a0:b4:3c:11:0a:01 router STALE
    2001:db8:acad:10::20 lladdr 00:50:56:aa:bb:20 REACHABLE

    Traps

    • Saying the NS goes to ff02::1. Address resolution uses the solicited-node group; reachability probes are unicast.
    • Treating STALE as a failure when reading a neighbor table.
    How did you do?Book 4.2 IP Version 6Own page
  6. Explain the M, O and A flags, and what a host does with each combination.

    Say this first

    M (managed) and O (other config) sit in the RA header. A (autonomous) sits in each Prefix Information Option. A=1 means "build a SLAAC address from this prefix". M=1 means "get addresses from DHCPv6". O=1 means "get other settings, like DNS, from DHCPv6". The gateway always comes from the RA, whatever the flags. Hosts treat the flags as hints, and Android ignores DHCPv6 entirely, which is the classic surprise.

    Go deeper

    The combinations

    MOAAddressesDNSTypical name
    001SLAACRDNSS in the RA, or noneSLAAC only
    011SLAACstateless DHCPv6SLAAC plus stateless DHCPv6
    1any0stateful DHCPv6DHCPv6stateful DHCPv6
    1any1both SLAAC and DHCPv6DHCPv6both, two or more addresses
    000link-local onlynonegateway only

    With M=1, O does not matter: the stateful exchange returns options as well.

    Things that catch people

    • DHCPv6 has no gateway option. Even a fully managed network needs RAs with a non-zero router lifetime.
    • DHCPv6 gives no prefix length. Clients install the leased address as a /128. They learn which prefix is on-link from the RA's Prefix Information Option with L=1. Without it, a host sends traffic for its own subnet through the router.
    • Android does not implement DHCPv6 address assignment. On an M=1, A=0 network Android devices get only a link-local address.
    • Windows starts DHCPv6 when M or O is set. Linux depends on the network manager in use.

    Setting the flags on IOS

    Cisco IOS
    interface GigabitEthernet0/0/0
     ipv6 nd managed-config-flag          ! M=1
     ipv6 nd other-config-flag            ! O=1
     ipv6 nd prefix default no-autoconfig ! A=0 for the prefixes on this interface

    show ipv6 interface confirms with lines like "Hosts use DHCP to obtain routable addresses."

    Traps

    • Saying the M flag gives hosts their default gateway from DHCPv6.
    • Assuming every OS honours the flags the same way.
    How did you do?Book 4.2 IP Version 6Own page
  7. How does an IPv6 host learn its default gateway? Can DHCPv6 give it one?

    Say this first

    Only from Router Advertisements, or from static configuration. Any RA with a non-zero router lifetime adds the sender's link-local address to the host's default router list. DHCPv6 has no gateway option. If two routers send RAs, the host learns both, picks one using the router preference field (high, medium, low) and falls back to the other when NUD finds the first unreachable, which takes tens of seconds.

    Go deeper

    What the host stores

    • Default router list: each router's link-local address and lifetime.
    • The router lifetime in the RA, 1800 s by default on IOS, sets how long the entry lives without a new RA.
    • A router lifetime of 0 means "I am not a default router", even though the RA can still carry prefixes.

    Controls on IOS

    Cisco IOS
    interface GigabitEthernet0/0/0
     ipv6 nd router-preference high   ! RFC 4191, default is medium
     ipv6 nd ra lifetime 0            ! advertise prefixes but never be the gateway

    Failover without an FHRP

    A host only notices a dead router through NUD: the entry must leave REACHABLE (up to 45 s), then DELAY (5 s) and PROBE (3 s). Expect tens of seconds. For faster failover use HSRPv2 for IPv6 or VRRPv3, which give a virtual link-local address that moves between routers.

    Servers and routers as hosts

    • Static: ip -6 route add default via fe80::1 dev eth0 on Linux. A link-local next hop always needs the device.
    • Linux ignores RAs when forwarding is on unless accept_ra is set to 2.

    Traps

    • Answering "DHCPv6 option 3". That is DHCPv4.
    • Forgetting that a router lifetime of 0 removes the router from the default list.
    How did you do?Book 4.2 IP Version 6Own page
  8. How does DHCPv6 relay work, and what is DHCPv6 prefix delegation?

    Say this first

    A relay on the client's first-hop router catches the client's multicast to ff02::1:2, wraps it in a Relay-Forward message and unicasts it to the server. The link-address field tells the server which subnet the client is on. On IOS that is ipv6 dhcp relay destination on the client-facing interface. Prefix delegation (IA_PD) hands a whole prefix, such as a /56, to a requesting router, which then carves /64s from it for its own LANs. It is how ISPs give IPv6 to home and branch routers.

    Go deeper

    Relay

    Cisco IOS
    interface GigabitEthernet0/0/1
     ipv6 address 2001:db8:acad:20::1/64
     ipv6 nd managed-config-flag
     ipv6 nd prefix default no-autoconfig
     ipv6 dhcp relay destination 2001:db8:acad:100::10
    • Relay-Forward carries the link-address (a global address of the client's link), the peer-address (the client's link-local), and often an Interface-ID option.
    • The server answers with Relay-Reply. The relay unwraps it and sends the Reply to the client.
    • You still set the RA flags on the relay interface. Without M=1 clients never start DHCPv6.

    Prefix delegation

    Output
    ISP router (delegating)  --->  CPE (requesting router)
    IA_PD: 2001:db8:5600::/56       LAN1 2001:db8:5600:1::/64
                                    LAN2 2001:db8:5600:2::/64

    On an IOS CPE:

    Cisco IOS
    interface GigabitEthernet0/0/1
     description WAN to ISP
     ipv6 address autoconfig default
     ipv6 dhcp client pd FROM-ISP
    !
    interface GigabitEthernet0/0/0
     ipv6 address FROM-ISP ::1:0:0:0:1/64

    FROM-ISP is a general prefix name. The LAN gets 2001:db8:5600:1::1/64 and follows automatically if the ISP changes the delegated prefix.

    The return route

    Something upstream must route the delegated /56 to the CPE. Broadband gear and many relays install that route when they see the delegation. If nothing does, the CPE gets its prefix and nothing comes back.

    Traps

    • Forgetting the M flag on the relay interface.
    • Assuming the delegated prefix is routed to the CPE by magic.
    How did you do?Book 4.2 IP Version 6Own page
  9. What are IPv6 privacy addresses, and what do they mean for network operations?

    Say this first

    Temporary addresses (RFC 8981, which replaced RFC 4941) are SLAAC addresses with a random interface ID that changes regularly, about once a day. Hosts prefer them for outgoing connections, so websites cannot track a device by a fixed address. Alongside them hosts keep a stable address, often an opaque ID per network (RFC 7217) rather than EUI-64. For operations it means one host has several addresses that change, so per-host ACLs on addresses fail and logs need address-to-device mapping.

    Go deeper

    Two problems, two fixes

    ProblemFix
    EUI-64 carries the MAC, trackable across every networkstable opaque IDs (RFC 7217): fixed per network, different between networks
    One stable address per network lets websites track a session over weekstemporary addresses (RFC 8981): random, rotated

    Defaults today

    • Windows, macOS, iOS and Android create temporary addresses and use them for outgoing traffic.
    • Linux: net.ipv6.conf.<if>.use_tempaddr (0 off, 1 create, 2 create and prefer) and addr_gen_mode for stable-privacy IDs. Desktop distributions usually turn both on through NetworkManager.
    • Source address selection (RFC 6724, rule 7) prefers temporary addresses.

    What changes for the network team

    • Logging: the address in a firewall log may be gone tomorrow. Keep a history of NDP caches, or use switch device tracking (SISF on Cisco), to map address to MAC and port at any time.
    • ACLs: write policies per /64 or per identity (802.1X, user-ID on the firewall), not per host address.
    • Neighbor tables: more addresses per host means bigger NDP caches on gateways.
    • Servers: give them static or stable addresses and turn temporary addresses off.

    Traps

    • Thinking a host has one IPv6 address you can whitelist.
    • Confusing stable opaque IDs with temporary addresses. One stays per network, the other rotates.
    How did you do?Book 4.2 IP Version 6Own page
  10. What is RA Guard, and what other IPv6 first hop security features do you deploy on access switches?

    Say this first

    RA Guard (RFC 6105) drops Router Advertisements arriving on switch ports that are not meant to have a router behind them. It stops rogue RAs, from a misconfigured device or an attacker, that would hand hosts a new default gateway or prefix. The rest of the toolkit: DHCPv6 Guard against rogue DHCPv6 servers, a binding table built by snooping NDP and DHCPv6 (SISF device tracking on Cisco), ND inspection, IPv6 Source Guard and Destination Guard.

    Go deeper

    Why rogue RAs hurt

    A laptop sharing its connection or a home router plugged in backwards sends RAs. Hosts add its link-local address as another default router and may build addresses from its prefix. Traffic either black-holes or goes through the attacker.

    RA Guard on Cisco IOS-XE

    Cisco IOS
    ipv6 nd raguard policy HOSTS
     device-role host
    !
    ipv6 nd raguard policy UPLINK
     device-role router
    !
    interface range GigabitEthernet1/0/1 - 46
     ipv6 nd raguard attach-policy HOSTS
    interface GigabitEthernet1/0/48
     ipv6 nd raguard attach-policy UPLINK

    DHCPv6 Guard

    Cisco IOS
    ipv6 dhcp guard policy CLIENTS
     device-role client
    !
    interface range GigabitEthernet1/0/1 - 46
     ipv6 dhcp guard attach-policy CLIENTS

    The rest

    FeatureWhat it does
    Device tracking (SISF)binding table of address, MAC, port and VLAN from NDP and DHCPv6
    ND inspectiondrops NS and NA that contradict the binding table
    Source Guarddrops traffic sourced from addresses not in the binding table
    Destination Guarddrops traffic to addresses with no binding, limiting NDP cache exhaustion

    Evasion

    Attackers hid RAs behind extension headers or fragments so the switch could not see the ICMPv6 type. RFC 7113 says RA Guard must parse the whole header chain and drop what it cannot parse, and RFC 7112 requires the whole chain in the first fragment. On Cisco a port ACL with deny ipv6 any any undetermined-transport closes the gap on older code.

    Traps

    • Applying RA Guard with a host policy on the uplink to the real router.
    • Forgetting DHCPv6 Guard, which is the same problem for DHCPv6.
    How did you do?Book 4.2 IP Version 6Book 8.1 Trust and ThreatsOwn page
  11. What is MLD and how does it relate to IGMP?

    Say this first

    Multicast Listener Discovery is how IPv6 hosts tell routers which multicast groups they want, the IPv6 version of IGMP. MLDv1 matches IGMPv2 and MLDv2 matches IGMPv3, including source-specific multicast. It runs inside ICMPv6, sent from link-local addresses with hop limit 1 and a Router Alert option. Even a network with no multicast applications uses MLD, because hosts report the solicited-node groups NDP depends on.

    Go deeper

    Messages

    ICMPv6 typeMessage
    130Multicast Listener Query
    131MLDv1 Report
    132MLDv1 Done
    143MLDv2 Report (sent to ff02::16)

    Mapping to IGMP

    IPv4IPv6
    IGMPv2MLDv1 (RFC 2710)
    IGMPv3MLDv2 (RFC 3810)
    IGMP snoopingMLD snooping

    How it plays out

    • A router on the link acts as querier; the one with the lowest IPv6 address wins.
    • Hosts answer queries with reports for every group they want, including their solicited-node groups.
    • The Router Alert option in a Hop-by-Hop header makes routers look at reports for groups they are not members of.

    On switches

    MLD snooping lets a switch forward each group only to ports that asked for it. Like IGMP snooping it needs a querier on the VLAN to keep its state fresh. Enable snooping and a querier together, or leave both off.

    Traps

    • Saying MLD is a separate IP protocol. It is ICMPv6.
    • Thinking a network without multicast applications has no MLD traffic.
    How did you do?Book 4.3 MulticastBook 4.2 IP Version 6Own page
  12. What are IPv6 extension headers? Name the main ones and the order they go in.

    Say this first

    Optional headers between the IPv6 header and the payload, chained by the Next Header field: each one says what comes after it. The main ones are Hop-by-Hop Options (0), Routing (43), Fragment (44), ESP (50), AH (51) and Destination Options (60). Only Hop-by-Hop is meant for routers along the path, and only if they are configured to process it. The rest are for the destination, or for the nodes listed in a Routing header.

    Go deeper

    The chain

    Output
    IPv6 header    Next Header = 0   (Hop-by-Hop)
    Hop-by-Hop     Next Header = 44  (Fragment)
    Fragment       Next Header = 6   (TCP)
    TCP segment

    The headers

    ValueHeaderWho processes it
    0Hop-by-Hop Optionsrouters on the path, if configured to (RFC 8200)
    60Destination Optionsthe destination, or each listed hop when placed before a Routing header
    43Routingthe nodes listed in it
    44Fragmentthe destination, at reassembly
    51AHthe destination
    50ESPthe destination
    59No Next Headernothing follows

    Recommended order (RFC 8200)

    1. IPv6 header
    2. Hop-by-Hop Options (must come first if present)
    3. Destination Options (for the hops in the Routing header)
    4. Routing
    5. Fragment
    6. AH
    7. ESP
    8. Destination Options (for the final destination)
    9. Upper layer (TCP, UDP, ICMPv6)

    Each appears at most once, except Destination Options, which may appear twice.

    Routing header types

    • Type 0: source routing through a list of hops. Deprecated by RFC 5095 because a packet could bounce between two hosts many times and amplify traffic.
    • Type 2: Mobile IPv6.
    • Type 4: the Segment Routing Header used by SRv6 (RFC 8754).

    Traps

    • Saying every router processes every extension header.
    • Forgetting that ESP and AH are extension headers too.
    How did you do?Book 4.2 IP Version 6Own page
  13. How does fragmentation work in IPv6?

    Say this first

    Routers never fragment IPv6 packets. If a packet is too big for the next link, the router drops it and sends an ICMPv6 Packet Too Big (type 2) with the link MTU back to the source. The source lowers its path MTU for that destination and resends, fragmenting itself if it must, using a Fragment extension header. Every link must carry at least 1280 bytes. This makes Path MTU Discovery essential, so blocking Packet Too Big breaks connections.

    Go deeper

    The Fragment header (8 bytes)

    FieldBits
    Next Header8
    Reserved8
    Fragment Offset (8-byte units)13
    Reserved2
    M (more fragments)1
    Identification32

    The Identification field is 32 bits, against 16 in IPv4, so it wraps much more slowly.

    Rules worth quoting

    • Minimum link MTU is 1280 bytes. A host that never wants to think about PMTUD can send 1280-byte packets.
    • Path MTU Discovery is RFC 8201. Packet Too Big messages are sent even in reply to multicast.
    • Overlapping fragments must be dropped (RFC 5722).
    • The first fragment must hold the whole header chain up to the upper layer (RFC 7112).
    • Atomic fragments (a Fragment header on an unfragmented packet) are deprecated (RFC 8021).

    Where it hurts

    • PMTUD black holes: a firewall drops Packet Too Big, the source keeps sending full-size packets, and the session hangs after the handshake.
    • Tunnels: a 6in4 tunnel over a 1500-byte IPv4 path carries 1480 bytes of IPv6; GRE carries 1476.
    • Large UDP: DNS answers that need fragments are often dropped. DNS Flag Day 2020 recommended an EDNS buffer of 1232 bytes, which is 1280 minus the 40-byte IPv6 and 8-byte UDP headers.

    Mitigations

    Cisco IOS
    interface Tunnel0
     ipv6 mtu 1400
     ipv6 tcp adjust-mss 1340

    MSS clamping hides the problem for TCP. Letting Packet Too Big through fixes it for everything.

    Traps

    • Saying routers fragment IPv6 if DF is not set. There is no DF bit; routers never fragment.
    • Filtering ICMPv6 Packet Too Big at the firewall.
  14. Can I block ICMPv6 at the firewall like many people do with ICMP in IPv4?

    Say this first

    No. IPv6 depends on ICMPv6. Neighbor Discovery, router discovery and MLD all run over it, so dropping it on an interface breaks the link. Packet Too Big is required for Path MTU Discovery because routers do not fragment, so dropping it in transit creates black holes. Follow RFC 4890: always allow the error messages (types 1, 2, 3 and 4), allow NDP and MLD on the local link, and decide on echo by policy, usually allowed and rate-limited.

    Go deeper

    What to allow (RFC 4890, simplified)

    TypeMessageThrough the firewallTo the firewall itself
    1Destination Unreachableallowallow
    2Packet Too Bigallow, alwaysallow
    3Time Exceededallow (traceroute, loops)allow
    4Parameter Problemallowallow
    128, 129Echo request and replypolicy, usually allow and rate-limitallow, rate-limited
    133 to 137RS, RA, NS, NA, Redirectnever crosses a routerallow on the link
    130 to 132, 143MLDnever crosses a routerallow on the link

    The Cisco ACL trap

    Every IPv6 ACL on IOS ends with three implicit lines:

    Output
    permit icmp any any nd-na
    permit icmp any any nd-ns
    deny ipv6 any any

    If you write your own deny ipv6 any any log at the end, it matches before the implicit permits and kills neighbor discovery on that interface. Add the NS and NA permits above your deny.

    An edge ACL that respects ICMPv6

    Cisco IOS
    ipv6 access-list EDGE-IN
     permit icmp any any destination-unreachable
     permit icmp any any packet-too-big
     permit icmp any any time-exceeded
     permit icmp any any parameter-problem
     permit icmp any any echo-request
     permit icmp any any echo-reply
     permit icmp any any nd-ns
     permit icmp any any nd-na
     permit tcp any 2001:db8:acad:100::/64 eq 443
     deny ipv6 any any log

    Traps

    • Copying an IPv4 "deny icmp any any" habit to IPv6.
    • Ending a Cisco IPv6 ACL with an explicit deny and no NS and NA permits above it.
    How did you do?Book 4.2 IP Version 6Book 8.5 Example SystemsOwn page
  15. What tunneling options exist for carrying IPv6 over IPv4, and how do you configure a 6in4 tunnel?

    Say this first

    6in4 (also called a manual or configured tunnel) puts the IPv6 packet directly inside IPv4 with protocol 41. GRE does the same with a 4-byte GRE header and can carry routing protocols and multicast. Older automatic methods (6to4, ISATAP, Teredo) are obsolete. Providers use 6rd to give IPv6 over an IPv4 access network, and DS-Lite or MAP to carry IPv4 over IPv6. On IOS 6in4 is tunnel mode ipv6ip.

    Go deeper

    The options

    MethodEncapsulationStatus
    6in4 (manual)IPv4 protocol 41fine for static site links and tunnel brokers
    GREIPv4, GRE, IPv6fine, adds 4 bytes, carries multicast
    6to4protocol 41, 2002::/16 addressesdeprecated, relays unreliable (RFC 7526)
    ISATAPprotocol 41 inside a siteobsolete
    TeredoUDP 3544 through NAT, 2001::/32obsolete, avoid
    6rd (RFC 5969)protocol 41 with the ISP's own prefixISP deployments
    DS-Lite (RFC 6333)IPv4 inside IPv6 to a carrier NATIPv4 over IPv6-only access

    6in4 on IOS

    Cisco IOS
    interface Tunnel0
     description 6in4 to ISP1
     no ip address
     ipv6 address 2001:db8:ffff:100::2/64
     tunnel source GigabitEthernet0/0/1
     tunnel destination 203.0.113.9
     tunnel mode ipv6ip
    !
    ipv6 route ::/0 Tunnel0

    The IPv6 MTU over a 1500-byte IPv4 path is 1480. For GRE (tunnel mode gre ip) it is 1476.

    Things that go wrong

    • NAT in the path: protocol 41 has no ports, so PAT cannot track it. 6in4 through a home router's NAT usually fails; Teredo exists for that case.
    • Firewalls: protocol 41 and UDP 3544 tunnels can carry IPv6 straight past IPv4-only policy. Block them at the edge unless you use them.
    • MTU: Packet Too Big messages from the tunnel ingress must reach the sender.

    Traps

    • Recommending 6to4 or Teredo for a new design.
    • Forgetting that protocol 41 does not pass through PAT.
    How did you do?Book 3.3 Internet (IP)Book 4.2 IP Version 6Own page
  16. How is OSPFv3 different from OSPFv2?

    Say this first

    Same SPF engine, areas, LSA flooding and neighbor states. The differences: OSPFv3 runs per link rather than per subnet, uses link-local addresses for hellos and next hops, and sends to ff02::5 and ff02::6. The router ID is still a 32-bit number and must be set by hand on a router with no IPv4 address. Authentication is no longer in the protocol: it uses IPsec or the authentication trailer. Prefixes moved out of the router and network LSAs into new Link and Intra-Area-Prefix LSAs. Address families let it carry IPv4 too.

    Go deeper

    Side by side

    OSPFv2OSPFv3
    CarriesIPv4IPv6, and IPv4 with address families (RFC 5838)
    Runs ona subneta link; several instances per link with Instance ID
    Neighbor source addressinterface IPv4link-local
    Multicast224.0.0.5, 224.0.0.6ff02::5, ff02::6
    Router ID32-bit, can be taken from an IPv4 address32-bit, set by hand if no IPv4 exists
    Authenticationin the packet headerIPsec AH or ESP (RFC 4552), or authentication trailer (RFC 7166)
    Prefixes carried inrouter (1) and network (2) LSAsIntra-Area-Prefix LSA
    Must match on the linksubnet and mask, area, timers, autharea, timers, Instance ID; no subnet check

    New LSAs

    LSAFunction codeRole
    Router0x2001topology only
    Network0x2002topology only
    Inter-Area-Prefix0x2003replaces type 3
    Inter-Area-Router0x2004replaces type 4
    AS-External0x4005type 5
    NSSA0x2007type 7
    Link0x0008link-local scope: the router's link-local address and prefixes on the link
    Intra-Area-Prefix0x2009prefixes of routers and transit links

    Separating topology from prefixes means a prefix change does not force a full SPF run.

    Config on IOS-XE

    Cisco IOS
    ipv6 unicast-routing
    !
    router ospfv3 1
     router-id 1.1.1.1
     address-family ipv6 unicast
      passive-interface GigabitEthernet0/0/0
     exit-address-family
    !
    interface GigabitEthernet0/0/1
     ospfv3 1 ipv6 area 0

    The older form ipv6 router ospf 1 with ipv6 ospf 1 area 0 on the interface still works.

    Traps

    • Saying OSPFv3 router IDs are 128-bit.
    • Forgetting to set a router ID on an IPv6-only router. The process will not start.
    How did you do?Book 3.4 RoutingBook 4.2 IP Version 6Own page

Expert7

  1. Should we use ULA internally and NAT66 at the edge, the way we use RFC 1918 and NAT today?

    Say this first

    Usually no. The default IPv6 design is global addresses everywhere, with a stateful firewall at the edge for protection. ULA (fd00::/8 plus a random 40-bit global ID, RFC 4193) is useful for networks that never reach the internet, or alongside global addresses for stable internal names. NAT66 is not a standard; NPTv6 (RFC 6296) is a stateless prefix swap and only experimental. And there is a trap: hosts' default address selection prefers IPv4 over ULA, so a ULA-only network quietly keeps using IPv4.

    Go deeper

    Why people ask

    They want what RFC 1918 gave them: addresses that do not change when they change ISP, and a feeling of being hidden.

    Better answers to the real needs

    NeedIPv6 answer
    Stable addressing across ISPsget provider-independent space from your RIR and run BGP, or use PA space and plan for renumbering
    Hide internal hostsstateful firewall, default deny inbound
    Isolated networks (OT, labs)ULA alone is fine
    Stable internal service addressesULA alongside GUA, with care

    The address selection trap

    RFC 6724's default policy table gives fc00::/7 a precedence of 3 and IPv4 (::ffff:0:0/96) 35. If a name has both an A record and a ULA AAAA record, hosts try IPv4 first. For internet destinations, a host with only a ULA source sees a label mismatch with the global destination and also prefers IPv4. So a ULA plus NAT66 design can be "deployed" and carry almost no traffic.

    If you do use ULA

    • Generate the 40-bit global ID randomly. fd00::/48 is what everyone types and will collide in a merger.
    • Never advertise it to the internet, and filter fc00::/7 at the edge in both directions.
    • Expect to tune the policy table (/etc/gai.conf on Linux, netsh interface ipv6 show prefixpolicies on Windows) if you need hosts to prefer it.

    Traps

    • Saying NAT provides security. The firewall does.
    • Picking a non-random ULA prefix.
    How did you do?Book 4.2 IP Version 6Own page
  2. Is IPv6 more or less secure than IPv4? What attacks are new, and how do you defend against them?

    Say this first

    Neither. It has a different attack surface. The old myths are that IPsec makes it secure and that /64s cannot be scanned. The new risks are NDP spoofing and rogue RAs, NDP cache exhaustion on routers, extension header and fragment tricks to slip past filters, tunnels that bypass IPv4 policy, and IPv6 running unmanaged on "IPv4-only" networks. The defense is policy parity with IPv4, first hop security on the switches, /127s on links, NDP cache limits and a deliberate ICMPv6 policy.

    Go deeper

    Myths

    • IPsec: support was once a MUST for nodes, never use. It is a SHOULD now.
    • Unscannable: a /64 is too big to sweep blindly, but addresses leak. Low numbers (::1, ::10), EUI-64 with a known vendor OUI, DNS records, and NDP caches on a compromised host all narrow the search.

    New or changed attacks

    AttackHow it worksDefense
    Rogue RAbecomes the default gateway or adds a prefixRA Guard
    NA spoofingclaims another host's address (override flag)ND inspection, SISF
    DAD denialanswers every DAD probeND inspection
    NDP cache exhaustionscans a /64 so the router fills its cache with incomplete entries/127 on links, ipv6 nd cache interface-limit, Destination Guard
    Extension header evasionhides the transport header beyond what the filter parsesdrop undetermined-transport, drop RH0, rate-limit Hop-by-Hop
    Tunnel bypass6in4 (protocol 41) or Teredo (UDP 3544) carry IPv6 through IPv4 policyblock them at the edge unless used

    The quiet one: IPv6 on an IPv4-only network

    Windows prefers IPv6 and asks for DHCPv6 even when the network team never deployed IPv6. Tools such as mitm6 answer those requests, make themselves the DNS server and redirect traffic. Either deploy IPv6 properly with FHS, or block RAs and DHCPv6 server messages on access ports. Do not just hope it is unused.

    Parity checklist

    • Every IPv4 ACL and firewall rule has an IPv6 twin.
    • Logging, NetFlow and IDS see IPv6.
    • Management plane access lists cover IPv6 (VTY, SNMP, NTP).

    Traps

    • Saying IPv6 cannot be scanned.
    • Deploying IPv6 routing with no matching firewall policy.
    How did you do?Book 4.2 IP Version 6Book 8.1 Trust and ThreatsOwn page
  3. A host has five IPv6 addresses. How does it decide which one to use as the source?

    Say this first

    RFC 6724 defines the rules. For the source: prefer the same address as the destination, then matching scope, avoid deprecated addresses, prefer the outgoing interface, prefer a matching label from the policy table, prefer temporary addresses, then the longest matching prefix. The same RFC also orders destinations when DNS returns several, which is why IPv6 is normally tried before IPv4 and why ULA loses to IPv4.

    Go deeper

    Source address rules, in order

    1. Prefer the same address as the destination.
    2. Prefer the appropriate scope (link-local for link-local destinations, global for global).
    3. Avoid deprecated addresses (preferred lifetime expired).
    4. Prefer home addresses (Mobile IPv6).
    5. Prefer addresses on the outgoing interface.
    6. Prefer a matching label in the policy table.
    7. Prefer temporary addresses.
    8. Use the longest matching prefix.

    Default policy table

    PrefixPrecedenceLabel
    ::1/128500
    ::/0401
    ::ffff:0:0/96 (IPv4)354
    2002::/16 (6to4)302
    2001::/32 (Teredo)55
    fc00::/7 (ULA)313

    Destination ordering

    With several AAAA and A records, rules such as "prefer matching label" and "prefer higher precedence" put native IPv6 above IPv4, and IPv4 above Teredo, 6to4 and ULA. Happy Eyeballs then races the attempts so a broken path costs only a short delay.

    Where to change it

    • Linux (glibc): /etc/gai.conf.
    • Windows: netsh interface ipv6 show prefixpolicies, and set prefixpolicy to change it.

    Traps

    • Saying the host uses "its first address".
    • Forgetting that applications can bind to a specific source and bypass the rules.
    How did you do?Book 4.2 IP Version 6Own page
  4. Packets with extension headers are often dropped on the internet. Why, and what does that mean for your filtering policy?

    Say this first

    Hardware forwards on a fixed number of header bytes. A long header chain pushes the TCP or UDP header past what the ASIC parses, so ACLs cannot match ports, and Hop-by-Hop options get punted to the CPU, which is a denial-of-service risk. Many operators drop or rate-limit those packets, and measurements (RFC 7872) show real loss on the internet. My policy: drop Routing type 0, rate-limit Hop-by-Hop to the control plane, drop packets whose transport header cannot be found, and allow ESP, AH and fragments where needed.

    Go deeper

    Why routers struggle

    • Parse depth. Line cards look at a fixed window of the packet. If the transport header is beyond it, the ACL sees "unknown" and has to pick between dropping and permitting blind.
    • Hop-by-Hop. Processing options means the slow path. RFC 8200 now lets routers ignore Hop-by-Hop unless configured to process it, but older gear punts it.
    • Fragments. Non-first fragments carry no port numbers at all.

    What this means for a filter

    TrafficEdge policy
    Routing header type 0drop (deprecated, RFC 5095)
    Hop-by-Hoprate-limit or drop at the edge unless a service needs it
    Transport header not found in the first fragmentdrop
    Fragment headerallow, subject to the above, or large UDP like DNS breaks
    ESP, AHallow if you run IPsec
    Destination Optionsusually allow, watch for abuse

    On Cisco IOS a port or interface ACL entry deny ipv6 any any undetermined-transport drops packets whose upper-layer protocol cannot be determined.

    Design consequences

    • New protocols that rely on extension headers (SRv6, some in-band telemetry) work inside one operator's network, not reliably across the internet.
    • Security devices must parse the full chain or fail closed.

    Traps

    • Assuming the ASIC sees the whole packet.
    • Dropping all fragments and then wondering why DNSSEC answers fail.
    How did you do?Book 4.2 IP Version 6Own page
  5. How do NAT64 and DNS64 work, and what breaks with them?

    Say this first

    They let IPv6-only clients reach IPv4-only servers. DNS64 answers an AAAA query for a name that has only an A record by building a synthetic AAAA: the IPv4 address embedded in a NAT64 prefix, usually the well-known 64:ff9b::/96 (RFC 6052). The client sends to that address, and a stateful NAT64 (RFC 6146) translates the packet to IPv4, keeping port state much like PAT. It breaks anything that does not go through DNS: IPv4 literals, protocols that carry addresses inside the payload, and DNSSEC validation on the client. 464XLAT fixes most of that by adding a small translator on the client.

    Go deeper

    The flow

    Output
    1. Client asks DNS64 for AAAA of app.example.com
    2. DNS64 finds no AAAA, finds A 192.0.2.33
    3. DNS64 returns AAAA 64:ff9b::c000:221   (192.0.2.33 = c000:0221)
    4. Client opens TCP to [64:ff9b::c000:221]:443
    5. NAT64 translates to 198.51.100.7:40001 -> 192.0.2.33:443 and keeps the mapping

    198.51.100.7 is the NAT64's IPv4 pool address.

    What breaks

    CaseWhy
    IPv4 literals (http://192.0.2.33/)no DNS lookup, no synthesis
    Apps that open IPv4-only socketsthe client has no IPv4
    SIP, FTP and other protocols with addresses insideneeds an ALG
    DNSSEC validated on the clientsynthetic AAAA records fail validation
    Logging and abuse handlingmany users share one IPv4, as with CGNAT

    464XLAT (RFC 6877)

    The client runs a CLAT: a local stateless translator that gives apps a private IPv4 address and turns their IPv4 packets into IPv6 toward the NAT64 (called the PLAT here). IPv4 literals and IPv4-only apps work again. Android has shipped a CLAT for years, and mobile carriers use this to run IPv6-only networks.

    Finding the prefix

    Clients can discover the NAT64 prefix by looking up ipv4only.arpa (RFC 7050) or from the PREF64 option in RAs. Operators may use their own network-specific prefix instead of 64:ff9b::/96.

    Traps

    • Saying DNS64 translates packets. It only synthesizes DNS answers.
    • Forgetting that IPv4 literals bypass DNS64.
    How did you do?Book 4.2 IP Version 6Own page
  6. You get a /48 for a site. How do you lay out the IPv6 addressing plan?

    Say this first

    I split the 16 bits of subnet ID on nibble boundaries so each level is one hex digit and summarizes cleanly. One block for infrastructure (loopbacks as /128s from one /64, a reserved /64 per link with a /127 used), then blocks per building or zone, and inside them a /64 per VLAN. I encode something readable, like the VLAN number, in the last digits, leave room to grow, and never encode IPv4 addresses into IPv6 ones. Everything goes into IPAM before the first address is configured.

    Go deeper

    Example: site prefix 2001:db8:a001::/48

    The subnet ID is the fourth hextet, four hex digits: Z B V V.

    DigitMeaning
    Zzone: 0 infrastructure, 1 to 9 buildings, f data center
    Bfloor or block inside the zone
    V VVLAN or segment index
    PrefixUse
    2001:db8:a001:0::/64router and switch loopbacks, /128 each
    2001:db8:a001:1::/64 to 2001:db8:a001:ff::/64one /64 reserved per point-to-point link, /127 configured
    2001:db8:a001:1000::/52building 1, summarizable
    2001:db8:a001:1110::/64building 1, floor 1, VLAN 10
    2001:db8:a001:1120::/64building 1, floor 1, VLAN 20
    2001:db8:a001:2000::/52building 2
    2001:db8:a001:f000::/52data center

    VLAN 10 written as 10 in hex is really 16, but people read it as ten, which is the point.

    Principles

    • Nibble boundaries (/52, /56, /60, /64) keep prefixes readable and reverse DNS simple.
    • Summarize by location so each building is one route in the core.
    • Leave gaps: use 1, 2, 3 for buildings and keep the rest free.
    • Do not embed IPv4 (...:10:20:30:40). It ties the plans together and looks clever only until renumbering.
    • Gateways get ::1 on each VLAN, or a fixed scheme you document.
    • Multi-site: a /48 per site from the organization's block (for example 2001:db8:a001::/48, 2001:db8:a002::/48) keeps sites summarizable.

    Traps

    • Using anything but /64 for LANs.
    • Designing on non-nibble boundaries that nobody can read at a glance.
    How did you do?Book 4.2 IP Version 6Own page
  7. The ISP changes the prefix it delegates to your site. What happens to the hosts, and how do you design for it?

    Say this first

    The router starts advertising the new prefix, and hosts form new addresses at once. They keep the old ones until the old prefix's lifetimes run out, unless the router deprecates it by advertising it with a preferred lifetime of 0. A host cannot be forced to drop the old address fast: it ignores attempts to cut the valid lifetime below two hours. Design for it with stable PD from the ISP, provider-independent space for important sites, names instead of literal addresses in configs, and policies written against prefixes held in one place.

    Go deeper

    What hosts do

    • Preferred lifetime 0 on the old prefix: addresses become deprecated, kept for open sessions, not used for new ones. This is the graceful way.
    • The two-hour rule (RFC 4862): an RA cannot reduce the remaining valid lifetime below two hours, so a forged RA cannot wipe addresses instantly. The old address stays valid at least that long.
    • If the CPE simply stops advertising the old prefix (a reboot that forgets it), hosts keep using it until its preferred lifetime runs out. Outbound traffic from it is dropped upstream and users see failures.

    What breaks in the network

    ItemProblem
    ACLs and firewall rules with literal addressesstop matching
    DNS AAAA recordspoint at old addresses
    Static next hops with global addressesdead
    Monitoring targetsdead

    Designing for it

    • Ask the ISP for a stable, persistent delegation.
    • Use provider-independent space (and BGP) at sites that cannot tolerate renumbering.
    • Use link-local next hops, general prefixes on IOS (ipv6 address FROM-ISP ::1:0:0:0:1/64) and object groups.
    • Use shorter lifetimes on prefixes you expect to change.
    • Consider ULA alongside the global prefix for internal-only services that must not move.

    Traps

    • Assuming hosts drop the old address as soon as the new prefix appears.
    • Hard-coding global addresses in ACLs at sites with PA space.
    How did you do?Book 4.2 IP Version 6Own page