|Part 1 – Introduction: What is IPv6|
|Part 2 – IPv6 Addressing & Subnetting|
|Part 3 – IPv6 Headers & Header Extensions|
|Part 4 – ICMPv6 & IPv6 Neighborships|
|Part 5 – IPv6 Configuration, EUI-64, SLAAC & Dual Stack|
|Part 6 – IPv6 DHCP (DHCPv6)|
|Part 7 – IPv6 on Windows|
|Part 8 – IPv6 on Linux|
|Part 9 – IPv6 on Mac|
|Part 10 – IPv6 DNS, Monitoring & Address Management|
|Part 11 – IPv6 Routing|
|Part 12 – IPv6 Security & Tunneling|
|Part 13 – IPv6 Internet Connection & Address Planning|
ICMPv6 & IPv6 Neighborships
The Internet Control Message Protocol version 6 (ICMPv6) is an important part of IPv6.
It was defined in Spring 2006 as RFC4443
Among others, it also defines the Neighbor Discovery Protocol (NDP), which replaces ARP!
What the ICMPv6 Packet looks like
Let’s have a look at the regular ICMPv6 packet:
|Bit Offset||0 – 7||8 – 15||16 – 31|
All the ICMPv6 Types and Codes
The different types and codes for the various types of messages are defined in the following table. As you can see, there are some similarities to ICMP for IPv4, so not everything is probably new to you.
|0||no route to destination|
|1||communication with destination administratively prohibited|
|2||beyond scope of source address|
|2||0||packet too big|
|0||hop limit exceeded in transit|
|1||fragment reassembly time exceeded|
|0||erroneous header field encountered|
|1||unrecognized Next Header type encountered|
|2||unrecognized IPv6 option encountered|
|130||0||group membership query|
|131||0||group membership reply|
|132||0||group membership reduction|
Neighbor Discovery (ND) in IPv6
Now it’s time to look at the different ICMPv6 message types, starting with the Neighbor Discovery Protocol (ND or NDP).
It is a Layer 2 protocol and is >used:
- for Stateless Address Autoconfiguration (SLAAC).
- to find other hosts and their MAC addresses (replaces ARP in that matter)
- to find routers and DNS servers (this is new!)
- to find the IP prefix (network) used on the link
- for Duplicate Address Detection (DAD), to make sure the address used is unique
Solicited-Node Multicast Address
>As a quick side note we have to talk about a special multicast address, which was defined in RFC4291 and is called the Solicited-Node Multicast Address.
For every IPv6 address there is one – and the specific multicast group must be joined.
It is also used for Neighbor Discovery (similar to ARP) and to make sure an address is unique. We will go into detail about this at a later stage of this course.
How to find the Solicited-Node Multicast Address of a specific IPv6 Address
To find or generate the Solicited-Node Multicast Address of a specific IPv6 address, simply follow these rules:
the prefix is always ff02:0:0:0:0:1:ff00::/104 + the last 24 bits of the IPv6 address .(ff02:0:0:0:0:1:ff00:0000 – ff02:0:0:0:0:1:ffff:ffff). So yes, you are absolutely correct – these groups are not exactly unique, but this is totally fine for the purpose served!
Router Solicitation Messages in IPv6 (RS)
The Router Solicitation message (RS) is ICMPv6 Type 133.
The host sends a Router Solicitation or RS to the “all routers” multicast group (ff02::2), to receive the prefix (network) information and the address of routers on the locally connected link.
Router Advertisement Messages in IPv6 (RA)
The Router Advertisement message (RA) is ICMPv6 Type 134.
A router sends a periodic Router Advertisement or RA to the “all hosts” multicast group (ff02::1), to announce the prefix (network) information and its own address to be used by clients on the locally connected link or network.
As you might have guessed, this type of message is also used as a reply to Router Solicitation (RS) sent by a client.
In the Router Advertisement message a preference can be set (low, medium, high), in case a single router should be preferred by hosts on the link. The network administrator has the possibility to announce multiple routers that can be used as a gateway or default route out of the local network and still set a priority and preferred router to be used first. If this primary router somehow loses its connection to the network, maybe because it breaks down, the entry times out of the corresponding tables on the clients and they will use the next-best router on the network instead.
Neighbor Solicitation Messages in IPv6 (NS)
The Neighbor Solicitation message (NS) is ICMPv6 Type 135.
It is used to find the Link Layer address, so the Layer 2 or MAC address of another host to establish ethernet communication. A Neighbor Solicitation (NS) is sent to the solicited-node multicast address of the neighbor (like ARP in IPv4) .
also, a NS is sent to unicast address of neighbor, to find out if it is still alive and reachable
Neighbor Advertisement Messages in IPv6 (NA)
The Neighbor Advertisement message (NA) is ICMPv6 Type 136.
This message is used to reply to Neighbor Solicitation (NS) message
Redirect Messages in IPv6
The Redirect message is ICMPv6 Type 137 and the last message type.
A redirect message is sent by routers to tell hosts that there is a better next hop for a target that was directed to the specific router.
For example – the default router for a client subnet has a next-hop for a destination network, which (the next-hop) is also on the same local network. It would not make much sense for the router to receive all this traffic just to forward it back on the same LAN to the next-hop router. Instead, a redirect message is sent to the client, so the client may address the destination directly via the best next-hop on the local network.
How IPv6 Neighbor Processing works
You have learned before, that in IPv6 there is no ARP anymore. Instead there is ICMPv6 and the Solicited-Node Multicast address, but how does that all fit together? Let’s find the answers in the following chapters.
Watch my video or read below.
Let’s define some basics first:
The IPv6 Neighbor Cache keeps Track of all Neighbors
The neighbor cache is a table on a device (host or router) which lists all neighbors that have been communicated with recently.
The neighbor cache contains the MAC address of the corresponding IPv6 address and a flag, if it is a router or a host
The neighbor cache also lists reachability information (similar to the ARP cache of IPv4), so if a device is not seen for some time, it is aged out and ultimately dropped form the neighbor cache table.
The IPv6 Destination Cache keeps Track of all Destinations
The destination cache lists all targets that have been communicated with recently.
The destination cache contains the MAC address of the local neighbor or the MAC address of the next hop, in case the IPv6 target is remote and not accessible locally on a connected link.
IPv6 Neighbor Reachability States explained
Reachability states are kept in the tables for each neighbor. The following states are defined:
- the address is unknown but is being queried (this is the state after a Neighbor Solicitation/NS message and before reception of the Neighbor Advertisement/NA as a reply from the neighbor)
- the neighbor has been active recently and is known as available
- there was no recent communication with this neighbor
- but there is also no next step to check further (not needed)
Recommended Resources for additional reading
Apart from the links throughout this course I recommend the following resources for additional information:
- The Internet Society (ISOC) IPv6 Portal
- Test your IPv6 connectivity on test-ipv6.com
- The official IANA list of assigned IPv6 address space is very interesting
- The Google IPv6 deployment statistics
- The RIPE NCC IPv6 working group and mailing list
Book recommendations on IPv6
I can recommend the following 3 books which I enjoyed reading:
This concludes IPv6 Foundation Part 4: ICMPv6 & IPv6 Neighborships of the original IPv6 Foundation Master Class.
Previous Part: IPv6 Foundation Part 3: IPv6 Headers & Extension Headers