|
Packit Service |
3880ab |
.TH IP\-NEIGHBOUR 8 "20 Dec 2011" "iproute2" "Linux"
|
|
Packit Service |
3880ab |
.SH "NAME"
|
|
Packit Service |
3880ab |
ip-neighbour \- neighbour/arp tables management.
|
|
Packit Service |
3880ab |
.SH "SYNOPSIS"
|
|
Packit Service |
3880ab |
.sp
|
|
Packit Service |
3880ab |
.ad l
|
|
Packit Service |
3880ab |
.in +8
|
|
Packit Service |
3880ab |
.ti -8
|
|
Packit Service |
3880ab |
.B ip
|
|
Packit Service |
3880ab |
.RI "[ " OPTIONS " ]"
|
|
Packit Service |
3880ab |
.B neigh
|
|
Packit Service |
3880ab |
.RI " { " COMMAND " | "
|
|
Packit Service |
3880ab |
.BR help " }"
|
|
Packit Service |
3880ab |
.sp
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.ti -8
|
|
Packit Service |
3880ab |
.BR "ip neigh" " { " add " | " del " | " change " | " replace " } { "
|
|
Packit Service |
3880ab |
.IR ADDR " [ "
|
|
Packit Service |
3880ab |
.B lladdr
|
|
Packit Service |
3880ab |
.IR LLADDR " ] [ "
|
|
Packit Service |
3880ab |
.B nud
|
|
Packit Service |
3880ab |
.IR STATE " ] |"
|
|
Packit Service |
3880ab |
.B proxy
|
|
Packit Service |
3880ab |
.IR ADDR " } [ "
|
|
Packit Service |
3880ab |
.B dev
|
|
Packit Service |
3880ab |
.IR DEV " ] [ "
|
|
Packit Service |
3880ab |
.BR router " ] [ "
|
|
Packit Service |
3880ab |
.BR extern_learn " ]"
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.ti -8
|
|
Packit Service |
3880ab |
.BR "ip neigh" " { " show " | " flush " } [ " proxy " ] [ " to
|
|
Packit Service |
3880ab |
.IR PREFIX " ] [ "
|
|
Packit Service |
3880ab |
.B dev
|
|
Packit Service |
3880ab |
.IR DEV " ] [ "
|
|
Packit Service |
3880ab |
.B nud
|
|
Packit Service |
3880ab |
.IR STATE " ] [ "
|
|
Packit Service |
3880ab |
.B vrf
|
|
Packit Service |
3880ab |
.IR NAME " ] "
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.ti -8
|
|
Packit Service |
3880ab |
.B ip neigh get
|
|
Packit Service |
3880ab |
.IR ADDR
|
|
Packit Service |
3880ab |
.B dev
|
|
Packit Service |
3880ab |
.IR DEV
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.ti -8
|
|
Packit Service |
3880ab |
.IR STATE " := {"
|
|
Packit Service |
3880ab |
.BR permanent " | " noarp " | " stale " | " reachable " | " none " |"
|
|
Packit Service |
3880ab |
.BR incomplete " | " delay " | " probe " | " failed " }"
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.SH DESCRIPTION
|
|
Packit Service |
3880ab |
The
|
|
Packit Service |
3880ab |
.B ip neigh
|
|
Packit Service |
3880ab |
command manipulates
|
|
Packit Service |
3880ab |
.I neighbour
|
|
Packit Service |
3880ab |
objects that establish bindings between protocol addresses and
|
|
Packit Service |
3880ab |
link layer addresses for hosts sharing the same link.
|
|
Packit Service |
3880ab |
Neighbour entries are organized into tables. The IPv4 neighbour table
|
|
Packit Service |
3880ab |
is also known by another name - the ARP table.
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.P
|
|
Packit Service |
3880ab |
The corresponding commands display neighbour bindings
|
|
Packit Service |
3880ab |
and their properties, add new neighbour entries and delete old ones.
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
ip neighbour add
|
|
Packit Service |
3880ab |
add a new neighbour entry
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
ip neighbour change
|
|
Packit Service |
3880ab |
change an existing entry
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
ip neighbour replace
|
|
Packit Service |
3880ab |
add a new entry or change an existing one
|
|
Packit Service |
3880ab |
.RS
|
|
Packit Service |
3880ab |
.PP
|
|
Packit Service |
3880ab |
These commands create new neighbour records or update existing ones.
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
.BI to " ADDRESS " (default)
|
|
Packit Service |
3880ab |
the protocol address of the neighbour. It is either an IPv4 or IPv6 address.
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
.BI dev " NAME"
|
|
Packit Service |
3880ab |
the interface to which this neighbour is attached.
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
.BI proxy
|
|
Packit Service |
3880ab |
indicates whether we are proxying for this neigbour entry
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
.BI router
|
|
Packit Service |
3880ab |
indicates whether neigbour is a router
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
.BI extern_learn
|
|
Packit Service |
3880ab |
this neigh entry was learned externally. This option can be used to
|
|
Packit Service |
3880ab |
indicate to the kernel that this is a controller learnt dynamic entry.
|
|
Packit Service |
3880ab |
Kernel will not gc such an entry.
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
.BI lladdr " LLADDRESS"
|
|
Packit Service |
3880ab |
the link layer address of the neighbour.
|
|
Packit Service |
3880ab |
.I LLADDRESS
|
|
Packit Service |
3880ab |
can also be
|
|
Packit Service |
3880ab |
.BR "null" .
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
.BI nud " STATE"
|
|
Packit Service |
3880ab |
the state of the neighbour entry.
|
|
Packit Service |
3880ab |
.B nud
|
|
Packit Service |
3880ab |
is an abbreviation for 'Neighbour Unreachability Detection'.
|
|
Packit Service |
3880ab |
The state can take one of the following values:
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.RS
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
.B permanent
|
|
Packit Service |
3880ab |
the neighbour entry is valid forever and can be only
|
|
Packit Service |
3880ab |
be removed administratively.
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
.B noarp
|
|
Packit Service |
3880ab |
the neighbour entry is valid. No attempts to validate
|
|
Packit Service |
3880ab |
this entry will be made but it can be removed when its lifetime expires.
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
.B reachable
|
|
Packit Service |
3880ab |
the neighbour entry is valid until the reachability
|
|
Packit Service |
3880ab |
timeout expires.
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
.B stale
|
|
Packit Service |
3880ab |
the neighbour entry is valid but suspicious.
|
|
Packit Service |
3880ab |
This option to
|
|
Packit Service |
3880ab |
.B ip neigh
|
|
Packit Service |
3880ab |
does not change the neighbour state if it was valid and the address
|
|
Packit Service |
3880ab |
is not changed by this command.
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
.B none
|
|
Packit Service |
3880ab |
this is a pseudo state used when initially creating a neighbour entry or after
|
|
Packit Service |
3880ab |
trying to remove it before it becomes free to do so.
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
.B incomplete
|
|
Packit Service |
3880ab |
the neighbour entry has not (yet) been validated/resolved.
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
.B delay
|
|
Packit Service |
3880ab |
neighbor entry validation is currently delayed.
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
.B probe
|
|
Packit Service |
3880ab |
neighbor is being probed.
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
.B failed
|
|
Packit Service |
3880ab |
max number of probes exceeded without success, neighbor validation has
|
|
Packit Service |
3880ab |
ultimately failed.
|
|
Packit Service |
3880ab |
.RE
|
|
Packit Service |
3880ab |
.RE
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
ip neighbour delete
|
|
Packit Service |
3880ab |
delete a neighbour entry
|
|
Packit Service |
3880ab |
.RS
|
|
Packit Service |
3880ab |
.PP
|
|
Packit Service |
3880ab |
The arguments are the same as with
|
|
Packit Service |
3880ab |
.BR "ip neigh add" ,
|
|
Packit Service |
3880ab |
except that
|
|
Packit Service |
3880ab |
.B lladdr
|
|
Packit Service |
3880ab |
and
|
|
Packit Service |
3880ab |
.B nud
|
|
Packit Service |
3880ab |
are ignored.
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.PP
|
|
Packit Service |
3880ab |
.B Warning:
|
|
Packit Service |
3880ab |
Attempts to delete or manually change a
|
|
Packit Service |
3880ab |
.B noarp
|
|
Packit Service |
3880ab |
entry created by the kernel may result in unpredictable behaviour.
|
|
Packit Service |
3880ab |
Particularly, the kernel may try to resolve this address even
|
|
Packit Service |
3880ab |
on a
|
|
Packit Service |
3880ab |
.B NOARP
|
|
Packit Service |
3880ab |
interface or if the address is multicast or broadcast.
|
|
Packit Service |
3880ab |
.RE
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
ip neighbour show
|
|
Packit Service |
3880ab |
list neighbour entries
|
|
Packit Service |
3880ab |
.RS
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
.BI to " ADDRESS " (default)
|
|
Packit Service |
3880ab |
the prefix selecting the neighbours to list.
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
.BI dev " NAME"
|
|
Packit Service |
3880ab |
only list the neighbours attached to this device.
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
.BI vrf " NAME"
|
|
Packit Service |
3880ab |
only list the neighbours for given VRF.
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
.BI proxy
|
|
Packit Service |
3880ab |
list neighbour proxies.
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
.B unused
|
|
Packit Service |
3880ab |
only list neighbours which are not currently in use.
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
.BI nud " STATE"
|
|
Packit Service |
3880ab |
only list neighbour entries in this state.
|
|
Packit Service |
3880ab |
.I NUD_STATE
|
|
Packit Service |
3880ab |
takes values listed below or the special value
|
|
Packit Service |
3880ab |
.B all
|
|
Packit Service |
3880ab |
which means all states. This option may occur more than once.
|
|
Packit Service |
3880ab |
If this option is absent,
|
|
Packit Service |
3880ab |
.B ip
|
|
Packit Service |
3880ab |
lists all entries except for
|
|
Packit Service |
3880ab |
.B none
|
|
Packit Service |
3880ab |
and
|
|
Packit Service |
3880ab |
.BR "noarp" .
|
|
Packit Service |
3880ab |
.RE
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
ip neighbour flush
|
|
Packit Service |
3880ab |
flush neighbour entries
|
|
Packit Service |
3880ab |
.RS
|
|
Packit Service |
3880ab |
This command has the same arguments as
|
|
Packit Service |
3880ab |
.B show.
|
|
Packit Service |
3880ab |
The differences are that it does not run when no arguments are given,
|
|
Packit Service |
3880ab |
and that the default neighbour states to be flushed do not include
|
|
Packit Service |
3880ab |
.B permanent
|
|
Packit Service |
3880ab |
and
|
|
Packit Service |
3880ab |
.BR "noarp" .
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.PP
|
|
Packit Service |
3880ab |
With the
|
|
Packit Service |
3880ab |
.B -statistics
|
|
Packit Service |
3880ab |
option, the command becomes verbose. It prints out the number of
|
|
Packit Service |
3880ab |
deleted neighbours and the number of rounds made to flush the
|
|
Packit Service |
3880ab |
neighbour table. If the option is given
|
|
Packit Service |
3880ab |
twice,
|
|
Packit Service |
3880ab |
.B ip neigh flush
|
|
Packit Service |
3880ab |
also dumps all the deleted neighbours.
|
|
Packit Service |
3880ab |
.RE
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
ip neigh get
|
|
Packit Service |
3880ab |
lookup a neighbour entry to a destination given a device
|
|
Packit Service |
3880ab |
.RS
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
.BI proxy
|
|
Packit Service |
3880ab |
indicates whether we should lookup a proxy neigbour entry
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
.BI to " ADDRESS " (default)
|
|
Packit Service |
3880ab |
the prefix selecting the neighbour to query.
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
.BI dev " NAME"
|
|
Packit Service |
3880ab |
get neighbour entry attached to this device.
|
|
Packit Service |
3880ab |
.RE
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.SH EXAMPLES
|
|
Packit Service |
3880ab |
.PP
|
|
Packit Service |
3880ab |
ip neighbour
|
|
Packit Service |
3880ab |
.RS
|
|
Packit Service |
3880ab |
Shows the current neighbour table in kernel.
|
|
Packit Service |
3880ab |
.RE
|
|
Packit Service |
3880ab |
.PP
|
|
Packit Service |
3880ab |
ip neigh flush dev eth0
|
|
Packit Service |
3880ab |
.RS
|
|
Packit Service |
3880ab |
Removes entries in the neighbour table on device eth0.
|
|
Packit Service |
3880ab |
.RE
|
|
Packit Service |
3880ab |
.PP
|
|
Packit Service |
3880ab |
ip neigh get 10.0.1.10 dev eth0
|
|
Packit Service |
3880ab |
.RS
|
|
Packit Service |
3880ab |
Performs a neighbour lookup in the kernel and returns
|
|
Packit Service |
3880ab |
a neighbour entry.
|
|
Packit Service |
3880ab |
.RE
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.SH SEE ALSO
|
|
Packit Service |
3880ab |
.br
|
|
Packit Service |
3880ab |
.BR ip (8)
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.SH AUTHOR
|
|
Packit Service |
3880ab |
Original Manpage by Michail Litvak <mci@owl.openwall.com>
|