2 .\" This file and its contents are supplied under the terms of the
3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
4 .\" You may only use this file in accordance with the terms of version
7 .\" A full copy of the text of the CDDL should have accompanied this
8 .\" source. A copy of the CDDL is also available via the Internet at
9 .\" http://www.illumos.org/license/CDDL.
12 .\" Copyright (c) 2015, Joyent, Inc. All rights reserved.
19 .Nd manipulate IPv6 Neighbor Discovery Protocol mappings
42 .Fl s Ar hostname lladdr
49 command displays and modifies the IPv6-to-MAC address translation
50 tables used by the Neighbor Discovery Protocol
51 .Po see Xr ndp 7P Pc .
53 Given just a hostname,
55 will display the current entry. Note that when getting, setting or deleting,
56 if a hostname refers to multiple IPv6 addresses, the operation will apply to
59 The NDP translation tables can be modified with
64 These flags can only be used when
67 .Sy PRIV_SYS_NET_CONFIG
70 for further information.
72 Note that NDP entries for IPMP (IP Network Multipathing) data and
73 test addresses are managed by the kernel and therefore cannot be
78 Display all NDP entries. Entries can be one of several types:
79 .Bl -tag -offset indent -width 7n
81 This is a normal NDP mapping and will eventually expire. This is the most
82 common type of mapping for non-local addresses that will be displayed.
84 The IPv6 address is local to the machine.
86 The mapping is a multicast or broadcast address, or the system is acting
87 as proxy for the address.
89 The mapping is static and will not be removed from the machine over time.
92 Entries also exist in one of the following states:
93 .Bl -tag -offset indent -width 12m
95 Address resolution is in progress
97 This address has recently been reachable
99 This address may be unreachable
101 Waiting to send out reachability probes
103 Sending out probes for the address
105 The address is unreachable, and will be deleted
107 The state of the entry is unknown
112 flag is equivalent to:
114 .Dl # netstat -p -f inet6
120 then it will be passed along to
123 Display all NDP entries every
127 Delete NDP mappings for the host called
130 Read in the lines from
132 and use each one to set a mapping. The syntax of each line is the
133 same as the arguments to
135 Lines beginning with `#' will be ignored.
139 will use the routing table to determine the appropriate interface to place the
140 mapping on. This flag allows forcing a specific interface
142 This argument will be ignored when using the
148 Disable the default translation of numeric IP addresses to host names when
151 Add or update an NDP mapping, and set the desired properties for the entry. The
152 list of flags should be the full set of flags desired on the entry, i.e., not
153 listing a flag will remove it if it already exists. The following flags can be
155 .Bl -tag -offset indent -width Ds
157 The entry should be temporary and eventually expire like a normal NDP
158 entry. By default, all entries created with the
160 command are static, and will not be deleted. To make a static entry temporary,
161 it should be deleted and recreated with the
165 The address should be treated like an anycast address. This will prevent the
166 system from sending Neighbor Advertisements with the Override flag.
168 The address should be treated like a router address. This cause the system to
169 send Neighbor Advertisements with the Router flag.
173 .Ss Example 1: Setting a mapping
174 To create a temporary mapping for an address:
175 .Bd -literal -offset indent
176 # ndp -s fd00::1 90:b8:d0:4b:c7:3b temp
178 .Ss Example 2: Getting a mapping
179 An entry can be fetched via its IP address:
180 .Bd -literal -offset indent
182 fd00::1 (fd00::1) at 90:b8:d0:4b:c7:3b temp
185 Or via a name that resolves to that address:
186 .Bd -literal -offset indent
187 # echo fd00::1 epicac >> /etc/hosts
188 # echo fd00::2 epicac >> /etc/hosts
190 fd00::1 (epicac) at 90:b8:d0:4b:c7:3b temp
191 fd00::2 (epicac) -- no entry
193 .Ss Example 3: Deleting a mapping
194 An entry can be removed with the
197 .Bd -literal -offset indent
201 Attempting to remove it again will print an error message:
202 .Bd -literal -offset indent
204 ndp: No entry for fd00::1
207 The command line options for this command are stable, but the output format
208 and diagnostic messages are not.