#readwise
# Neighbor Discovery Protocol - Wikipedia

## Metadata
- Author: [[wikipedia.org]]
- Full Title: Neighbor Discovery Protocol - Wikipedia
- URL: https://en.wikipedia.org/wiki/Neighbor_Discovery_Protocol
## Summary
The Neighbor Discovery Protocol (NDP) is used in IPv6 networks to help devices communicate and find each other. It defines five types of messages for functions like router discovery and address resolution. NDP improves on older protocols by adding features like Neighbor Unreachability Detection for better reliability. It also includes security extensions to protect information exchanged in the network.
## Highlights
The Neighbor Discovery Protocol (NDP), or simply Neighbor Discovery (ND), is a protocol of the [[Internet Protocol Suite - Wikipedia|Internet protocol suite]] used with [[IPv6 - Wikipedia|Internet Protocol Version 6]] (IPv6). It operates at the [[Internet Layer - Wikipedia|internet layer]] of the [[Internet Protocol Suite - Wikipedia|Internet protocol suite]], and is responsible for gathering various information required for network communication, including the configuration of local connections and the [domain name servers](https://en.wikipedia.org/wiki/Domain_name_server) and gateways. ([View Highlight](https://read.readwise.io/read/01jhtpv92accb8r8hgmb2rrwvx)) ^pfeyvg
---
NDP defines five [ICMPv6](https://en.wikipedia.org/wiki/ICMPv6) packet types for the purpose of router solicitation, router advertisement, neighbor solicitation, neighbor advertisement, and network redirects. ^asw911
- NDP ICMPv6 packet types ^5ba0d3
- 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: ^6jrfsk
- 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., [[Maximum Transmission Unit - Wikipedia|MTU]]).
- Address autoconfiguration: optional stateless configuration of addresses of network interfaces (see [IPv6 § Stateless address autoconfiguration (SLAAC)](https://en.wikipedia.org/wiki/IPv6#Stateless_address_autoconfiguration_(SLAAC)) and [IPv6 address § Stateless address autoconfiguration](https://en.wikipedia.org/wiki/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.
([View Highlight](https://read.readwise.io/read/01jhtpy03ck3kjyr4n1gxqb4pk))
---