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.
56 Note that when getting, setting or deleting, if a hostname refers to multiple
57 IPv6 addresses, the operation will apply to all of them.
59 The NDP translation tables can be modified with
64 These flags can only be used when
67 .Sy PRIV_SYS_NET_CONFIG
71 for further information.
73 Note that NDP entries for IPMP (IP Network Multipathing) data and
74 test addresses are managed by the kernel and therefore cannot be
79 Display all NDP entries.
80 Entries can be one of several types:
81 .Bl -tag -offset indent -width 7n
83 This is a normal NDP mapping and will eventually expire.
84 This is the most common type of mapping for non-local addresses that will be
87 The IPv6 address is local to the machine.
89 The mapping is a multicast or broadcast address, or the system is acting
90 as proxy for the address.
92 The mapping is static and will not be removed from the machine over time.
95 Entries also exist in one of the following states:
96 .Bl -tag -offset indent -width 12m
98 Address resolution is in progress
100 This address has recently been reachable
102 This address may be unreachable
104 Waiting to send out reachability probes
106 Sending out probes for the address
108 The address is unreachable, and will be deleted
110 The state of the entry is unknown
115 flag is equivalent to:
117 .Dl # netstat -p -f inet6
123 then it will be passed along to
126 Display all NDP entries every
130 Delete NDP mappings for the host called
133 Read in the lines from
135 and use each one to set a mapping.
136 The syntax of each line is the same as the arguments to
138 Lines beginning with `#' will be ignored.
142 will use the routing table to determine the appropriate interface to place the
144 This flag allows forcing a specific interface
146 This argument will be ignored when using the
152 Disable the default translation of numeric IP addresses to host names when
155 Add or update an NDP mapping, and set the desired properties for the entry.
156 The list of flags should be the full set of flags desired on the entry, i.e.,
157 not listing a flag will remove it if it already exists.
158 The following flags can be used:
159 .Bl -tag -offset indent -width Ds
161 The entry should be temporary and eventually expire like a normal NDP
163 By default, all entries created with the
165 command are static, and will not be deleted.
166 To make a static entry temporary, it should be deleted and recreated with the
170 The address should be treated like an anycast address.
171 This will prevent the system from sending Neighbor Advertisements with the
174 The address should be treated like a router address.
175 This cause the system to send Neighbor Advertisements with the Router flag.
179 .Ss Example 1: Setting a mapping
180 To create a temporary mapping for an address:
181 .Bd -literal -offset indent
182 # ndp -s fd00::1 90:b8:d0:4b:c7:3b temp
184 .Ss Example 2: Getting a mapping
185 An entry can be fetched via its IP address:
186 .Bd -literal -offset indent
188 fd00::1 (fd00::1) at 90:b8:d0:4b:c7:3b temp
191 Or via a name that resolves to that address:
192 .Bd -literal -offset indent
193 # echo fd00::1 epicac >> /etc/hosts
194 # echo fd00::2 epicac >> /etc/hosts
196 fd00::1 (epicac) at 90:b8:d0:4b:c7:3b temp
197 fd00::2 (epicac) -- no entry
199 .Ss Example 3: Deleting a mapping
200 An entry can be removed with the
203 .Bd -literal -offset indent
207 Attempting to remove it again will print an error message:
208 .Bd -literal -offset indent
210 ndp: No entry for fd00::1
213 The command line options for this command are stable, but the output format
214 and diagnostic messages are not.