]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.sbin/ndp/ndp.8
zfs: merge openzfs/zfs@86e115e21
[FreeBSD/FreeBSD.git] / usr.sbin / ndp / ndp.8
1 .\"     $KAME: ndp.8,v 1.28 2002/07/17 08:46:33 itojun Exp $
2 .\"
3 .\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
4 .\" All rights reserved.
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\"    notice, this list of conditions and the following disclaimer in the
13 .\"    documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the project nor the names of its contributors
15 .\"    may be used to endorse or promote products derived from this software
16 .\"    without specific prior written permission.
17 .\"
18 .\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" SUCH DAMAGE.
29 .\"
30 .Dd May 9, 2014
31 .Dt NDP 8
32 .Os
33 .\"
34 .Sh NAME
35 .Nm ndp
36 .Nd control/diagnose IPv6 neighbor discovery protocol
37 .\"
38 .Sh SYNOPSIS
39 .Nm
40 .Op Fl nt
41 .Ar hostname
42 .Nm
43 .Op Fl nt
44 .Fl a | c | p
45 .Nm
46 .Op Fl nt
47 .Fl r
48 .Nm
49 .Op Fl nt
50 .Fl H | P | R
51 .Nm
52 .Op Fl nt
53 .Fl A Ar wait
54 .Nm
55 .Op Fl nt
56 .Fl d Ar hostname
57 .Nm
58 .Op Fl nt
59 .Fl f Ar filename
60 .Nm
61 .Op Fl nt
62 .Fl i
63 .Ar interface
64 .Op Ar expressions ...
65 .Nm
66 .Op Fl nt
67 .Fl I Op Ar interface | Li delete
68 .Nm
69 .Op Fl nt
70 .Fl s Ar nodename etheraddr
71 .Op Li temp
72 .Op Li proxy
73 .\"
74 .Sh DESCRIPTION
75 The
76 .Nm
77 utility manipulates the address mapping table
78 used by the Neighbor Discovery Protocol (NDP).
79 .Bl -tag -width indent
80 .It Fl a
81 Dump the currently existing NDP entries.
82 The following information will be printed:
83 .Bl -tag -width "Neighbor"
84 .It Neighbor
85 IPv6 address of the neighbor.
86 .It Linklayer Address
87 Linklayer address of the neighbor.
88 It could be
89 .Dq Li (incomplete)
90 when the address is not available.
91 .It Netif
92 Network interface associated with the neighbor cache entry.
93 .It Expire
94 The time until expiry of the entry.
95 The entry could become
96 .Dq Li permanent ,
97 in which case it will never expire.
98 .It S
99 State of the neighbor cache entry, as a single letter:
100 .Pp
101 .Bl -tag -width indent -compact
102 .It N
103 Nostate
104 .It W
105 Waitdelete
106 .It I
107 Incomplete
108 .It R
109 Reachable
110 .It S
111 Stale
112 .It D
113 Delay
114 .It P
115 Probe
116 .It ?\&
117 Unknown state (should never happen).
118 .El
119 .It Flags
120 Flags on the neighbor cache entry, in a single letter.
121 They are: Router, proxy neighbor advertisement
122 .Pq Dq p .
123 The field could be followed by a decimal number,
124 which means the number of NS probes the node has sent during the current state.
125 .El
126 .It Fl A Ar wait
127 Repeat
128 .Fl a
129 (dump NDP entries)
130 every
131 .Ar wait
132 seconds.
133 .It Fl c
134 Erase all the NDP entries.
135 .It Fl d
136 Delete specified NDP entry.
137 .It Fl f Ar filename
138 Cause the file
139 .Ar filename
140 to be read and multiple entries to be set in the
141 .Tn NDP
142 table.
143 Entries
144 in the file should be of the form
145 .Pp
146 .Bd -ragged -offset indent -compact
147 .Ar hostname ether_addr
148 .Op Cm temp
149 .Op Cm proxy
150 .Ed
151 .Pp
152 with argument meanings as given above.
153 Leading whitespace and empty lines are ignored.
154 A
155 .Ql #
156 character will mark the rest of the line as a comment.
157 .It Fl H
158 Harmonize consistency between the routing table and the default router
159 list; install the top entry of the list into the kernel routing table.
160 .It Fl I
161 Shows the default interface used as the default route when
162 there is no default router.
163 .It Fl I Ar interface
164 Specifies the default interface used as the default route when
165 there is no default router.
166 The
167 .Ar interface
168 will be used as the default.
169 .It Fl I Li delete
170 The current default interface will be deleted from the kernel.
171 .It Fl i Ar interface Op Ar expressions ...
172 View ND information for the specified interface.
173 If additional arguments
174 .Ar expressions
175 are given,
176 .Nm
177 sets or clears the flags or variables for the interface as specified in
178 the expression.
179 Each expression should be separated by white spaces or tab characters.
180 Possible expressions are as follows.
181 Some of the expressions can begin with the
182 special character
183 .Ql - ,
184 which means the flag specified in the expression should be cleared.
185 Note that you need
186 .Fl -
187 before
188 .Fl foo
189 in this case.
190 .\"
191 .Bl -tag -width indent
192 .It Ic nud
193 Turn on or off NUD (Neighbor Unreachability Detection) on the
194 interface.
195 NUD is usually turned on by default.
196 .It Ic accept_rtadv
197 Specify whether or not to accept Router Advertisement messages
198 received on the
199 .Ar interface .
200 This flag is set by
201 .Va net.inet6.ip6.accept_rtadv
202 sysctl variable.
203 .It Ic auto_linklocal
204 Specify whether or not to perform automatic link-local address configuration
205 on
206 .Ar interface .
207 This flag is set by
208 .Va net.inet6.ip6.auto_linklocal
209 sysctl variable.
210 .It Ic no_prefer_iface
211 The address on the outgoing interface is preferred by source addess
212 selection rule.
213 If this flag is set, stop treating the address on the
214 .Ar interface
215 as special even when the
216 .Ar interface
217 is outgoing interface.
218 The default value of this flag is off.
219 .It Ic disabled
220 Disable IPv6 operation on the interface.
221 When disabled, the interface discards any IPv6 packets
222 received on or being sent to the interface.
223 In the sending case, an error of ENETDOWN will be returned to the
224 application.
225 This flag is typically set automatically in the kernel as a result of
226 a certain failure of Duplicate Address Detection.
227 If the auto_linklocal per-interface flag is set, automatic link-local
228 address configuration is performed again when this flag is cleared.
229 .It Ic basereachable Ns Li = Ns Pq Ar number
230 Specify the BaseReachbleTimer on the interface in millisecond.
231 .It Ic retrans Ns Li = Ns Pq Ar number
232 Specify the RetransTimer on the interface in millisecond.
233 .It Ic curhlim Ns Li = Ns Pq Ar number
234 Specify the Cur Hop Limit on the interface.
235 .El
236 .It Fl n
237 Do not try to resolve numeric addresses to hostnames.
238 .It Fl p
239 Show prefix list.
240 The following information will be printed:
241 .Bl -tag -width indent
242 .It Cm if
243 The network interface associated with this prefix.
244 .It Cm flags
245 The status of the prefix, expressed by a combination of the following
246 letters:
247 .Pp
248 .Bl -tag -width indent -compact
249 .It Cm A
250 This prefix can be used for stateless address autoconfiguration.
251 .It Cm L, Cm O
252 This prefix can be used for on-link determination; that is, it can be
253 used to determine whether a given destination address is on-link.
254 .It Cm D
255 There are no reachable routers advertising this prefix.
256 .El
257 .It Cm vltime
258 Valid lifetime; the length of time for which the prefix and a stateless
259 autoconfigured address generated from this prefix can be used for the
260 source or destination address of a packet.
261 .It Cm pltime
262 Preferred lifetime; the length of time for which the prefix and a stateless
263 autoconfigured address generated from this prefix can be used by upper-layer
264 protocols unrestrictedly.
265 .It Cm expire
266 This is the remaining time that the prefix is in the valid state.
267 .It Cm ref
268 The number of kernel references held for this prefix.
269 .El
270 .It Fl P
271 Flush all the entries in the prefix list.
272 .It Fl r
273 Show default router list.
274 .It Fl R
275 Flush all the entries in the default router list.
276 .It Fl s
277 Register an NDP entry for a node.
278 The entry will be permanent unless the word
279 .Li temp
280 is given in the command.
281 If the word
282 .Li proxy
283 is given, this system will act as a proxy NDP server,
284 responding to requests for
285 .Ar hostname
286 even though the host address is not its own.
287 .It Fl t
288 Print timestamp for each entry,
289 to make it possible to merge the output with
290 .Xr tcpdump 1 .
291 Most useful when used with
292 .Fl A .
293 .El
294 .\"
295 .Sh EXIT STATUS
296 .Ex -std
297 .\"
298 .Sh SEE ALSO
299 .Xr arp 8
300 .\"
301 .Sh HISTORY
302 The
303 .Nm
304 utility first appeared in the WIDE Hydrangea IPv6 protocol stack kit.
305 The
306 .Fl I Ar auto_linklocal
307 flag first appeared in
308 .Fx 8.0 .
309 .\"
310 .\" .Sh BUGS
311 .\" (to be written)