xref: /openbsd-src/usr.sbin/ndp/ndp.8 (revision 50b7afb2c2c0993b0894d4e34bf857cb13ed9c80)
1.\"	$OpenBSD: ndp.8,v 1.32 2014/07/12 17:03:47 henning Exp $
2.\"	$KAME: ndp.8,v 1.28 2002/07/17 08:46:33 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 $Mdocdate: July 12 2014 $
32.Dt NDP 8
33.Os
34.\"
35.Sh NAME
36.Nm ndp
37.Nd control/diagnose IPv6 Neighbor Discovery Protocol (NDP)
38.\"
39.Sh SYNOPSIS
40.Nm ndp
41.Bk -words
42.Op Fl nrt
43.Op Fl a | c | p
44.Op Fl H | P | R
45.Op Fl A Ar wait
46.Op Fl d Ar hostname
47.Op Fl f Ar filename
48.Op Fl i Ar interface Op Ar flag ...
49.Op Fl s Ar nodename etheraddr Oo Ic temp Oc Op Ic proxy
50.Op Fl V Ar rdomain
51.Op Ar hostname
52.Ek
53.\"
54.Sh DESCRIPTION
55The
56.Nm
57command manipulates the address mapping table
58used by the Neighbor Discovery Protocol (NDP).
59.Bl -tag -width Ds
60.It Fl A Ar wait
61Repeat
62.Fl a
63.Pq dump NDP entries
64every
65.Ar wait
66seconds.
67.It Fl a
68Dump the currently existing NDP entries.
69The following information will be printed:
70.Bl -tag -width Ds -offset 3n
71.It Neighbor
72The IPv6 address of the neighbor.
73.It Linklayer Address
74The linklayer address of the neighbor.
75If the address is not available,
76it will be displayed as
77.Dq (incomplete) .
78.It Netif
79The network interface associated with the neighbor cache entry.
80.It Expire
81The time until expiry of the entry.
82If the entry is marked
83.Dq permanent ,
84it will never expire.
85.It S
86The state of the neighbor cache entry, as a single letter:
87.Pp
88.Bl -tag -width Ds -offset 3n -compact
89.It D
90Delay
91.It I
92Incomplete
93.It N
94Nostate
95.It P
96Probe
97.It R
98Reachable
99.It S
100Stale
101.It W
102Waitdelete
103.It \&?
104Unknown state (should never happen).
105.El
106.It Flags
107Flags on the neighbor cache entry, in a single letter.
108They are: Router
109.Pq Sq R
110and proxy neighbor advertisement
111.Pq Sq p .
112This field may be followed by a decimal number,
113representing the number of NS probes
114the node has sent during the current state.
115.El
116.It Fl c
117Erase all the NDP entries.
118.It Fl d Ar hostname
119Delete the specified NDP entry.
120.It Fl f Ar filename
121Parse the file specified by
122.Ar filename .
123.It Fl H
124Harmonize consistency between the routing table and the default router
125list; install the top entry of the list into the kernel routing table.
126.It Fl i Ar interface Op Ar flag ...
127View ND information for the specified interface.
128If additional arguments are given,
129.Nm
130sets or clears the specified flags for the interface.
131Each flag should be separated by whitespace or tab characters.
132Possible flags are as follows.
133All of the flags can begin with the
134special character
135.Ql - ,
136which means the flag should be cleared.
137Note that
138.Fl -
139would be needed before
140.Fl foo
141in this case.
142.\"
143.Bl -tag -width Ds
144.It Ic nud
145Turn on or off NUD (Neighbor Unreachability Detection) on the
146interface.
147NUD is usually turned on by default.
148.It Ic accept_rtadv
149Specify whether or not to accept Router Advertisement messages
150received on the
151.Ar interface .
152Note that the kernel does not accept Router Advertisement messages
153unless the interface is configured for inet6 autconfiguration.
154.\".It Xo
155.\".Ic prefer_source
156.\".Xc
157.\"Prefer addresses on the
158.\".Ar interface
159.\"as candidates of the source address for outgoing packets.
160.\"The default value of this flag is off.
161.\"For more details about the entire algorithm of source address
162.\"selection, see the
163.\".Pa IMPLEMENTATION
164.\"file supplied with the KAME kit.
165.El
166.It Fl n
167Do not try to resolve numeric addresses to hostnames.
168.It Fl P
169Flush all the entries in the prefix list.
170.It Fl p
171Show the prefix list.
172.It Fl R
173Flush all the entries in the default router list.
174.It Fl r
175Show the default router list.
176.It Xo
177.Fl s Ar nodename etheraddr
178.Op Cm temp
179.Op Cm proxy
180.Xc
181Register an NDP entry for a node.
182The entry will be permanent unless the word
183.Cm temp
184is given in the command.
185If the word
186.Cm proxy
187is given, this system will act as a proxy NDP server,
188responding to requests for
189.Ar hostname
190even though the host address is not its own.
191.It Fl t
192Print a timestamp on each entry,
193making it possible to merge output with
194.Xr tcpdump 8 .
195Most useful when used with
196.Fl A .
197.It Fl V Ar rdomain
198Set the routing domain to be used.
199The default is 0.
200.El
201.Sh EXIT STATUS
202.Ex -std ndp
203.\"
204.Sh SEE ALSO
205.Xr ip6 4 ,
206.Xr sysctl.conf 5 ,
207.Xr arp 8 ,
208.Xr sysctl 8 ,
209.Xr tcpdump 8
210.\"
211.Sh HISTORY
212The
213.Nm
214command first appeared in the WIDE Hydrangea IPv6 protocol stack kit.
215.\"
216.\" .Sh BUGS
217.\" (to be written)
218