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