Debian Codegraph @

upstream/debian-unstable/man8/ip-neighbour.8

raw
1 .TH IP\-NEIGHBOUR 8 "20 Dec 2011" "iproute2" "Linux"
2 .SH "NAME"
3 ip-neighbour \- neighbour/arp tables management.
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 " ] [ "
21 .B nud
22 .IR STATE " ] |"
23 .B proxy
24 .IR ADDR " } [ "
25 .B dev
26 .IR DEV " ] [ "
27 .BR router " ] [ "
28 .BR use " ] [ "
29 .BR managed " ] [ "
30 .BR extern_learn " ] [ "
31 .BR extern_valid " ]"
32
33 .ti -8
34 .BR "ip neigh" " { " show " | " flush " } [ " proxy " ] [ " to
35 .IR PREFIX " ] [ "
36 .B dev
37 .IR DEV " ] [ "
38 .B nud
39 .IR STATE " ] [ "
40 .B vrf
41 .IR NAME " ] ["
42 .BR nomaster " ]"
43
44 .ti -8
45 .B ip neigh get
46 .IR ADDR
47 .B dev
48 .IR DEV
49
50 .ti -8
51 .IR STATE " := {"
52 .BR permanent " | " noarp " | " stale " | " reachable " | " none " |"
53 .BR incomplete " | " delay " | " probe " | " failed " }"
54
55 .SH DESCRIPTION
56 The
57 .B ip neigh
58 command manipulates
59 .I neighbour
60 objects that establish bindings between protocol addresses and
61 link layer addresses for hosts sharing the same link.
62 Neighbour entries are organized into tables. The IPv4 neighbour table
63 is also known by another name - the ARP table.
64
65 .P
66 The corresponding commands display neighbour bindings
67 and their properties, add new neighbour entries and delete old ones.
68
69 .TP
70 ip neighbour add
71 add a new neighbour entry
72 .TP
73 ip neighbour change
74 change an existing entry
75 .TP
76 ip neighbour replace
77 add a new entry or change an existing one
78 .RS
79 .PP
80 These commands create new neighbour records or update existing ones.
81
82 .TP
83 .BI to " ADDRESS " (default)
84 the protocol address of the neighbour. It is either an IPv4 or IPv6 address.
85
86 .TP
87 .BI dev " NAME"
88 the interface to which this neighbour is attached.
89
90 .TP
91 .BI proxy
92 indicates whether we are proxying for this neighbour entry
93
94 .TP
95 .BI router
96 indicates whether neighbour is a router
97
98 .TP
99 .BI use
100 this neigh entry is in "use". This option can be used to indicate to
101 the kernel that a controller is using this dynamic entry. If the entry
102 does not exist, the kernel will resolve it. If it exists, an attempt
103 to refresh the neighbor entry will be triggered.
104
105 .TP
106 .BI managed
107 this neigh entry is "managed". This option can be used to indicate to
108 the kernel that a controller is using this dynamic entry. In contrast
109 to "use", if the entry does not exist, the kernel will resolve it and
110 periodically attempt to auto-refresh the neighbor entry such that it
111 remains in resolved state when possible.
112
113 .TP
114 .BI extern_learn
115 this neigh entry was learned externally. This option can be used to
116 indicate to the kernel that this is a controller learnt dynamic entry.
117 Kernel will not gc such an entry.
118
119 .TP
120 .BI extern_valid
121 this neigh entry was learned and determined to be valid externally. The kernel
122 will not remove or invalidate the entry, but it can probe the entry and notify
123 user space when the entry becomes reachable. The kernel will return the entry
124 to stale state if it did not receive a confirmation after probing the entry.
125
126 .TP
127 .BI lladdr " LLADDRESS"
128 the link layer address of the neighbour.
129 .I LLADDRESS
130 can also be
131 .BR "null" .
132
133 .TP
134 .BI nud " STATE"
135 the state of the neighbour entry.
136 .B nud
137 is an abbreviation for 'Neighbour Unreachability Detection'.
138 The state can take one of the following values:
139
140 .RS
141 .TP
142 .B permanent
143 the neighbour entry is valid forever and can be only
144 be removed administratively.
145 .TP
146 .B noarp
147 the neighbour entry is valid. No attempts to validate
148 this entry will be made but it can be removed when its lifetime expires.
149 .TP
150 .B reachable
151 the neighbour entry is valid until the reachability
152 timeout expires.
153 .TP
154 .B stale
155 the neighbour entry is valid but suspicious.
156 This option to
157 .B ip neigh
158 does not change the neighbour state if it was valid and the address
159 is not changed by this command.
160 .TP
161 .B none
162 this is a pseudo state used when initially creating a neighbour entry or after
163 trying to remove it before it becomes free to do so.
164 .TP
165 .B incomplete
166 the neighbour entry has not (yet) been validated/resolved.
167 .TP
168 .B delay
169 neighbor entry validation is currently delayed.
170 .TP
171 .B probe
172 neighbor is being probed.
173 .TP
174 .B failed
175 max number of probes exceeded without success, neighbor validation has
176 ultimately failed.
177 .RE
178 .RE
179
180 .TP
181 ip neighbour delete
182 delete a neighbour entry
183 .RS
184 .PP
185 The arguments are the same as with
186 .BR "ip neigh add" ,
187 except that
188 .B lladdr
189 and
190 .B nud
191 are ignored.
192
193 .PP
194 .B Warning:
195 Attempts to delete or manually change a
196 .B noarp
197 entry created by the kernel may result in unpredictable behaviour.
198 Particularly, the kernel may try to resolve this address even
199 on a
200 .B NOARP
201 interface or if the address is multicast or broadcast.
202 .RE
203
204 .TP
205 ip neighbour show
206 list neighbour entries
207 .RS
208 .TP
209 .BI to " ADDRESS " (default)
210 the prefix selecting the neighbours to list.
211
212 .TP
213 .BI dev " NAME"
214 only list the neighbours attached to this device.
215
216 .TP
217 .BI vrf " NAME"
218 only list the neighbours for given VRF.
219
220 .TP
221 .BI nomaster
222 only list neighbours attached to an interface with no master.
223
224 .TP
225 .BI proxy
226 list neighbour proxies.
227
228 .TP
229 .B unused
230 only list neighbours which are not currently in use.
231
232 .TP
233 .BI nud " STATE"
234 only list neighbour entries in this state.
235 .I NUD_STATE
236 takes values listed below or the special value
237 .B all
238 which means all states. This option may occur more than once.
239 If this option is absent,
240 .B ip
241 lists all entries except for
242 .B none
243 and
244 .BR "noarp" .
245 .RE
246
247 .TP
248 ip neighbour flush
249 flush neighbour entries
250 .RS
251 This command has the same arguments as
252 .B show.
253 The differences are that it does not run when no arguments are given,
254 and that the default neighbour states to be flushed do not include
255 .B permanent
256 and
257 .BR "noarp" .
258
259 .PP
260 With the
261 .B -statistics
262 option, the command becomes verbose. It prints out the number of
263 deleted neighbours and the number of rounds made to flush the
264 neighbour table. If the option is given
265 twice,
266 .B ip neigh flush
267 also dumps all the deleted neighbours.
268 .RE
269
270 .TP
271 ip neigh get
272 lookup a neighbour entry to a destination given a device
273 .RS
274
275 .TP
276 .BI proxy
277 indicates whether we should lookup a proxy neighbour entry
278
279 .TP
280 .BI to " ADDRESS " (default)
281 the prefix selecting the neighbour to query.
282
283 .TP
284 .BI dev " NAME"
285 get neighbour entry attached to this device.
286 .RE
287
288 .SH EXAMPLES
289 .PP
290 ip neighbour
291 .RS
292 Shows the current neighbour table in kernel.
293 .RE
294 .PP
295 ip neigh flush dev eth0
296 .RS
297 Removes entries in the neighbour table on device eth0.
298 .RE
299 .PP
300 ip neigh get 10.0.1.10 dev eth0
301 .RS
302 Performs a neighbour lookup in the kernel and returns
303 a neighbour entry.
304 .RE
305
306 .SH SEE ALSO
307 .br
308 .BR ip (8)
309
310 .SH AUTHOR
311 Original Manpage by Michail Litvak <[email protected]>