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