xref: /netbsd-src/usr.sbin/ndp/ndp.8 (revision 5e4c038a45edbc7d63b7c2daa76e29f88b64a4e3)
1.\"	$NetBSD: ndp.8,v 1.15 2002/05/29 08:51:28 wiz Exp $
2.\"	$KAME: ndp.8,v 1.19 2002/05/29 07:34:01 itojun 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 May 17, 1998
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.Fl a
42.Op Fl nt
43.Nm ndp
44.Fl A Ar wait
45.Op Fl nt
46.Nm ndp
47.Fl c
48.Op Fl nt
49.Nm ndp
50.Fl d
51.Op Fl nt
52.Ar hostname
53.Nm ndp
54.Fl f
55.Op Fl nt
56.Ar filename
57.Nm ndp
58.Fl H
59.Nm ndp
60.Fl I
61.Op delete \(ba Ar interface
62.Nm ndp
63.Fl i
64.Ar interface
65.Op Ar flags ...
66.Nm ndp
67.Fl p
68.Nm ndp
69.Fl P
70.Nm ndp
71.Fl r
72.Nm ndp
73.Fl R
74.Nm ndp
75.Fl s
76.Op Fl nt
77.Ar nodename
78.Ar ether_addr
79.Op Li temp
80.Op Li proxy
81.\"
82.Sh DESCRIPTION
83The
84.Nm
85command manipulates the address mapping table
86used by Neighbor Discovery Protocol (NDP).
87.Bl -tag -width Ds
88.It Fl a
89Dump the currently existing NDP entries.
90The following information will be printed:
91.Bl -tag -width Ds
92.It Neighbor
93IPv6 address of the neighbor.
94.It Linklayer Address
95Linklayer address of the neighbor.
96It could be
97.Dq Li (incomplete)
98when the address is not available.
99.It Netif
100Network interface associated with the neighbor cache entry.
101.It Expire
102The time until the expiry of the entry.
103The entry could become
104.Dq Li permanent
105when it will never expire.
106.It S
107State of the neighbor cache entry, in a single letter.
108They are:
109Nostate, Waitdelete, Incomplete, Reachable, Stale, Delay and Probe.
110.Dq Li ?
111indicates unknown state, which should never happen.
112.It Flgs
113Flags on the neighbor cache entry, in a single letter.
114They are: Router, proxy neighbor advertisement
115.Pq Dq p .
116The field could be followed by a decimal number,
117which means the number of NS probes the node has sent during the current state.
118.El
119.It Fl A Ar wait
120Repeat
121.Fl a
122.Pq dump NDP entries
123every
124.Ar wait
125seconds.
126.It Fl c
127Erase all the NDP entries.
128.It Fl d
129Delete specified NDP entry.
130.It Fl f
131Parse the file specified by
132.Ar filename .
133.It Fl H
134Harmonize consistency between the routing table and the default router
135list; install the top entry of the list into the kernel routing table.
136.It Fl I Op delete \(ba Ar interface
137Shows or specifies the default interface used as the default route when
138there is no default router.
139If no argument is given to the option,
140the current default interface will be shown.
141If an
142.Ar interface
143is specified, the interface will be used as the default.
144If a special keyword
145.Ic delete
146is specified, the current default interface will be deleted from the kernel.
147.It Fl i Ar interface Op Ar flags ...
148View ND information for the specified interface.
149If additional arguments
150.Ar flags
151are given,
152.Nm
153sets or clears the specified flags for the interface.
154Each flag should be separated by white spaces or tab characters.
155Possible flags are as follows.
156All of the flags can begin with the
157special character
158.Ql - ,
159which means the flag should be cleared.
160.\"
161.Bl -tag -width Ds -compact
162.It Xo
163.Ic nud
164.Xc
165turn on or off NUD (Neighbor Unreachability Detection) on the
166interface.
167NUD is usually turned on by default.
168.El
169.It Fl n
170Do not try to resolve numeric address to hostname.
171.It Fl p
172Show prefix list.
173.It Fl P
174Flush all the entries in the prefix list.
175.It Fl r
176Show default router list.
177.It Fl R
178Flush all the entries in the default router list.
179.It Fl s
180Register an NDP entry for a node.
181The entry will be permanent unless the word
182.Li temp
183is given in the command.
184If the word
185.Li proxy
186is given, this system will act as an proxy NDP server,
187responding to requests for
188.Ar hostname
189even though the host address is not its own.
190.It Fl t
191Print timestamp on each entries,
192to make it possible to merge output with
193.Xr tcpdump 8 .
194Most useful when used with
195.Fl A .
196.El
197.\"
198.Sh EXIT STATUS
199The
200.Nm
201command exits 0 on success, and \*[Gt]0 on errors.
202.\"
203.Sh SEE ALSO
204.Xr arp 8
205.\"
206.Sh HISTORY
207The
208.Nm
209command first appeared in the WIDE Hydrangea IPv6 protocol stack kit.
210.\"
211.\" .Sh BUGS
212.\" (to be written)
213