1IP-NEIGHBOUR(8)                      Linux                     IP-NEIGHBOUR(8)
2
3
4

NAME

6       ip-neighbour - neighbour/arp tables management.
7

SYNOPSIS

9       ip [ OPTIONS ] neigh  { COMMAND | help }
10
11
12       ip neigh { add | del | change | replace } { ADDR [ lladdr LLADDR ] [
13               nud STATE ] | proxy ADDR } [ dev DEV ] [ router ] [ use ] [
14               managed ] [ extern_learn ]
15
16       ip neigh { show | flush } [ proxy ] [ to PREFIX ] [ dev DEV ] [ nud
17               STATE ] [ vrf NAME ] [ nomaster ]
18
19       ip neigh get ADDR dev DEV
20
21       STATE := { permanent | noarp | stale | reachable | none | incomplete |
22               delay | probe | failed }
23
24

DESCRIPTION

26       The ip neigh command manipulates neighbour objects that establish bind‐
27       ings between protocol addresses and link layer addresses for hosts
28       sharing the same link.  Neighbour entries are organized into tables.
29       The IPv4 neighbour table is also known by another name - the ARP table.
30
31
32       The corresponding commands display neighbour bindings and their proper‐
33       ties, add new neighbour entries and delete old ones.
34
35
36       ip neighbour add
37              add a new neighbour entry
38
39       ip neighbour change
40              change an existing entry
41
42       ip neighbour replace
43              add a new entry or change an existing one
44
45              These commands create new neighbour records or update existing
46              ones.
47
48
49              to ADDRESS (default)
50                     the protocol address of the neighbour. It is either an
51                     IPv4 or IPv6 address.
52
53
54              dev NAME
55                     the interface to which this neighbour is attached.
56
57
58              proxy  indicates whether we are proxying for this neighbour en‐
59                     try
60
61
62              router indicates whether neighbour is a router
63
64
65              use    this neigh entry is in "use". This option can be used to
66                     indicate to the kernel that a controller is using this
67                     dynamic entry. If the entry does not exist, the kernel
68                     will resolve it. If it exists, an attempt to refresh the
69                     neighbor entry will be triggered.
70
71
72              managed
73                     this neigh entry is "managed". This option can be used to
74                     indicate to the kernel that a controller is using this
75                     dynamic entry. In contrast to "use", if the entry does
76                     not exist, the kernel will resolve it and periodically
77                     attempt to auto-refresh the neighbor entry such that it
78                     remains in resolved state when possible.
79
80
81              extern_learn
82                     this neigh entry was learned externally. This option can
83                     be used to indicate to the kernel that this is a con‐
84                     troller learnt dynamic entry.  Kernel will not gc such an
85                     entry.
86
87
88              lladdr LLADDRESS
89                     the link layer address of the neighbour.  LLADDRESS can
90                     also be null.
91
92
93              nud STATE
94                     the state of the neighbour entry.  nud is an abbreviation
95                     for 'Neighbour Unreachability Detection'.  The state can
96                     take one of the following values:
97
98
99                     permanent
100                            the neighbour entry is valid forever and can be
101                            only be removed administratively.
102
103                     noarp  the neighbour entry is valid. No attempts to vali‐
104                            date this entry will be made but it can be removed
105                            when its lifetime expires.
106
107                     reachable
108                            the neighbour entry is valid until the reachabil‐
109                            ity timeout expires.
110
111                     stale  the neighbour entry is valid but suspicious.  This
112                            option to ip neigh does not change the neighbour
113                            state if it was valid and the address is not
114                            changed by this command.
115
116                     none   this is a pseudo state used when initially creat‐
117                            ing a neighbour entry or after trying to remove it
118                            before it becomes free to do so.
119
120                     incomplete
121                            the neighbour entry has not (yet) been vali‐
122                            dated/resolved.
123
124                     delay  neighbor entry validation is currently delayed.
125
126                     probe  neighbor is being probed.
127
128                     failed max number of probes exceeded without success,
129                            neighbor validation has ultimately failed.
130
131
132       ip neighbour delete
133              delete a neighbour entry
134
135              The arguments are the same as with ip neigh add, except that
136              lladdr and nud are ignored.
137
138
139              Warning: Attempts to delete or manually change a noarp entry
140              created by the kernel may result in unpredictable behaviour.
141              Particularly, the kernel may try to resolve this address even on
142              a NOARP interface or if the address is multicast or broadcast.
143
144
145       ip neighbour show
146              list neighbour entries
147
148              to ADDRESS (default)
149                     the prefix selecting the neighbours to list.
150
151
152              dev NAME
153                     only list the neighbours attached to this device.
154
155
156              vrf NAME
157                     only list the neighbours for given VRF.
158
159
160              nomaster
161                     only list neighbours attached to an interface with no
162                     master.
163
164
165              proxy  list neighbour proxies.
166
167
168              unused only list neighbours which are not currently in use.
169
170
171              nud STATE
172                     only list neighbour entries in this state.  NUD_STATE
173                     takes values listed below or the special value all which
174                     means all states. This option may occur more than once.
175                     If this option is absent, ip lists all entries except for
176                     none and noarp.
177
178
179       ip neighbour flush
180              flush neighbour entries
181              This command has the same arguments as show.  The differences
182              are that it does not run when no arguments are given, and that
183              the default neighbour states to be flushed do not include perma‐
184              nent and noarp.
185
186
187              With the -statistics option, the command becomes verbose. It
188              prints out the number of deleted neighbours and the number of
189              rounds made to flush the neighbour table. If the option is given
190              twice, ip neigh flush also dumps all the deleted neighbours.
191
192
193       ip neigh get
194              lookup a neighbour entry to a destination given a device
195
196
197              proxy  indicates whether we should lookup a proxy neighbour en‐
198                     try
199
200
201              to ADDRESS (default)
202                     the prefix selecting the neighbour to query.
203
204
205              dev NAME
206                     get neighbour entry attached to this device.
207
208

EXAMPLES

210       ip neighbour
211              Shows the current neighbour table in kernel.
212
213       ip neigh flush dev eth0
214              Removes entries in the neighbour table on device eth0.
215
216       ip neigh get 10.0.1.10 dev eth0
217              Performs a neighbour lookup in the kernel and returns a neigh‐
218              bour entry.
219
220

SEE ALSO

222       ip(8)
223
224

AUTHOR

226       Original Manpage by Michail Litvak <mci@owl.openwall.com>
227
228
229
230iproute2                          20 Dec 2011                  IP-NEIGHBOUR(8)
Impressum