]> git.proxmox.com Git - mirror_iproute2.git/blame - man/man8/ip-neighbour.8
ip-xfrm: Add support for OUTPUT_MARK
[mirror_iproute2.git] / man / man8 / ip-neighbour.8
CommitLineData
2a9721f1
SH
1.TH IP\-NEIGHBOUR 8 "20 Dec 2011" "iproute2" "Linux"
2.SH "NAME"
aab2702d 3ip-neighbour \- neighbour/arp tables management.
2a9721f1
SH
4.SH "SYNOPSIS"
5.sp
6.ad l
7.in +8
8.ti -8
9.B ip
10.RI "[ " OPTIONS " ]"
11.B neigh
12.RI " { " COMMAND " | "
13.BR help " }"
14.sp
15
16.ti -8
17.BR "ip neigh" " { " add " | " del " | " change " | " replace " } { "
18.IR ADDR " [ "
19.B lladdr
20.IR LLADDR " ] [ "
03cb9d58
PS
21.B nud
22.IR STATE " ] |"
23.B proxy
2a9721f1
SH
24.IR ADDR " } [ "
25.B dev
26.IR DEV " ]"
27
28.ti -8
cdae8bcc 29.BR "ip neigh" " { " show " | " flush " } [ " proxy " ] [ " to
2a9721f1
SH
30.IR PREFIX " ] [ "
31.B dev
32.IR DEV " ] [ "
33.B nud
5db1adae
DA
34.IR STATE " ] [ "
35.B vrf
36.IR NAME " ] "
2a9721f1 37
03cb9d58
PS
38.ti -8
39.IR STATE " := {"
948acfed
PS
40.BR permanent " | " noarp " | " stale " | " reachable " | " none " |"
41.BR incomplete " | " delay " | " probe " | " failed " }"
2a9721f1
SH
42
43.SH DESCRIPTION
5699275b 44The
2a9721f1 45.B ip neigh
5699275b 46command manipulates
2a9721f1
SH
47.I neighbour
48objects that establish bindings between protocol addresses and
49link layer addresses for hosts sharing the same link.
50Neighbour entries are organized into tables. The IPv4 neighbour table
49572501 51is also known by another name - the ARP table.
2a9721f1
SH
52
53.P
54The corresponding commands display neighbour bindings
55and their properties, add new neighbour entries and delete old ones.
56
61f541fe 57.TP
58ip neighbour add
59add a new neighbour entry
60.TP
61ip neighbour change
62change an existing entry
63.TP
64ip neighbour replace
65add a new entry or change an existing one
882e754c 66.RS
61f541fe 67.PP
2a9721f1
SH
68These commands create new neighbour records or update existing ones.
69
70.TP
71.BI to " ADDRESS " (default)
72the protocol address of the neighbour. It is either an IPv4 or IPv6 address.
73
74.TP
75.BI dev " NAME"
76the interface to which this neighbour is attached.
77
78.TP
79.BI lladdr " LLADDRESS"
80the link layer address of the neighbour.
81.I LLADDRESS
82can also be
83.BR "null" .
84
85.TP
03cb9d58 86.BI nud " STATE"
2a9721f1
SH
87the state of the neighbour entry.
88.B nud
89is an abbreviation for 'Neighbour Unreachability Detection'.
90The state can take one of the following values:
91
948acfed 92.RS
61f541fe 93.TP
2a9721f1 94.B permanent
61f541fe 95the neighbour entry is valid forever and can be only
2a9721f1 96be removed administratively.
61f541fe 97.TP
2a9721f1 98.B noarp
61f541fe 99the neighbour entry is valid. No attempts to validate
2a9721f1 100this entry will be made but it can be removed when its lifetime expires.
61f541fe 101.TP
2a9721f1 102.B reachable
61f541fe 103the neighbour entry is valid until the reachability
2a9721f1 104timeout expires.
61f541fe 105.TP
2a9721f1 106.B stale
61f541fe 107the neighbour entry is valid but suspicious.
2a9721f1
SH
108This option to
109.B ip neigh
110does not change the neighbour state if it was valid and the address
111is not changed by this command.
948acfed
PS
112.TP
113.B none
114this is a pseudo state used when initially creating a neighbour entry or after
115trying to remove it before it becomes free to do so.
116.TP
117.B incomplete
118the neighbour entry has not (yet) been validated/resolved.
119.TP
120.B delay
121neighbor entry validation is currently delayed.
122.TP
123.B probe
124neighbor is being probed.
125.TP
126.B failed
127max number of probes exceeded without success, neighbor validation has
128ultimately failed.
129.RE
61f541fe 130.RE
2a9721f1 131
882e754c
SH
132.TP
133ip neighbour delete
134delete a neighbour entry
135.RS
2a9721f1
SH
136.PP
137The arguments are the same as with
138.BR "ip neigh add" ,
139except that
140.B lladdr
141and
142.B nud
143are ignored.
144
145.PP
146.B Warning:
147Attempts to delete or manually change a
148.B noarp
149entry created by the kernel may result in unpredictable behaviour.
150Particularly, the kernel may try to resolve this address even
151on a
152.B NOARP
153interface or if the address is multicast or broadcast.
61f541fe 154.RE
2a9721f1 155
882e754c
SH
156.TP
157ip neighbour show
158list neighbour entries
159.RS
2a9721f1
SH
160.TP
161.BI to " ADDRESS " (default)
162the prefix selecting the neighbours to list.
163
164.TP
165.BI dev " NAME"
166only list the neighbours attached to this device.
167
5db1adae
DA
168.TP
169.BI vrf " NAME"
170only list the neighbours for given VRF.
171
cdae8bcc
TZ
172.TP
173.BI proxy
174list neighbour proxies.
175
2a9721f1
SH
176.TP
177.B unused
178only list neighbours which are not currently in use.
179
180.TP
03cb9d58 181.BI nud " STATE"
2a9721f1
SH
182only list neighbour entries in this state.
183.I NUD_STATE
184takes values listed below or the special value
185.B all
a89d5329 186which means all states. This option may occur more than once.
2a9721f1
SH
187If this option is absent,
188.B ip
189lists all entries except for
190.B none
191and
192.BR "noarp" .
61f541fe 193.RE
194
882e754c
SH
195.TP
196ip neighbour flush
197flush neighbour entries
198.RS
2a9721f1
SH
199This command has the same arguments as
200.B show.
201The differences are that it does not run when no arguments are given,
202and that the default neighbour states to be flushed do not include
203.B permanent
204and
205.BR "noarp" .
206
207.PP
208With the
209.B -statistics
a89d5329 210option, the command becomes verbose. It prints out the number of
2a9721f1 211deleted neighbours and the number of rounds made to flush the
a89d5329 212neighbour table. If the option is given
2a9721f1
SH
213twice,
214.B ip neigh flush
215also dumps all the deleted neighbours.
882e754c 216.RE
2a9721f1
SH
217
218.SH EXAMPLES
219.PP
220ip neighbour
221.RS
222Shows the current neighbour table in kernel.
223.RE
224.PP
225ip neigh flush dev eth0
226.RS
227Removes entries in the neighbour table on device eth0.
228.RE
229
230.SH SEE ALSO
231.br
232.BR ip (8)
233
234.SH AUTHOR
235Original Manpage by Michail Litvak <mci@owl.openwall.com>