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