]> git.proxmox.com Git - mirror_iproute2.git/blob - man/man8/ip-neighbour.8
docs: make spacing consistent
[mirror_iproute2.git] / man / man8 / ip-neighbour.8
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 .BR nud " { " permanent " | " noarp " | " stale " | " reachable " } ] | " proxy
22 .IR ADDR " } [ "
23 .B dev
24 .IR DEV " ]"
25
26 .ti -8
27 .BR "ip neigh" " { " show " | " flush " } [ " proxy " ] [ " to
28 .IR PREFIX " ] [ "
29 .B dev
30 .IR DEV " ] [ "
31 .B nud
32 .IR STATE " ]"
33
34
35 .SH DESCRIPTION
36 The
37 .B ip neigh
38 command manipulates
39 .I neighbour
40 objects that establish bindings between protocol addresses and
41 link layer addresses for hosts sharing the same link.
42 Neighbour entries are organized into tables. The IPv4 neighbour table
43 is also known by another name - the ARP table.
44
45 .P
46 The corresponding commands display neighbour bindings
47 and their properties, add new neighbour entries and delete old ones.
48
49 .TP
50 ip neighbour add
51 add a new neighbour entry
52 .TP
53 ip neighbour change
54 change an existing entry
55 .TP
56 ip neighbour replace
57 add a new entry or change an existing one
58 .RS
59 .PP
60 These commands create new neighbour records or update existing ones.
61
62 .TP
63 .BI to " ADDRESS " (default)
64 the protocol address of the neighbour. It is either an IPv4 or IPv6 address.
65
66 .TP
67 .BI dev " NAME"
68 the interface to which this neighbour is attached.
69
70 .TP
71 .BI lladdr " LLADDRESS"
72 the link layer address of the neighbour.
73 .I LLADDRESS
74 can also be
75 .BR "null" .
76
77 .TP
78 .BI nud " NUD_STATE"
79 the state of the neighbour entry.
80 .B nud
81 is an abbreviation for 'Neighbour Unreachability Detection'.
82 The state can take one of the following values:
83
84 .TP
85 .B permanent
86 the neighbour entry is valid forever and can be only
87 be removed administratively.
88 .TP
89 .B noarp
90 the neighbour entry is valid. No attempts to validate
91 this entry will be made but it can be removed when its lifetime expires.
92 .TP
93 .B reachable
94 the neighbour entry is valid until the reachability
95 timeout expires.
96 .TP
97 .B stale
98 the neighbour entry is valid but suspicious.
99 This option to
100 .B ip neigh
101 does not change the neighbour state if it was valid and the address
102 is not changed by this command.
103 .RE
104
105 .TP
106 ip neighbour delete
107 delete a neighbour entry
108 .RS
109 .PP
110 The arguments are the same as with
111 .BR "ip neigh add" ,
112 except that
113 .B lladdr
114 and
115 .B nud
116 are ignored.
117
118 .PP
119 .B Warning:
120 Attempts to delete or manually change a
121 .B noarp
122 entry created by the kernel may result in unpredictable behaviour.
123 Particularly, the kernel may try to resolve this address even
124 on a
125 .B NOARP
126 interface or if the address is multicast or broadcast.
127 .RE
128
129 .TP
130 ip neighbour show
131 list neighbour entries
132 .RS
133 .TP
134 .BI to " ADDRESS " (default)
135 the prefix selecting the neighbours to list.
136
137 .TP
138 .BI dev " NAME"
139 only list the neighbours attached to this device.
140
141 .TP
142 .BI proxy
143 list neighbour proxies.
144
145 .TP
146 .B unused
147 only list neighbours which are not currently in use.
148
149 .TP
150 .BI nud " NUD_STATE"
151 only list neighbour entries in this state.
152 .I NUD_STATE
153 takes values listed below or the special value
154 .B all
155 which means all states. This option may occur more than once.
156 If this option is absent,
157 .B ip
158 lists all entries except for
159 .B none
160 and
161 .BR "noarp" .
162 .RE
163
164 .TP
165 ip neighbour flush
166 flush neighbour entries
167 .RS
168 This command has the same arguments as
169 .B show.
170 The differences are that it does not run when no arguments are given,
171 and that the default neighbour states to be flushed do not include
172 .B permanent
173 and
174 .BR "noarp" .
175
176 .PP
177 With the
178 .B -statistics
179 option, the command becomes verbose. It prints out the number of
180 deleted neighbours and the number of rounds made to flush the
181 neighbour table. If the option is given
182 twice,
183 .B ip neigh flush
184 also dumps all the deleted neighbours.
185 .RE
186
187 .SH EXAMPLES
188 .PP
189 ip neighbour
190 .RS
191 Shows the current neighbour table in kernel.
192 .RE
193 .PP
194 ip neigh flush dev eth0
195 .RS
196 Removes entries in the neighbour table on device eth0.
197 .RE
198
199 .SH SEE ALSO
200 .br
201 .BR ip (8)
202
203 .SH AUTHOR
204 Original Manpage by Michail Litvak <mci@owl.openwall.com>