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