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

EXAMPLES

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

SEE ALSO

199       ip(8)
200
201

AUTHOR

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