]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - usr.sbin/ndp/ndp.8
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.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 Jan 10, 2013
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
140 Parse the file specified by
141 .Ar filename .
142 .It Fl H
143 Harmonize consistency between the routing table and the default router
144 list; install the top entry of the list into the kernel routing table.
145 .It Fl I
146 Shows the default interface used as the default route when
147 there is no default router.
148 .It Fl I Ar interface
149 Specifies the default interface used as the default route when
150 there is no default router.
151 The
152 .Ar interface
153 will be used as the default.
154 .It Fl I Li delete
155 The current default interface will be deleted from the kernel.
156 .It Fl i Ar interface Op Ar expressions ...
157 View ND information for the specified interface.
158 If additional arguments
159 .Ar expressions
160 are given,
161 .Nm
162 sets or clears the flags or variables for the interface as specified in
163 the expression.
164 Each expression should be separated by white spaces or tab characters.
165 Possible expressions are as follows.
166 Some of the expressions can begin with the
167 special character
168 .Ql - ,
169 which means the flag specified in the expression should be cleared.
170 Note that you need
171 .Fl -
172 before
173 .Fl foo
174 in this case.
175 .\"
176 .Bl -tag -width indent
177 .It Ic nud
178 Turn on or off NUD (Neighbor Unreachability Detection) on the
179 interface.
180 NUD is usually turned on by default.
181 .It Ic accept_rtadv
182 Specify whether or not to accept Router Advertisement messages
183 received on the
184 .Ar interface .
185 This flag is set by
186 .Va net.inet6.ip6.accept_rtadv
187 sysctl variable.
188 .It Ic auto_linklocal
189 Specify whether or not to perform automatic link-local address configuration
190 on
191 .Ar interface .
192 This flag is set by
193 .Va net.inet6.ip6.auto_linklocal
194 sysctl variable.
195 .It Ic prefer_source
196 Prefer addresses on the
197 .Ar interface
198 as candidates of the source address for outgoing packets.
199 The default value of this flag is off.
200 For more details about the entire algorithm of source address
201 selection, see the
202 .Pa IMPLEMENTATION
203 file supplied with the KAME kit.
204 .It Ic no_prefer_iface
205 The address on the outgoing interface is preferred by source addess
206 selection rule.
207 If this flag is set, stop treating the address on the
208 .Ar interface
209 as special even when the
210 .Ar interface
211 is outgoing interface.
212 The default value of this flag is off.
213 .It Ic disabled
214 Disable IPv6 operation on the interface.
215 When disabled, the interface discards any IPv6 packets
216 received on or being sent to the interface.
217 In the sending case, an error of ENETDOWN will be returned to the
218 application.
219 This flag is typically set automatically in the kernel as a result of
220 a certain failure of Duplicate Address Detection.
221 If the auto_linklocal per-interface flag is set, automatic link-local
222 address configuration is performed again when this flag is cleared.
223 .It Ic basereachable Ns Li = Ns Pq Ar number
224 Specify the BaseReachbleTimer on the interface in millisecond.
225 .It Ic retrans Ns Li = Ns Pq Ar number
226 Specify the RetransTimer on the interface in millisecond.
227 .It Ic curhlim Ns Li = Ns Pq Ar number
228 Specify the Cur Hop Limit on the interface.
229 .El
230 .It Fl n
231 Do not try to resolve numeric addresses to hostnames.
232 .It Fl p
233 Show prefix list.
234 The following information will be printed:
235 .Bl -tag -width indent
236 .It Cm if
237 The network interface associated with this prefix.
238 .It Cm flags
239 The status of the prefix, expressed by a combination of the following
240 letters:
241 .Pp
242 .Bl -tag -width indent -compact
243 .It Cm A
244 This prefix can be used for stateless address autoconfiguration.
245 .It Cm L, Cm O
246 This prefix can be used for on-link determination; that is, it can be
247 used to determine whether a given destination address is on-link.
248 .It Cm D
249 There are no reachable routers advertising this prefix.
250 .El
251 .It Cm vltime
252 Valid lifetime; the length of time for which the prefix and a stateless
253 autoconfigured address generated from this prefix can be used for the
254 source or destination address of a packet.
255 .It Cm pltime
256 Preferred lifetime; the length of time for which the prefix and a stateless
257 autoconfigured address generated from this prefix can be used by upper-layer
258 protocols unrestrictedly.
259 .It Cm expire
260 This is the remaining time that the prefix is in the valid state.
261 .It Cm ref
262 The number of kernel references held for this prefix.
263 .El
264 .It Fl P
265 Flush all the entries in the prefix list.
266 .It Fl r
267 Show default router list.
268 .It Fl R
269 Flush all the entries in the default router list.
270 .It Fl s
271 Register an NDP entry for a node.
272 The entry will be permanent unless the word
273 .Li temp
274 is given in the command.
275 If the word
276 .Li proxy
277 is given, this system will act as a proxy NDP server,
278 responding to requests for
279 .Ar hostname
280 even though the host address is not its own.
281 .It Fl t
282 Print timestamp for each entry,
283 to make it possible to merge the output with
284 .Xr tcpdump 1 .
285 Most useful when used with
286 .Fl A .
287 .El
288 .\"
289 .Sh EXIT STATUS
290 .Ex -std
291 .\"
292 .Sh SEE ALSO
293 .Xr arp 8
294 .\"
295 .Sh HISTORY
296 The
297 .Nm
298 utility first appeared in the WIDE Hydrangea IPv6 protocol stack kit.
299 The
300 .Fl I Ar auto_linklocal
301 flag first appeared in
302 .Fx 8.0 .
303 .\"
304 .\" .Sh BUGS
305 .\" (to be written)