426 lines
7.6 KiB
HTML
426 lines
7.6 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of IP-NEIGHBOUR</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>IP-NEIGHBOUR</H1>
|
|
Section: Linux (8)<BR>Updated: 20 Dec 2011<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
ip-neighbour - neighbour/arp tables management.
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<P>
|
|
|
|
|
|
<BR>
|
|
|
|
<B>ip</B>
|
|
|
|
[ <I>OPTIONS</I> ]
|
|
|
|
<B>neigh</B>
|
|
|
|
{ <I>COMMAND</I> |
|
|
|
|
<B>help</B> }
|
|
|
|
<P>
|
|
<P>
|
|
<BR>
|
|
|
|
<B>ip neigh</B> { <B>add</B> | <B>del</B> | <B>change</B> | <B>replace</B> } {
|
|
|
|
<I>ADDR</I> [
|
|
|
|
<B>lladdr</B>
|
|
|
|
<I>LLADDR</I> ] [
|
|
|
|
<B>nud</B>
|
|
|
|
<I>STATE</I> ] |
|
|
|
|
<B>proxy</B>
|
|
|
|
<I>ADDR</I> } [
|
|
|
|
<B>dev</B>
|
|
|
|
<I>DEV</I> ] [
|
|
|
|
<B>router</B> ] [
|
|
|
|
<B>extern_learn</B> ]
|
|
|
|
<P>
|
|
<BR>
|
|
|
|
<B>ip neigh</B> { <B>show</B> | <B>flush</B> } [ <B>proxy</B> ] [ <B>to</B>
|
|
|
|
<I>PREFIX</I> ] [
|
|
|
|
<B>dev</B>
|
|
|
|
<I>DEV</I> ] [
|
|
|
|
<B>nud</B>
|
|
|
|
<I>STATE</I> ] [
|
|
|
|
<B>vrf</B>
|
|
|
|
<I>NAME</I> ]
|
|
|
|
<P>
|
|
<BR>
|
|
|
|
<B>ip neigh get</B>
|
|
|
|
<I>ADDR</I>
|
|
|
|
<B>dev</B>
|
|
|
|
<I>DEV</I>
|
|
|
|
<P>
|
|
<BR>
|
|
|
|
<I>STATE</I> := {
|
|
|
|
<B>permanent</B> | <B>noarp</B> | <B>stale</B> | <B>reachable</B> | <B>none</B> |
|
|
|
|
<B>incomplete</B> | <B>delay</B> | <B>probe</B> | <B>failed</B> }
|
|
|
|
<P>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
The
|
|
<B>ip neigh</B>
|
|
|
|
command manipulates
|
|
<I>neighbour</I>
|
|
|
|
objects that establish bindings between protocol addresses and
|
|
link layer addresses for hosts sharing the same link.
|
|
Neighbour entries are organized into tables. The IPv4 neighbour table
|
|
is also known by another name - the ARP table.
|
|
<P>
|
|
<P>
|
|
|
|
The corresponding commands display neighbour bindings
|
|
and their properties, add new neighbour entries and delete old ones.
|
|
<P>
|
|
<DL COMPACT>
|
|
<DT id="1">ip neighbour add<DD>
|
|
add a new neighbour entry
|
|
<DT id="2">ip neighbour change<DD>
|
|
change an existing entry
|
|
<DT id="3">ip neighbour replace<DD>
|
|
add a new entry or change an existing one
|
|
<DL COMPACT><DT id="4"><DD>
|
|
<P>
|
|
|
|
These commands create new neighbour records or update existing ones.
|
|
<P>
|
|
<DL COMPACT>
|
|
<DT id="5"><B>to</B><I> ADDRESS </I><B>(default)</B>
|
|
|
|
<DD>
|
|
the protocol address of the neighbour. It is either an IPv4 or IPv6 address.
|
|
<P>
|
|
<DT id="6"><B>dev</B><I> NAME</I>
|
|
|
|
<DD>
|
|
the interface to which this neighbour is attached.
|
|
<P>
|
|
<DT id="7"><B>proxy</B>
|
|
|
|
<DD>
|
|
indicates whether we are proxying for this neigbour entry
|
|
<P>
|
|
<DT id="8"><B>router</B>
|
|
|
|
<DD>
|
|
indicates whether neigbour is a router
|
|
<P>
|
|
<DT id="9"><B>extern_learn</B>
|
|
|
|
<DD>
|
|
this neigh entry was learned externally. This option can be used to
|
|
indicate to the kernel that this is a controller learnt dynamic entry.
|
|
Kernel will not gc such an entry.
|
|
<P>
|
|
<DT id="10"><B>lladdr</B><I> LLADDRESS</I>
|
|
|
|
<DD>
|
|
the link layer address of the neighbour.
|
|
<I>LLADDRESS</I>
|
|
|
|
can also be
|
|
<B>null</B>.
|
|
|
|
<P>
|
|
<DT id="11"><B>nud</B><I> STATE</I>
|
|
|
|
<DD>
|
|
the state of the neighbour entry.
|
|
<B>nud</B>
|
|
|
|
is an abbreviation for 'Neighbour Unreachability Detection'.
|
|
The state can take one of the following values:
|
|
<P>
|
|
<DL COMPACT><DT id="12"><DD>
|
|
<DL COMPACT>
|
|
<DT id="13"><B>permanent</B>
|
|
|
|
<DD>
|
|
the neighbour entry is valid forever and can be only
|
|
be removed administratively.
|
|
<DT id="14"><B>noarp</B>
|
|
|
|
<DD>
|
|
the neighbour entry is valid. No attempts to validate
|
|
this entry will be made but it can be removed when its lifetime expires.
|
|
<DT id="15"><B>reachable</B>
|
|
|
|
<DD>
|
|
the neighbour entry is valid until the reachability
|
|
timeout expires.
|
|
<DT id="16"><B>stale</B>
|
|
|
|
<DD>
|
|
the neighbour entry is valid but suspicious.
|
|
This option to
|
|
<B>ip neigh</B>
|
|
|
|
does not change the neighbour state if it was valid and the address
|
|
is not changed by this command.
|
|
<DT id="17"><B>none</B>
|
|
|
|
<DD>
|
|
this is a pseudo state used when initially creating a neighbour entry or after
|
|
trying to remove it before it becomes free to do so.
|
|
<DT id="18"><B>incomplete</B>
|
|
|
|
<DD>
|
|
the neighbour entry has not (yet) been validated/resolved.
|
|
<DT id="19"><B>delay</B>
|
|
|
|
<DD>
|
|
neighbor entry validation is currently delayed.
|
|
<DT id="20"><B>probe</B>
|
|
|
|
<DD>
|
|
neighbor is being probed.
|
|
<DT id="21"><B>failed</B>
|
|
|
|
<DD>
|
|
max number of probes exceeded without success, neighbor validation has
|
|
ultimately failed.
|
|
</DL>
|
|
</DL>
|
|
|
|
</DL>
|
|
</DL>
|
|
|
|
<P>
|
|
<DT id="22">ip neighbour delete<DD>
|
|
delete a neighbour entry
|
|
<DL COMPACT><DT id="23"><DD>
|
|
<P>
|
|
|
|
The arguments are the same as with
|
|
<B>ip neigh add</B>,
|
|
|
|
except that
|
|
<B>lladdr</B>
|
|
|
|
and
|
|
<B>nud</B>
|
|
|
|
are ignored.
|
|
<P>
|
|
<P>
|
|
|
|
<B>Warning:</B>
|
|
|
|
Attempts to delete or manually change a
|
|
<B>noarp</B>
|
|
|
|
entry created by the kernel may result in unpredictable behaviour.
|
|
Particularly, the kernel may try to resolve this address even
|
|
on a
|
|
<B>NOARP</B>
|
|
|
|
interface or if the address is multicast or broadcast.
|
|
</DL>
|
|
|
|
<P>
|
|
<DT id="24">ip neighbour show<DD>
|
|
list neighbour entries
|
|
<DL COMPACT><DT id="25"><DD>
|
|
<DL COMPACT>
|
|
<DT id="26"><B>to</B><I> ADDRESS </I><B>(default)</B>
|
|
|
|
<DD>
|
|
the prefix selecting the neighbours to list.
|
|
<P>
|
|
<DT id="27"><B>dev</B><I> NAME</I>
|
|
|
|
<DD>
|
|
only list the neighbours attached to this device.
|
|
<P>
|
|
<DT id="28"><B>vrf</B><I> NAME</I>
|
|
|
|
<DD>
|
|
only list the neighbours for given VRF.
|
|
<P>
|
|
<DT id="29"><B>proxy</B>
|
|
|
|
<DD>
|
|
list neighbour proxies.
|
|
<P>
|
|
<DT id="30"><B>unused</B>
|
|
|
|
<DD>
|
|
only list neighbours which are not currently in use.
|
|
<P>
|
|
<DT id="31"><B>nud</B><I> STATE</I>
|
|
|
|
<DD>
|
|
only list neighbour entries in this state.
|
|
<I>NUD_STATE</I>
|
|
|
|
takes values listed below or the special value
|
|
<B>all</B>
|
|
|
|
which means all states. This option may occur more than once.
|
|
If this option is absent,
|
|
<B>ip</B>
|
|
|
|
lists all entries except for
|
|
<B>none</B>
|
|
|
|
and
|
|
<B>noarp</B>.
|
|
|
|
</DL>
|
|
</DL>
|
|
|
|
<P>
|
|
<DT id="32">ip neighbour flush<DD>
|
|
flush neighbour entries
|
|
<DL COMPACT><DT id="33"><DD>
|
|
This command has the same arguments as
|
|
<B>show.</B>
|
|
|
|
The differences are that it does not run when no arguments are given,
|
|
and that the default neighbour states to be flushed do not include
|
|
<B>permanent</B>
|
|
|
|
and
|
|
<B>noarp</B>.
|
|
|
|
<P>
|
|
<P>
|
|
|
|
With the
|
|
<B>-statistics</B>
|
|
|
|
option, the command becomes verbose. It prints out the number of
|
|
deleted neighbours and the number of rounds made to flush the
|
|
neighbour table. If the option is given
|
|
twice,
|
|
<B>ip neigh flush</B>
|
|
|
|
also dumps all the deleted neighbours.
|
|
</DL>
|
|
|
|
<P>
|
|
<DT id="34">ip neigh get<DD>
|
|
lookup a neighbour entry to a destination given a device
|
|
<DL COMPACT><DT id="35"><DD>
|
|
<P>
|
|
<DL COMPACT>
|
|
<DT id="36"><B>proxy</B>
|
|
|
|
<DD>
|
|
indicates whether we should lookup a proxy neigbour entry
|
|
<P>
|
|
<DT id="37"><B>to</B><I> ADDRESS </I><B>(default)</B>
|
|
|
|
<DD>
|
|
the prefix selecting the neighbour to query.
|
|
<P>
|
|
<DT id="38"><B>dev</B><I> NAME</I>
|
|
|
|
<DD>
|
|
get neighbour entry attached to this device.
|
|
</DL>
|
|
</DL>
|
|
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAE"> </A>
|
|
<H2>EXAMPLES</H2>
|
|
|
|
<P>
|
|
|
|
ip neighbour
|
|
<DL COMPACT><DT id="39"><DD>
|
|
Shows the current neighbour table in kernel.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
ip neigh flush dev eth0
|
|
<DL COMPACT><DT id="40"><DD>
|
|
Removes entries in the neighbour table on device eth0.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
ip neigh get 10.0.1.10 dev eth0
|
|
<DL COMPACT><DT id="41"><DD>
|
|
Performs a neighbour lookup in the kernel and returns
|
|
a neighbour entry.
|
|
</DL>
|
|
|
|
<P>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<BR>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+ip">ip</A></B>(8)
|
|
|
|
<P>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
Original Manpage by Michail Litvak <<A HREF="mailto:mci@owl.openwall.com">mci@owl.openwall.com</A>>
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="42"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="43"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="44"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="45"><A HREF="#lbAE">EXAMPLES</A><DD>
|
|
<DT id="46"><A HREF="#lbAF">SEE ALSO</A><DD>
|
|
<DT id="47"><A HREF="#lbAG">AUTHOR</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:13 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|