Neighbor Discovery Protocol

Neighbor Discovery Protocol (NDP ) is the replacement of the Address Resolution Protocol (ARP) from IPv4 to IPv6. It is used, inter alia, dissolve IPv6 addresses in the link -layer addresses.

  • 3.1 Router Solicitation - Type 133
  • 3.2 Router Advertisement - Type 134
  • 3.3 Neighbor Solicitation - Type 135
  • 3.4 Neighbor Advertisement - Type 136
  • 3.5 Redirect - Type 137

Use

NDP is used by the nodes participating in the IPv6 network, to make the link-layer address of another node on the same network hanging locate and update the cached addresses. For all not on the same network hanging node NDP is used to find a / the router that can forward packets.

Operation

For the NDP node for each interface must manage the following information:

In the Neighbor Cache addresses are managed, has been sent to the something and are located in the same network. For each entry of an IPv6 address is its link-layer address. Even more information can be managed here, such as pointers to packets waiting for address resolution information for the availability check or whether it is a router.

In the Destination Cache addresses are managed, has been sent to something. For each entry, via a link to the Neighbor Cache, stored, which is the next hop that you want to adopt a package.

In the Prefix List the prefixes are managed, which are valid on the same network. Each entry, except for the link- local address has an expiration date. Thus, only nets remain in the list promulgated by a router.

In the Default Router List all routers are managed, which are known for the interface. The entries refer to entries in the neighbor cache. In addition, they have an expiration date, so old router disappear and only the retained that announce their presence.

The information about creating these lists are replaced by ICMPv6 ( Internet Control Message Protocol v6). NDP ICMPv6 defined for this purpose five types.

Router and Prefix Discovery

Routers ship at certain intervals Router Advertisement messages via multicast. The information in these messages are used to the Default Router List and the Prefix List to create. After the specified lifetime of the entries will be deleted from the lists. This router only remain registered, who are active and demonstrate their presence periodically.

In order not to have to wait for the next scheduled router advertisement, a node by router solicitation message can force the router multicast address a Router Advertisement. This is especially when activating a new interface advantageous not to have to wait with the configuration must.

Parameter determination

With this mechanism, nodes determine relevant parameters for the link (eg that used for the link MTU), to which they are connected, or Internet parameters ( such as the value of the Hop Limit ) used for outgoing packets need.

Address autoconfiguration

With this method, configure network node to use IPv6 addresses for their interfaces without a DHCP service.

Determine the next hop

When a packet is to be sent, is looked up in the destination cache to see if an entry already exists for this target. If no entry exists, the next hop is based on the Prefix List, and the Default Router List is determined for the package. This information is then stored in the destination cache to determine this, not every time you need.

If the new entry points to a nonexistent entry in the Neighbor Cache, it will also be produced, marked as unfinished and address resolution (English Address resolution) initiated. The packet is placed in the queue and placed in the Neighbor Cache a pointer to it.

Address resolution

To determine the link-layer address of a node, a Neighbor Solicitation message via IPv6 multicast is sent to the so-called solicited node address of the destination. It should be noted that on link-layer level multicast is also used - so every IPv6 node must be set to link-layer level, not only on his original fixed address (eg Ethernet ) to hear, but also on a, on its IPv6 address based specific multicast address. In the Neighbor Solicitation Package searched the complete IPv6 address is then contained in the payload, and only the nodes with the same address responds. It sends a Neighbor Advertisement message. The information contained in it is stored in the Neighbor Cache. If an entry was still unfinished, it can now be marked as reachable and packages, to which he refers can be triggered.

Example: An IPv6 host in an Ethernet network with a link- local IPv6 address fe80 :: 021D: e0ff: Fe2a: 4242 listening to the link-layer level, not only to the address 00:1 d: e0: 2a: 42:42, but also to the Ethernet multicast address 33:33: ff: 2a: 42:42. 33:33 is the part that identifies an IPv6 multicast packet, ff: 2a: 42:42 identifies the actual group.

The multicast destination for a Neighbor Solicitation packet to the IPv6 layer is then ff02 :: 1: FF2a: 4242nd

Unreachability detection of neighbors

To keep the Neighbor Cache date, trying to determine whether the entries are still currently in it. There are different ways of doing determine whether a node is not active. As long as you receive TCP data or TCP acknowledgments, we know that the node is still reachable.

If an entry exceeds its lifetime, without being confirmed by traffic, it is marked as obsolete. Once a packet will be sent, the entry is marked as delayed and tried for a short time to confirm it through traffic. If this does not happen, a Neighbor Solicitation message is sent to test the active node again. If he does not answer, it will be deleted from the Neighbor cache.

Duplicate address detection

With this method, identify network nodes if the address they have given up in the auto-configuration, is unique.

Diversion

Redirect messages are sent by routers to inform other nodes of a better first hop for a destination address. Upon receiving such a message, the destination cache is updated. If no matching entry in the destination cache is found, a new one is created.

ICMPv6 types

Router Solicitation - Type 133

Per Router Solicitation to the routers multicast address, all routers on the same network will be prompted to log on.

The code of this message is always 0 The field "Reserved" must be initialized with zeros by the sender and the receiver MUST ignore it.

The only possible option is the link-layer address of the sender. In order to not have problems with protocol extensions, all unknown options must be ignored.

Router Advertisement - Type 134

