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