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 ] [ ex‐
14               tern_learn ]
15
16       ip neigh { show | flush } [ proxy ] [ to PREFIX ] [ dev DEV ] [ nud
17               STATE ] [ vrf NAME ]
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              extern_learn
66                     this neigh entry was learned externally. This option can
67                     be used to indicate to the kernel that this is a con‐
68                     troller learnt dynamic entry.  Kernel will not gc such an
69                     entry.
70
71
72              lladdr LLADDRESS
73                     the link layer address of the neighbour.  LLADDRESS can
74                     also be null.
75
76
77              nud STATE
78                     the state of the neighbour entry.  nud is an abbreviation
79                     for 'Neighbour Unreachability Detection'.  The state can
80                     take one of the following values:
81
82
83                     permanent
84                            the neighbour entry is valid forever and can be
85                            only be removed administratively.
86
87                     noarp  the neighbour entry is valid. No attempts to vali‐
88                            date this entry will be made but it can be removed
89                            when its lifetime expires.
90
91                     reachable
92                            the neighbour entry is valid until the reachabil‐
93                            ity timeout expires.
94
95                     stale  the neighbour entry is valid but suspicious.  This
96                            option to ip neigh does not change the neighbour
97                            state if it was valid and the address is not
98                            changed by this command.
99
100                     none   this is a pseudo state used when initially creat‐
101                            ing a neighbour entry or after trying to remove it
102                            before it becomes free to do so.
103
104                     incomplete
105                            the neighbour entry has not (yet) been vali‐
106                            dated/resolved.
107
108                     delay  neighbor entry validation is currently delayed.
109
110                     probe  neighbor is being probed.
111
112                     failed max number of probes exceeded without success,
113                            neighbor validation has ultimately failed.
114
115
116       ip neighbour delete
117              delete a neighbour entry
118
119              The arguments are the same as with ip neigh add, except that
120              lladdr and nud are ignored.
121
122
123              Warning: Attempts to delete or manually change a noarp entry
124              created by the kernel may result in unpredictable behaviour.
125              Particularly, the kernel may try to resolve this address even on
126              a NOARP interface or if the address is multicast or broadcast.
127
128
129       ip neighbour show
130              list neighbour entries
131
132              to ADDRESS (default)
133                     the prefix selecting the neighbours to list.
134
135
136              dev NAME
137                     only list the neighbours attached to this device.
138
139
140              vrf NAME
141                     only list the neighbours for given VRF.
142
143
144              proxy  list neighbour proxies.
145
146
147              unused only list neighbours which are not currently in use.
148
149
150              nud STATE
151                     only list neighbour entries in this state.  NUD_STATE
152                     takes values listed below or the special value all which
153                     means all states. This option may occur more than once.
154                     If this option is absent, ip lists all entries except for
155                     none and noarp.
156
157
158       ip neighbour flush
159              flush neighbour entries
160              This command has the same arguments as show.  The differences
161              are that it does not run when no arguments are given, and that
162              the default neighbour states to be flushed do not include perma‐
163              nent and noarp.
164
165
166              With the -statistics option, the command becomes verbose. It
167              prints out the number of deleted neighbours and the number of
168              rounds made to flush the neighbour table. If the option is given
169              twice, ip neigh flush also dumps all the deleted neighbours.
170
171
172       ip neigh get
173              lookup a neighbour entry to a destination given a device
174
175
176              proxy  indicates whether we should lookup a proxy neighbour en‐
177                     try
178
179
180              to ADDRESS (default)
181                     the prefix selecting the neighbour to query.
182
183
184              dev NAME
185                     get neighbour entry attached to this device.
186
187

EXAMPLES

189       ip neighbour
190              Shows the current neighbour table in kernel.
191
192       ip neigh flush dev eth0
193              Removes entries in the neighbour table on device eth0.
194
195       ip neigh get 10.0.1.10 dev eth0
196              Performs a neighbour lookup in the kernel and returns a neigh‐
197              bour entry.
198
199

SEE ALSO

201       ip(8)
202
203

AUTHOR

205       Original Manpage by Michail Litvak <mci@owl.openwall.com>
206
207
208
209iproute2                          20 Dec 2011                  IP-NEIGHBOUR(8)
Impressum