1*c1d86c14Sandvar.\" $NetBSD: ndp.8,v 1.33 2021/09/19 11:37:01 andvar Exp $ 28c2379fdSrpaulo.\" $KAME: ndp.8,v 1.33 2005/10/19 14:57:42 suz Exp $ 3f42e2180Sitojun.\" 44b8a1fecSitojun.\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 54b8a1fecSitojun.\" All rights reserved. 64b8a1fecSitojun.\" 74b8a1fecSitojun.\" Redistribution and use in source and binary forms, with or without 84b8a1fecSitojun.\" modification, are permitted provided that the following conditions 94b8a1fecSitojun.\" are met: 104b8a1fecSitojun.\" 1. Redistributions of source code must retain the above copyright 114b8a1fecSitojun.\" notice, this list of conditions and the following disclaimer. 124b8a1fecSitojun.\" 2. Redistributions in binary form must reproduce the above copyright 134b8a1fecSitojun.\" notice, this list of conditions and the following disclaimer in the 144b8a1fecSitojun.\" documentation and/or other materials provided with the distribution. 154b8a1fecSitojun.\" 3. Neither the name of the project nor the names of its contributors 164b8a1fecSitojun.\" may be used to endorse or promote products derived from this software 174b8a1fecSitojun.\" without specific prior written permission. 184b8a1fecSitojun.\" 194b8a1fecSitojun.\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND 204b8a1fecSitojun.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 214b8a1fecSitojun.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 224b8a1fecSitojun.\" ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE 234b8a1fecSitojun.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 244b8a1fecSitojun.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 254b8a1fecSitojun.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 264b8a1fecSitojun.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 274b8a1fecSitojun.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 284b8a1fecSitojun.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 294b8a1fecSitojun.\" SUCH DAMAGE. 304b8a1fecSitojun.\" 319613f51dSroy.Dd September 15, 2020 324b8a1fecSitojun.Dt NDP 8 334b8a1fecSitojun.Os 344b8a1fecSitojun.\" 354b8a1fecSitojun.Sh NAME 364b8a1fecSitojun.Nm ndp 374b8a1fecSitojun.Nd control/diagnose IPv6 neighbor discovery protocol 384b8a1fecSitojun.\" 394b8a1fecSitojun.Sh SYNOPSIS 404b8a1fecSitojun.Nm ndp 41016477e9Sitojun.Op Fl nt 42d3583acfSitojun.Ar hostname 43d3583acfSitojun.Nm ndp 44d3583acfSitojun.Op Fl nt 4573dd2b52Sroy.Fl a | Fl c 46d3583acfSitojun.Nm ndp 47d3583acfSitojun.Op Fl nt 484b8a1fecSitojun.Fl A Ar wait 494b8a1fecSitojun.Nm ndp 50016477e9Sitojun.Op Fl nt 51016477e9Sitojun.Fl d Ar hostname 524b8a1fecSitojun.Nm ndp 534b8a1fecSitojun.Op Fl nt 54016477e9Sitojun.Fl f Ar filename 554b8a1fecSitojun.Nm ndp 56d3583acfSitojun.Op Fl nt 574b8a1fecSitojun.Fl i 584b8a1fecSitojun.Ar interface 598c2379fdSrpaulo.Op Ar expressions ... 604b8a1fecSitojun.Nm ndp 61d3583acfSitojun.Op Fl nt 62d3583acfSitojun.Fl s Ar nodename etheraddr 636a433be5Sitojun.Op Li temp 646a433be5Sitojun.Op Li proxy 654b8a1fecSitojun.\" 664b8a1fecSitojun.Sh DESCRIPTION 67f42e2180SitojunThe 684b8a1fecSitojun.Nm 694b8a1fecSitojuncommand manipulates the address mapping table 70016477e9Sitojunused by the Neighbor Discovery Protocol (NDP). 714b8a1fecSitojun.Bl -tag -width Ds 72ec5498f5Swiz.It Fl A Ar wait 73ec5498f5SwizRepeat 74ec5498f5Swiz.Fl a 75ec5498f5Swiz.Pq dump NDP entries 76ec5498f5Swizevery 77ec5498f5Swiz.Ar wait 78ec5498f5Swizseconds. 794b8a1fecSitojun.It Fl a 804b8a1fecSitojunDump the currently existing NDP entries. 81b09ce00bSitojunThe following information will be printed: 82016477e9Sitojun.Bl -tag -width NeighborXX 83b09ce00bSitojun.It Neighbor 84b09ce00bSitojunIPv6 address of the neighbor. 85b09ce00bSitojun.It Linklayer Address 86b09ce00bSitojunLinklayer address of the neighbor. 87b09ce00bSitojunIt could be 88b09ce00bSitojun.Dq Li (incomplete) 89b09ce00bSitojunwhen the address is not available. 90b09ce00bSitojun.It Netif 91b09ce00bSitojunNetwork interface associated with the neighbor cache entry. 92b09ce00bSitojun.It Expire 93016477e9SitojunThe time until expiry of the entry. 94b09ce00bSitojunThe entry could become 95016477e9Sitojun.Dq Li permanent , 96016477e9Sitojunin which case it will never expire. 97b09ce00bSitojun.It S 98016477e9SitojunState of the neighbor cache entry, as a single letter: 99016477e9Sitojun.Pp 100d3583acfSitojun.Bl -tag -width indent -compact 101ec5498f5Swiz.It D 102ec5498f5SwizDelay 103016477e9Sitojun.It I 104016477e9SitojunIncomplete 105ec5498f5Swiz.It N 106ec5498f5SwizNostate 107ec5498f5Swiz.It P 108ec5498f5SwizProbe 109016477e9Sitojun.It R 110016477e9SitojunReachable 111016477e9Sitojun.It S 112016477e9SitojunStale 1139613f51dSroy.It U 1149613f51dSroyUnreachable 115ec5498f5Swiz.It W 116ec5498f5SwizWaitdelete 117016477e9Sitojun.It ? 118016477e9SitojunUnknown state (should never happen). 119016477e9Sitojun.El 120016477e9Sitojun.It Flags 121b09ce00bSitojunFlags on the neighbor cache entry, in a single letter. 122b09ce00bSitojunThey are: Router, proxy neighbor advertisement 123b09ce00bSitojun.Pq Dq p . 124b09ce00bSitojunThe field could be followed by a decimal number, 1258b32b6b1Swizwhich means the number of NS probes the node has sent during the current state. 126b09ce00bSitojun.El 1274b8a1fecSitojun.It Fl c 1284b8a1fecSitojunErase all the NDP entries. 1294b8a1fecSitojun.It Fl d 1304b8a1fecSitojunDelete specified NDP entry. 1314b8a1fecSitojun.It Fl f 1324b8a1fecSitojunParse the file specified by 1334b8a1fecSitojun.Ar filename . 1348c2379fdSrpaulo.It Fl i Ar interface Op Ar expressions ... 1353e342405SitojunView ND information for the specified interface. 1363e342405SitojunIf additional arguments 1378c2379fdSrpaulo.Ar expressions 1383e342405Sitojunare given, 1393e342405Sitojun.Nm 1408c2379fdSrpaulosets or clears the flags or variables for the interface as specified in 1418c2379fdSrpaulothe expression. 1428c2379fdSrpauloEach expression should be separated by white spaces or tab characters. 1438c2379fdSrpauloPossible expressions are as follows. 1448c2379fdSrpauloSome of the expressions can begin with the 1453e342405Sitojunspecial character 1463e342405Sitojun.Ql - , 1478c2379fdSrpaulowhich means the flag specified in the expression should be cleared. 148d650d1adSitojunNote that you need 149d650d1adSitojun.Fl - 150d650d1adSitojunbefore 151d650d1adSitojun.Fl foo 152d650d1adSitojunin this case. 1533e342405Sitojun.\" 154016477e9Sitojun.Pp 1553e342405Sitojun.Bl -tag -width Ds -compact 1564945fc29Sjoerg.It Ic nud 157d3583acfSitojunTurn on or off NUD (Neighbor Unreachability Detection) on the 1585cb09b1cSitojuninterface. 1595cb09b1cSitojunNUD is usually turned on by default. 16003980252Sroy.It Ic auto_linklocal 16103980252SroySpecify whether or not to perform automatic link-local address configuration on 16203980252Sroy.Ar interface . 16303980252SroyThis flag is set by 16403980252Sroy.Li net.inet6.ip6.auto_linklocal 16503980252Sroysysctl variable. 1664945fc29Sjoerg.It Ic prefer_source 1678c2379fdSrpauloPrefer addresses on the 1688c2379fdSrpaulo.Ar interface 1698c2379fdSrpauloas candidates of the source address for outgoing packets. 1708c2379fdSrpauloThe default value of this flag is off. 1718c2379fdSrpauloFor more details about the entire algorithm of source address 1728c2379fdSrpauloselection, see the 1738c2379fdSrpaulo.Pa IMPLEMENTATION 1748c2379fdSrpaulofile supplied with the KAME kit. 1754945fc29Sjoerg.It Ic disabled 1768c2379fdSrpauloDisable IPv6 operation on the interface. 1778c2379fdSrpauloWhen disabled, the interface discards any IPv6 packets 178263486c9Sroyreceived on or being sent to the interface and any IPv6 addresses 179263486c9Sroyon the interface are marked as 180263486c9Sroy.Dq tentative . 181263486c9SroyWhen the disabled flag is cleared, DAD will be performed. 1828c2379fdSrpauloIn the sending case, an error of ENETDOWN will be returned to the 1838c2379fdSrpauloapplication. 1848c2379fdSrpauloThis flag is typically set automatically in the kernel as a result of 1858c2379fdSrpauloa certain failure of Duplicate Address Detection. 1868c2379fdSrpauloWhile the flag can be set or cleared by hand with the 1878c2379fdSrpaulo.Nm 1888c2379fdSrpaulocommand, it is not generally advisable to modify this flag manually. 1894945fc29Sjoerg.It Ic basereachable=(number) 190*c1d86c14SandvarSpecify the BaseReachableTimer on the interface in millisecond. 1914945fc29Sjoerg.It Ic retrans=(number) 1928c2379fdSrpauloSpecify the RetransTimer on the interface in millisecond. 1934945fc29Sjoerg.It Ic curhlim=(number) 1948c2379fdSrpauloSpecify the Cur Hop Limit on the interface. 1953e342405Sitojun.El 1964b8a1fecSitojun.It Fl n 197016477e9SitojunDo not try to resolve numeric addresses to hostnames. 1984b8a1fecSitojun.It Fl s 1998c2379fdSrpauloRegister an NDP entry for a node. 2006a433be5SitojunThe entry will be permanent unless the word 201d33dbf4bSmaxv.Cm temp 2026a433be5Sitojunis given in the command. 2036a433be5SitojunIf the word 204d33dbf4bSmaxv.Cm proxy 2058c2379fdSrpaulois given, this system will act as a proxy NDP server, 2066a433be5Sitojunresponding to requests for 2076a433be5Sitojun.Ar hostname 2086a433be5Sitojuneven though the host address is not its own. 2094b8a1fecSitojun.It Fl t 210016477e9SitojunPrint timestamp on each entry, 211016477e9Sitojunmaking it possible to merge output with 2129ce3f772Swiz.Xr tcpdump 8 . 2134b8a1fecSitojunMost useful when used with 2144b8a1fecSitojun.Fl A . 2154b8a1fecSitojun.El 2164b8a1fecSitojun.\" 217ec5498f5Swiz.Sh EXIT STATUS 218f42e2180SitojunThe 219f42e2180Sitojun.Nm 2208c2379fdSrpaulocommand will exit with 0 on success, and non-zero on errors. 2214b8a1fecSitojun.\" 2224b8a1fecSitojun.Sh SEE ALSO 2234b8a1fecSitojun.Xr arp 8 2244b8a1fecSitojun.\" 2254b8a1fecSitojun.Sh HISTORY 2264b8a1fecSitojunThe 2274b8a1fecSitojun.Nm 2288b32b6b1Swizcommand first appeared in the WIDE Hydrangea IPv6 protocol stack kit. 2294b8a1fecSitojun.\" 2304b8a1fecSitojun.\" .Sh BUGS 2314b8a1fecSitojun.\" (to be written) 232