I’ve been reading Cisco Press IPv6 Fundamentals, which is a fantastic guide to IPv6. These notes are to jog my memory.
This has been written about a lot by other who are better at explaining it. The simple to remember bits are:
- 128 Bit
- Only unicast or multicast. No Broadcast.
- concatenated by :: once or removing leading zeros
- Minimum datagram size of 1280 bytes (its 576 bytes for IPv4)
IPv6 Packet (From RFC2460)
Version 4-bit Internet Protocol version number = 6. Traffic Class 8-bit traffic class field (QoS) Flow Label 20-bit flow label (host allocated to ID a traffic flow) Payload Length 16-bit unsigned integer. Length of the IPv6 payload, i.e., the rest of the packet following this IPv6 header, in octets Next Header 8-bit selector. Identifies the type of header immediately following the IPv6 header. Uses the same values as the IPv4 Protocol field [RFC-1700 et seq.] Hop Limit 8-bit unsigned integer. Decremented by 1 by each node that forwards the packet. The packet is discarded if Hop Limit is decremented to zero Source Address 128-bit address of the originator of the packet Destination Address 128-bit address of the intended recipient of the packet (possibly not the ultimate recipient, if a Routing header is present)
Types of Address are:
- GUA – Global Unicast Address ≡ IPv4 Public Address.
- Usually first /48 = Global Routing Prefix, then 16 bits of Subnet and the final 64 bits of interface ID.
- ULA – Unique Local Address ≡ IPv4 Private Address (FC07::/7 with 7th bit as 1 (local) making it actually FD00::/7). Recommendation is to not try to replicate the setup of an IPv4 network by using ULA & NAT!
- LLA – Link Local Address ≡ Only used on a single link. Created by default when a GUA OR with the “IPv6 enable” command under the interface OR a manual configuration. (Note: a % Zone might be seen on a windows machine to indicate the interface it belongs to as LLA don’t have to be unique on a device!)
- Loopbacks – ::1
- Unspecified – Used for DAD checks.
- Multicast Addresses (Various) – FF::/8 These addresses are used for services such as routing or ARP and are really important in the normal operation of IPv6.
- FF = 8 Bits
- Flags = 4 Bits (Reserved, RP, Prefix and Transient)
- Scope = 4 bits (e.g. 1:Interface,2:Link-Local,3:Subnet-Local etc)
- Solicited-Node Multicast Address
- Every link that has an IPv6 address will create a SNA for each one.
- FF02::1:FF/104 with 6 Hex Characters at the end from the IPv6 Address
- Used in Neighbour Discovery (ND)
This method is used to self-configure link addresses (including Global and Link Local) for the /64 Interface prefix portion of the address:
- The 48 Bit mac address is split with FF:FE inserted to make 64 bits.
- The 7th bit is inverted. This is the U/L and changes it from globally unique to Locally administered.
Neighbour Discovery (from RFC2461)
IPv4 uses broadcast messages to ARP for the layer two address of the address it wants to reach. IPv6 hasn’t got broadcasts so every interface listens to a number of multicast address groups.
- Neighbour Solicitation
- Used for DAD
- Used to find the L2 info from the IPv6 Neighbour address.
- Its likely only the interested neighbour will receive the IPv6 packet to process based on the calculated SNA address.
- Neighbour advertisement. Uses ICMPv6 type 136 in response to NS with the L2 address of the Link being sought.
- Arp‘ing for a neighbour within the same subnet.
- Sending a NS requesting a MAC to the IP the host knows
- Sent to GUA Solicited Node Multicast Address FF02::1:FF01::
- Response from queried device contains its link layer address.
- Neighbour Cache == Arp Cache ∴ Stale ≥ 30 Seconds
- Destination Cache == neighbour cache is a subset of destination cache, but it can also contain info such as MTU and RTT.
- States:Incomplete, Reachable, Stale, Delay, Probe.
- The Standards
- 1 = Destination Unreachable
- 2 = Packet Too Big. (ROUTERS DON’T FRAGMENT, HOSTS DO!)
- 3 = Time Exceeded
- 4 = Parameter Problem
- MLD (IPv6 Multicast Listener Discovery)
- 130 = Query
- 131 = Report
- 132 = Done
- Standard Echo
- 128 = Echo Request
- 129 = Echo Reply
- Neighbour Discovery
- 133 = Router Solicitation (Sent to FF02::2 All Routers M/C)
- 134 = Router Advertisement (Sent to FF02::1 All Nodes M/C)
- 135 = Neighbour Solicitation
- 136 = Neighbour Advertisement
- 137 = Redirect (Another router has a better path!)
Host sends a RS to (FF02::2) a Router to get an RA OR listens to the periodic RA (FF02::1) sent every 200 Seconds. Done by LL addresses, and the AOM flags (see RFC 5175) define what method a host is to (hopefully if RFC compliant) use to get itself going with a GUA.
- Stateless Address Autoconfiguration
- A Flag Set. (Default) Means go configure yourself via either EUI-64 or Random.
- StateLESS DHCPv6
- A and O flags. Says (A)utoconfigure, but use DHCP to get (O)ther information
- StateFUL DHCPv6
- (M)anaged flag only. Use the DHCPv6 server.
The Link will use the RA prefix and configure its own last 64 bits with either EUI-64 or Random (usually Microsoft?) called SLAAC if needed. THis is teh default. It means the router can change add another prefix as part of a migration stratergy!
IPv6 DHCP Messages
This guide here is probably the best summary.