NDP(8) Maintenance Procedures NDP(8)


ndp - manipulate IPv6 Neighbor Discovery Protocol mappings


ndp [-n] -a
ndp [-n] -A period
ndp [-n] [-i iface] hostname
ndp [-n] [-i iface] -d hostname
ndp [-n] [-i iface] -f filename
ndp [-n] [-i iface] -s hostname lladdr [temp] [any] [router]


The ndp command displays and modifies the IPv6-to-MAC address translation
tables used by the Neighbor Discovery Protocol (see ndp(4P)).

Given just a hostname, ndp will display the current entry. Note that when
getting, setting or deleting, if a hostname refers to multiple IPv6
addresses, the operation will apply to all of them.

The NDP translation tables can be modified with -d, -s, or -f. These flags
can only be used when ndp is given the PRIV_SYS_NET_CONFIG privilege. See
privileges(7) for further information.

Note that NDP entries for IPMP (IP Network Multipathing) data and test
addresses are managed by the kernel and therefore cannot be modified or


-a Display all NDP entries. Entries can be one of several types:

dynamic This is a normal NDP mapping and will eventually
expire. This is the most common type of mapping for
non-local addresses that will be displayed.

local The IPv6 address is local to the machine.

other The mapping is a multicast or broadcast address, or
the system is acting as proxy for the address.

static The mapping is static and will not be removed from
the machine over time.

Entries also exist in one of the following states:

INCOMPLETE Address resolution is in progress

REACHABLE This address has recently been reachable

STALE This address may be unreachable

DELAY Waiting to send out reachability probes

PROBE Sending out probes for the address

UNREACHABLE The address is unreachable, and will be deleted

UNKNOWN The state of the entry is unknown

Using the -a flag is equivalent to:

# netstat -p -f inet6

If -n is passed to ndp, then it will be passed along to netstat.

-A Display all NDP entries every period seconds.

-d Delete NDP mappings for the host called hostname.

-f Read in the lines from filename and use each one to set a mapping.
The syntax of each line is the same as the arguments to -s. Lines
beginning with `#' will be ignored.

-i By default, ndp will use the routing table to determine the
appropriate interface to place the mapping on. This flag allows
forcing a specific interface iface. This argument will be ignored
when using the -a or -A flags.

-n Disable the default translation of numeric IP addresses to host
names when printing.

-s Add or update an NDP mapping, and set the desired properties for
the entry. The list of flags should be the full set of flags
desired on the entry, i.e., not listing a flag will remove it if it
already exists. The following flags can be used:

temp The entry should be temporary and eventually expire
like a normal NDP entry. By default, all entries
created with the ndp command are static, and will not
be deleted. To make a static entry temporary, it
should be deleted and recreated with the temp flag.

any The address should be treated like an anycast
address. This will prevent the system from sending
Neighbor Advertisements with the Override flag.

router The address should be treated like a router address.
This cause the system to send Neighbor Advertisements
with the Router flag.


Example 1: Setting a mapping
To create a temporary mapping for an address:

# ndp -s fd00::1 90:b8:d0:4b:c7:3b temp

Example 2: Getting a mapping
An entry can be fetched via its IP address:

# ndp fd00::1
fd00::1 (fd00::1) at 90:b8:d0:4b:c7:3b temp

Or via a name that resolves to that address:

# echo fd00::1 epicac >> /etc/hosts
# echo fd00::2 epicac >> /etc/hosts
# ndp epicac
fd00::1 (epicac) at 90:b8:d0:4b:c7:3b temp
fd00::2 (epicac) -- no entry

Example 3: Deleting a mapping
An entry can be removed with the -d flag:

# ndp -d fd00::1

Attempting to remove it again will print an error message:

# ndp -d fd00::1
ndp: No entry for fd00::1


The command line options for this command are stable, but the output format
and diagnostic messages are not.


ndp(4P), attributes(7), privileges(7), arp(8), ifconfig(8), netstat(8)

OmniOS September 2, 2015 OmniOS