IPv6 Protocol · Topic 2 of 3

Neighbor Discovery Protocol

Learn what Neighbor Discovery does in IPv6, including address resolution, router discovery, duplicate detection, neighbour states and RouterOS ND settings.

  • 4 min
In a nutshell
  • ND replaces ARP and also discovers routers, prefixes and duplicate addresses.
  • ND runs over ICMPv6 and mostly uses link local multicast.
  • A Neighbor Solicitation goes to the solicited node multicast address.

What it is

Neighbor Discovery, or ND, is the protocol that lets IPv6 nodes find each other and the routers on a link.

It replaces several IPv4 tools at once. It does the job of ARP, it finds routers, and it announces prefixes. It also checks that addresses are unique and that neighbours are still alive.

ND runs over ICMPv6, not over a separate protocol like ARP. Its messages are sent mostly to multicast groups on the local link.

Host Awants MAC of Host BNeighbor SolicitationSolicited node groupff02::1:ffxx:xxxxHost Breplies with MAC

How it works

ND provides six main functions, built from a small set of messages.

What ND does

FunctionPurpose
Address resolutionFind the MAC address that belongs to an IPv6 address
Router discoveryFind the routers on the link
Prefix discoveryLearn which prefixes are on the link
Duplicate address detectionCheck that a new address is unique
Neighbor unreachability detectionCheck that a neighbour still responds
RedirectTell a host about a better first hop

The details of each message are on the ICMPv6 and ND messages page. Here you need the overall picture.

Address resolution

A host that wants to send to an address on the same link needs the MAC address. It sends a Neighbor Solicitation to the solicited node multicast address of the target. The target answers with a Neighbor Advertisement that carries its MAC address.

The result is stored in the neighbour cache. This is the IPv6 equal of the ARP table. Because the solicitation goes to a small group, most hosts on the link never see it.

Router discovery and prefixes

A router sends Router Advertisements, which carry prefixes and the router lifetime. A host can also ask at start up with a Router Solicitation. The router then replies without waiting for the next timed advertisement.

Two flags in the advertisement matter for configuration:

  • Managed address configuration (M): the host should use DHCPv6 for its address.
  • Other configuration (O): the host should use DHCPv6 for other settings, such as DNS, but may use SLAAC for the address.

Each prefix in an advertisement has its own flags. The on-link flag says the prefix is directly reachable on the link. The autonomous flag says the host may use it for SLAAC.

Neighbour states

An entry in the neighbour cache moves through states:

StateMeaning
IncompleteResolution is under way and no MAC address is known
ReachableRecently confirmed as reachable
StaleNot confirmed lately, but still used
DelayWaiting briefly before probing
ProbeSending unicast solicitations to check
FailedResolution did not succeed

You can read the cache on RouterOS with this command.

/ipv6 neighbor print

ND settings on RouterOS

RouterOS sends Router Advertisements from the /ipv6 nd menu. The default entry applies to all interfaces, and you add an entry to treat one interface differently.

/ipv6 nd add interface=bridge-lan managed-address-configuration=yes other-configuration=yes
/ipv6 nd add interface=ether1 disabled=yes

Useful parameters include ra-interval, ra-lifetime, mtu, hop-limit, advertise-dns and advertise-mac-address. A prefix has its own settings under /ipv6 nd prefix.

/ipv6 nd prefix add interface=bridge-lan prefix=2001:db8:1::/64 autonomous=yes on-link=yes

When an address has advertise=yes, RouterOS creates a matching prefix entry dynamically. You add a manual entry only to change its lifetimes or flags.

Routeripv6 ndRouter AdvertisementLinkff02::1 all nodesHostsbuild address by SLAAC
Exam tip

Disable Router Advertisements on the WAN interface of an edge router. Otherwise your ISP side hears prefixes meant only for your LAN.

What to remember for the exam

Seven facts cover most questions on this topic.

  • ND replaces ARP and also discovers routers, prefixes and duplicate addresses.
  • ND runs over ICMPv6 and mostly uses link local multicast.
  • A Neighbor Solicitation goes to the solicited node multicast address.
  • The M flag means use DHCPv6 for addresses. The O flag means use DHCPv6 for other settings.
  • The neighbour cache is shown with /ipv6 neighbor print.
  • Router Advertisements are configured in /ipv6 nd, and prefixes in /ipv6 nd prefix.
  • Neighbour states are incomplete, reachable, stale, delay, probe and failed.
Watch out

If ICMPv6 is blocked on a link, ND stops working and the link appears dead even though the cable is fine.

Common mistakes

These four mistakes appear often.

Looking for an ARP table. IPv6 has none. Use /ipv6 neighbor print.

Blocking all ICMPv6. This breaks address resolution and router discovery, so nothing on the link can talk.

Mixing up the M and O flags. M controls addresses, and O controls only other settings.

Advertising on the WAN. An ND entry on the uplink sends your prefixes to the ISP side. Disable it there.

Check yourself

Work through these three questions.

  • Which message does a host send to learn the MAC address of a neighbour?

    It sends a Neighbor Solicitation to the solicited node multicast address of the target.

  • What is the difference between the M and O flags in a Router Advertisement?

    M tells hosts to use DHCPv6 for addresses, and O tells them to use DHCPv6 for other settings only.

  • Which command shows the IPv6 neighbour cache on RouterOS?

    /ipv6 neighbor print.

Topic 2 of 3 in IPv6 Protocol

Test yourself on IPv6 Protocol

The full MikroTik MTCIPv6E question bank has 486 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by MikroTik. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.