1.\" $NetBSD: ndp.8,v 1.32 2020/09/15 10:11:35 roy Exp $ 2.\" $KAME: ndp.8,v 1.33 2005/10/19 14:57:42 suz 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 September 15, 2020 32.Dt NDP 8 33.Os 34.\" 35.Sh NAME 36.Nm ndp 37.Nd control/diagnose IPv6 neighbor discovery protocol 38.\" 39.Sh SYNOPSIS 40.Nm ndp 41.Op Fl nt 42.Ar hostname 43.Nm ndp 44.Op Fl nt 45.Fl a | Fl c 46.Nm ndp 47.Op Fl nt 48.Fl A Ar wait 49.Nm ndp 50.Op Fl nt 51.Fl d Ar hostname 52.Nm ndp 53.Op Fl nt 54.Fl f Ar filename 55.Nm ndp 56.Op Fl nt 57.Fl i 58.Ar interface 59.Op Ar expressions ... 60.Nm ndp 61.Op Fl nt 62.Fl s Ar nodename etheraddr 63.Op Li temp 64.Op Li proxy 65.\" 66.Sh DESCRIPTION 67The 68.Nm 69command manipulates the address mapping table 70used by the Neighbor Discovery Protocol (NDP). 71.Bl -tag -width Ds 72.It Fl A Ar wait 73Repeat 74.Fl a 75.Pq dump NDP entries 76every 77.Ar wait 78seconds. 79.It Fl a 80Dump the currently existing NDP entries. 81The following information will be printed: 82.Bl -tag -width NeighborXX 83.It Neighbor 84IPv6 address of the neighbor. 85.It Linklayer Address 86Linklayer address of the neighbor. 87It could be 88.Dq Li (incomplete) 89when the address is not available. 90.It Netif 91Network interface associated with the neighbor cache entry. 92.It Expire 93The time until expiry of the entry. 94The entry could become 95.Dq Li permanent , 96in which case it will never expire. 97.It S 98State of the neighbor cache entry, as a single letter: 99.Pp 100.Bl -tag -width indent -compact 101.It D 102Delay 103.It I 104Incomplete 105.It N 106Nostate 107.It P 108Probe 109.It R 110Reachable 111.It S 112Stale 113.It U 114Unreachable 115.It W 116Waitdelete 117.It ? 118Unknown state (should never happen). 119.El 120.It Flags 121Flags on the neighbor cache entry, in a single letter. 122They are: Router, proxy neighbor advertisement 123.Pq Dq p . 124The field could be followed by a decimal number, 125which means the number of NS probes the node has sent during the current state. 126.El 127.It Fl c 128Erase all the NDP entries. 129.It Fl d 130Delete specified NDP entry. 131.It Fl f 132Parse the file specified by 133.Ar filename . 134.It Fl i Ar interface Op Ar expressions ... 135View ND information for the specified interface. 136If additional arguments 137.Ar expressions 138are given, 139.Nm 140sets or clears the flags or variables for the interface as specified in 141the expression. 142Each expression should be separated by white spaces or tab characters. 143Possible expressions are as follows. 144Some of the expressions can begin with the 145special character 146.Ql - , 147which means the flag specified in the expression should be cleared. 148Note that you need 149.Fl - 150before 151.Fl foo 152in this case. 153.\" 154.Pp 155.Bl -tag -width Ds -compact 156.It Ic nud 157Turn on or off NUD (Neighbor Unreachability Detection) on the 158interface. 159NUD is usually turned on by default. 160.It Ic auto_linklocal 161Specify whether or not to perform automatic link-local address configuration on 162.Ar interface . 163This flag is set by 164.Li net.inet6.ip6.auto_linklocal 165sysctl variable. 166.It Ic prefer_source 167Prefer addresses on the 168.Ar interface 169as candidates of the source address for outgoing packets. 170The default value of this flag is off. 171For more details about the entire algorithm of source address 172selection, see the 173.Pa IMPLEMENTATION 174file supplied with the KAME kit. 175.It Ic disabled 176Disable IPv6 operation on the interface. 177When disabled, the interface discards any IPv6 packets 178received on or being sent to the interface and any IPv6 addresses 179on the interface are marked as 180.Dq tentative . 181When the disabled flag is cleared, DAD will be performed. 182In the sending case, an error of ENETDOWN will be returned to the 183application. 184This flag is typically set automatically in the kernel as a result of 185a certain failure of Duplicate Address Detection. 186While the flag can be set or cleared by hand with the 187.Nm 188command, it is not generally advisable to modify this flag manually. 189.It Ic basereachable=(number) 190Specify the BaseReachbleTimer on the interface in millisecond. 191.It Ic retrans=(number) 192Specify the RetransTimer on the interface in millisecond. 193.It Ic curhlim=(number) 194Specify the Cur Hop Limit on the interface. 195.El 196.It Fl n 197Do not try to resolve numeric addresses to hostnames. 198.It Fl s 199Register an NDP entry for a node. 200The entry will be permanent unless the word 201.Cm temp 202is given in the command. 203If the word 204.Cm proxy 205is given, this system will act as a proxy NDP server, 206responding to requests for 207.Ar hostname 208even though the host address is not its own. 209.It Fl t 210Print timestamp on each entry, 211making it possible to merge output with 212.Xr tcpdump 8 . 213Most useful when used with 214.Fl A . 215.El 216.\" 217.Sh EXIT STATUS 218The 219.Nm 220command will exit with 0 on success, and non-zero on errors. 221.\" 222.Sh SEE ALSO 223.Xr arp 8 224.\" 225.Sh HISTORY 226The 227.Nm 228command first appeared in the WIDE Hydrangea IPv6 protocol stack kit. 229.\" 230.\" .Sh BUGS 231.\" (to be written) 232