1.\" $OpenBSD: ndp.8,v 1.28 2011/04/23 10:14:59 sobrado 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 23 2011 $ 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 Op Ar interface | Ic delete 49.Op Fl i Ar interface Op Ar flag ... 50.Op Fl s Ar nodename etheraddr Oo Ic temp Oc Op Ic proxy 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 127Shows the default interface used as the default route when 128there is no default router. 129.It Fl I Ar interface 130Specifies the default 131.Ar interface 132to be used when there is no interface specified even though required. 133.It Fl I Ic delete 134The current default interface will be deleted from the kernel. 135.It Fl i Ar interface Op Ar flag ... 136View ND information for the specified interface. 137If additional arguments are given, 138.Nm 139sets or clears the specified flags for the interface. 140Each flag should be separated by whitespace or tab characters. 141Possible flags are as follows. 142All of the flags can begin with the 143special character 144.Ql - , 145which means the flag should be cleared. 146Note that 147.Fl - 148would be needed before 149.Fl foo 150in this case. 151.\" 152.Bl -tag -width Ds 153.It Ic nud 154Turn on or off NUD (Neighbor Unreachability Detection) on the 155interface. 156NUD is usually turned on by default. 157.It Ic accept_rtadv 158Specify whether or not to accept Router Advertisement messages 159received on the 160.Ar interface . 161Note that the kernel does not accept Router Advertisement messages 162unless the 163.Li net.inet6.ip6.accept_rtadv 164variable is non-0, even if the flag is on. 165This flag is set to 1 by default. 166See 167.Xr sysctl 8 168and 169.Xr sysctl.conf 5 170for further details on how to set the 171.Li net.inet6.ip6.accept_rtadv 172variable. 173.\".It Xo 174.\".Ic prefer_source 175.\".Xc 176.\"Prefer addresses on the 177.\".Ar interface 178.\"as candidates of the source address for outgoing packets. 179.\"The default value of this flag is off. 180.\"For more details about the entire algorithm of source address 181.\"selection, see the 182.\".Pa IMPLEMENTATION 183.\"file supplied with the KAME kit. 184.El 185.It Fl n 186Do not try to resolve numeric addresses to hostnames. 187.It Fl P 188Flush all the entries in the prefix list. 189.It Fl p 190Show the prefix list. 191.It Fl R 192Flush all the entries in the default router list. 193.It Fl r 194Show the default router list. 195.It Xo 196.Fl s Ar nodename etheraddr 197.Op Cm temp 198.Op Cm proxy 199.Xc 200Register an NDP entry for a node. 201The entry will be permanent unless the word 202.Cm temp 203is given in the command. 204If the word 205.Cm proxy 206is given, this system will act as a proxy NDP server, 207responding to requests for 208.Ar hostname 209even though the host address is not its own. 210.It Fl t 211Print a timestamp on each entry, 212making it possible to merge output with 213.Xr tcpdump 8 . 214Most useful when used with 215.Fl A . 216.El 217.Sh EXIT STATUS 218.Ex -std ndp 219.\" 220.Sh SEE ALSO 221.Xr ip6 4 , 222.Xr sysctl.conf 5 , 223.Xr arp 8 , 224.Xr sysctl 8 , 225.Xr tcpdump 8 226.\" 227.Sh HISTORY 228The 229.Nm 230command first appeared in the WIDE Hydrangea IPv6 protocol stack kit. 231.\" 232.\" .Sh BUGS 233.\" (to be written) 234