ArticleslgStudy

computer science

Neighbor Discovery Protocol

Neighbor Discovery Protocol is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Neighbor Discovery Protocol rather than just read about it. In short: The Neighbor Discovery Protocol (NDP), or simply Neighbor Discovery (ND), is a protocol of the Internet protocol suite used with Internet Protocol Version 6 (IPv6). It operates at the internet layer of the Internet model, and is responsible for gathering various information required for network communication, including the configuration of local connections and the domain name servers and gateways.

Neighbor Discovery Protocol — main illustration
Neighbor Discovery Protocol — illustration

Key takeaways

  • Neighbor Discovery Protocol belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Neighbor Discovery Protocol to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Neighbor Discovery Protocol from memory before moving on to harder problems.

Reference excerpt

The Neighbor Discovery Protocol (NDP), or simply Neighbor Discovery (ND), is a protocol of the Internet protocol suite used with Internet Protocol Version 6 (IPv6). It operates at the internet layer of the Internet model, and is responsible for gathering various information required for network communication, including the configuration of local connections and the domain name servers and gateways. The protocol defines five ICMPv6 packet types to perform functions for IPv6 similar to the Address Resolution Protocol (ARP) and Internet Control Message Protocol (ICMP) Router Discovery and Router Redirect protocols for IPv4. It provides many improvements over its IPv4 counterparts. For example, it includes Neighbor Unreachability Detection (NUD), thus improving robustness of packet delivery in the presence of failing routers or links, or mobile nodes. The Inverse Neighbor Discovery (IND) protocol extension allows nodes to determine and advertise an IPv6 address corresponding to a given link-layer address, similar to Inverse ARP for IPv4. The Secure Neighbor Discovery Protocol (SEND), a security extension of NDP, uses Cryptographically Generated Addresses (CGA) and the Resource Public Key Infrastructure (RPKI) to provide an alternative mechanism for securing NDP with a cryptographic method that is independent of IPsec. Neighbor Discovery Proxy (ND Proxy) provides a service similar to IPv4 Proxy ARP and allows bridging multiple network segments within a single subnet prefix when bridging cannot be done at the link layer.

Functions NDP defines five ICMPv6 packet types for the purpose of router solicitation, router advertisement, neighbor solicitation, neighbor advertisement, and network redirects.

Router Solicitation (Type 133) Hosts inquire with Router Solicitation messages to locate routers on an attached link. Routers which forward packets not addressed to them generate Router Advertisements immediately upon receipt of this message rather than at their next scheduled time. Router Advertisement (Type 134) Routers advertise their presence together with various link and Internet parameters either periodically, or in response to a Router Solicitation message. Neighbor Solicitation (Type 135) Neighbor solicitations are used by nodes to determine the link-layer address of a neighbor, or to verify that a neighbor is still reachable via a cached link-layer address. Neighbor Advertisement (Type 136) Neighbor advertisements are used by nodes to respond to a Neighbor Solicitation message, or unsolicited to provide new information quickly. Redirect (Type 137) Routers may inform hosts of a better first-hop router for a destination. These messages are used to provide the following functionality:

Router discovery: hosts can locate routers residing on attached links. Prefix discovery: hosts can discover address prefixes that are on-link for attached links. Parameter discovery: hosts can find link parameters (e.g., MTU). Address autoconfiguration: optional stateless configuration of addresses of network interfaces (see IPv6 § Stateless address autoconfiguration (SLAAC) and IPv6 address § Stateless address autoconfiguration). Address resolution: mapping between IP addresses and link-layer addresses. Next-hop determination: hosts can find next-hop routers for a destination. Neighbor unreachability detection (NUD): determine that a neighbor is no longer reachable on the link. Duplicate address detection (DAD): nodes can check whether an address is already in use. Recursive DNS Server (RDNSS) and DNS Search List (DNSSL) assignment via a router advertisement (RA) options. This is a proposed standard since 2010 and updated in March 2017, but not supported by all clients. Packet redirection to provide a better next-hop route for certain destinations. IANA maintains a list of all current NDP options as they are published.

Example Two computers, A and B are connected to the same local area network with no intervening gateway or router. A has a packet to send to IP address 2001:db8::55 which happens to be the address of B. Before sending the packet, A must determine B’s layer 2 (MAC) address. Computer A creates B’s solicited-node multicast address by appending the least-significant 24 bits of B's address to the prefix ff02::1:ff00:0/104, resulting in ff02::1:ff00:55. Computer A then creates a B’s corresponding solicited-node multicast MAC address by appending the least-significant 24 bits of the solicited-node multicast address to the prefix 33:33:FF, which results in 33:33:FF:00:00:55. Computer A sends a neighbor solicitation message with 2001:db8::55 as the target address. The message is encapsulated in an IPv6 packet with ff02::1:ff00:55 as the destination IP address, which is encapsulated in an Ethernet frame with destination MAC address 33:33:FF:00:00:55. This neighbor solicitation packet is accepted by B which is listening on its own solicited-node multicast address on the local network. B responds with a neighbor advertisement message containing its MAC and IP addresses. A receives the response and sends the packet on the link with B's MAC address. Typically, network nodes maintain a lookup cache that associates IP and MAC addresses. In this example, if A had the lookup cached, then it would not need to send the NDP request. Also, when B received the request, it could cache the lookup to A so that if B needs to send a packet to A later, it does not need to use NDP to lookup its MAC address. Finally, when A receives the NDP response, it can cache the lookup for future messages addressed to the same IP address.

Messages formats

See also NDPMon – Software to monitor ICMPv6 packets radvd – Server software for computer network configuration

References

Illustrations

Neighbor Discovery Protocol illustration
Neighbor Discovery Protocol illustration
Neighbor Discovery Protocol illustration
Neighbor Discovery Protocol illustration
Neighbor Discovery Protocol illustration

Worked examples

Example 1 — a first encounter with Neighbor Discovery Protocol

Start with the simplest possible case. Write down what Neighbor Discovery Protocol claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Neighbor Discovery Protocol before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Neighbor Discovery Protocol ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Neighbor Discovery Protocol

In research
Neighbor Discovery Protocol appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Neighbor Discovery Protocol in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Neighbor Discovery Protocol is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computer-related introductions in 1996, IPv6, Internet Standards, so understanding it makes those chapters shorter.
In everyday life
Look for Neighbor Discovery Protocol outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Neighbor Discovery Protocol in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Neighbor Discovery Protocol means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Neighbor Discovery Protocol out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Neighbor Discovery Protocol in simple terms?

The Neighbor Discovery Protocol (NDP), or simply Neighbor Discovery (ND), is a protocol of the Internet protocol suite used with Internet Protocol Version 6 (IPv6). It operates at the internet layer of the Internet model, and is responsible for gathering various information required for network com…

Why does Neighbor Discovery Protocol matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Neighbor Discovery Protocol?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Neighbor Discovery Protocol.

Tags

  • Computer-related introductions in 1996
  • IPv6
  • Internet Standards
  • Internet protocols
  • Link protocols

Keep exploring