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