Per Router Advertisement Router announce their presence on the net. Either on request by Router Solicitation or periodically, not to be forgotten.

The hop limit is a 8 -bit value that contains the standard proposed by the router hop limit. A set M-bit tells the node that it should use next auto-configuration for the IP address and stateful autoconfiguration. A set O bit tells the node that it should use next auto configuration for all non-IP - address information and stateful autoconfiguration.

The Router Lifetime is a 16 -bit integer that specifies how to remain a router in the Default Router List in seconds. The maximum is 18.2 hours. A value of 0 means that the router is not a default router and should not be entered in the Default Router List.

The reachability timeout is a 32 -bit integer that indicates the number of milliseconds an entry in the neighbor cache upon receiving data still to be considered as accessible. The resolution timeout is a 32 -bit integer that specifies how many milliseconds again a Neighbor Solicitation should be sent.

Valid options are the link-layer address of the sender, the MTU of the router and all valid prefixes. In order to facilitate problem-free protocol extensions, all unknown options must be ignored.

Neighbor Solicitation - Type 135

Per Neighbor Solicitation (as much as Neighbor Solicitation ) to the link-layer multicast address of an IPv6 address from the multicast address of the relevant IPv6 address xx, using the address mapping of the last 3 bytes: yy: zz the solicited- node multicast address on the last 3 bytes of the link-layer address 33:33: FF: xx: yy: zz is calculated, IPv6 addresses can be resolved to link-layer addresses. Also as the reachability of a node is checked.

The type is set to 135 and the code to 0 The reserved field must be initialized with zeros by the sender and ignored by the receiver. The destination address is the IPv6 address to be resolved in a link-layer address. There must be no multicast address can be specified.

The only possible option is the link-layer address of the sender. In order to not have problems with protocol extensions, all unknown options must be ignored.

Neighbor Advertisement - Type 136

With a Neighbor Advertisement message is replied to Neighbor Solicitation messages.

The type is set to 136 and the code to 0, the R bit is set when the node is a router. The S bit is set when the Neighbor Advertisement is sent due to a unicast Neighbor Solicitation message.

A set O- bit indicates that the entry in the Neighbor Cache needs to be updated. The reserved field must be initialized with zeros by the sender and ignored by the receiver. Destined to the link-layer address is specified, was asked about the.

The only possible option is the link-layer address of the sender. In order to not have problems with protocol extensions, all unknown options must be ignored.

Redirect - Type 137

Per share Redirect message to the router, if there is a better first hop for a certain goal.

The type is set to 137 and the code to 0 The reserved field must be initialized with zeros by the sender and ignored by the receiver. The hop address is the preferable router for the address. The destination address is the address for which there is a better first-hop.

The only options available are the link-layer address of the sender and the header of the packet that triggered. In order to not have problems with protocol extensions, all unknown options must be ignored.

Implementation in operating systems

All IPv6 -enabled operating systems, which are operated in Ethernet -based networks, are able to resolve names using the NDP.

Under most Linux distributions obtained with the iproute2 tool for accessing the Neighbor Cache:

# Ip -6 neigh 2001:470:1 F0B: 2f2: 5cad: A77F: AAFF: 849 dev wlan0 lladdr 00:11:25:32:10: ab REACHABLE fe80 :: 2a10: 7bff: FE65: 58a dev wlan0 lladdr 28:10:7 b: 65: ab: cd router REACHABLE 2001:470:1 F0B: 2f2 :: cafe dev wlan0 lladdr 00:11:25:32:10: ab REACHABLE On many BSD-derived systems such as FreeBSD and OpenBSD this helps the plants stuff ndp, the options '- on ' mean that all hosts should be displayed numerically; here at FreeBSD 9 ( the comments were of course subsequently inserted to the right ):

# Ndp - at Neighbor Link Layer Address netif Expire S flags 2001:475: abcd: 2f2: 3189:67 c1: b550: 9400 c6: ab: 27:56: b5: 30 em0 14s RR # <- Another computer in the network, with Privacy Extensions 2001:475: abcd: 2f2: 211:25 ff: FU32: 10ab 00:11:25:32:10: ab em0 permanent R fe80 :: 211:25 ff: FU32: 10ab % em0 00:11:25:32:10: ab em0 permanent R 2001:475: abcd: 2f2 :: cafe 00:11:25:32:10: ab em0 permanent R # <- alias address fe80 :: 2a10: 7bff: FE65: 58a % em0 28:10:7 b: 65: ab: cd em0 23h59m25s SR # < - This is the router 2001:475: abcd: 2f2: 5cad: A77F: AAFF: 849 00:11:25:32:10: ab em0 permanent R fe80 :: c6ab: 27ff: fe56: b530 % em0 c6: ab: 27:56: b5: 30 em0 24s RR # <- The same computer as in the first line with its link-local address This is particularly noted the column Expire. It specifies when a name entry is classified as obsolete. The addresses of the computer itself are permanent, the router is located here at almost 24 hours and the neighboring devices on the network are mostly in under a minute, until the entry is refreshed.

On Windows, the command is:

# Netsh interface ipv6 show neighbors level = verbose Web Links

  • RFC 4861 - Neighbor Discovery for IP Version 6 ( IPv6)
  • RFC 3122 - Extensions to IPv6 Neighbor Discovery for Inverse Discovery Specification
  • Network protocol (data link layer )
  • IP Addressing
596932
de