]> git.proxmox.com Git - mirror_iproute2.git/blame - man/man8/ip.8
man: add more keywords to ip.8 short description
[mirror_iproute2.git] / man / man8 / ip.8
CommitLineData
2a9721f1 1.TH IP 8 "20 Dec 2011" "iproute2" "Linux"
985794ad 2.SH NAME
be78fade 3ip \- show / manipulate routing, network devices, interfaces and tunnels
985794ad
SH
4.SH SYNOPSIS
5
6.ad l
7.in +8
8.ti -8
9.B ip
10.RI "[ " OPTIONS " ] " OBJECT " { " COMMAND " | "
11.BR help " }"
12.sp
13
09154ec1 14.ti -8
5699275b 15.B ip
09154ec1
SH
16.RB "[ " -force " ] "
17.BI "-batch " filename
18.sp
19
985794ad
SH
20.ti -8
21.IR OBJECT " := { "
142434dc
22.BR link " | " address " | " addrlabel " | " route " | " rule " | " neigh " | "\
23 ntable " | " tunnel " | " tuntap " | " maddress " | " mroute " | " mrule " | "\
d0baa138
DC
24 monitor " | " xfrm " | " netns " | " l2tp " | " tcp_metrics " | " token " | "\
25 macsec " }"
985794ad
SH
26.sp
27
28.ti -8
ae9b671d 29.IR OPTIONS " := { "
985794ad 30\fB\-V\fR[\fIersion\fR] |
9b2e9f4a 31\fB\-h\fR[\fIuman-readable\fR] |
985794ad 32\fB\-s\fR[\fItatistics\fR] |
ac0eff58 33\fB\-d\fR[\fIetails\fR] |
985794ad 34\fB\-r\fR[\fIesolve\fR] |
ac0eff58 35\fB\-iec\fR |
985794ad
SH
36\fB\-f\fR[\fIamily\fR] {
37.BR inet " | " inet6 " | " ipx " | " dnet " | " link " } | "
ac0eff58
PS
38\fB-4\fR |
39\fB-6\fR |
40\fB-I\fR |
41\fB-D\fR |
42\fB-B\fR |
43\fB-0\fR |
44\fB-l\fR[\fIoops\fR] { \fBmaximum-addr-flush-attempts\fR } |
52700d40 45\fB\-o\fR[\fIneline\fR] |
ac0eff58
PS
46\fB\-rc\fR[\fIvbuf\fR] [\fBsize\fR] |
47\fB\-t\fR[\fIimestamp\fR] |
48\fB\-ts\fR[\fIhort\fR] |
b13ba03f 49\fB\-n\fR[\fIetns\fR] name |
d7bd2db5 50\fB\-a\fR[\fIll\fR] |
6a78ef97
PS
51\fB\-c\fR[\fIolor\fR]
52\fB\-br\fR[\fIief\fR] }
985794ad 53
09154ec1 54
985794ad
SH
55.SH OPTIONS
56
57.TP
58.BR "\-V" , " -Version"
09154ec1 59Print the version of the
985794ad
SH
60.B ip
61utility and exit.
62
9b2e9f4a
PS
63.TP
64.BR "\-h", " \-human", " \-human-readable"
65output statistics with human readable values followed by suffix.
66
09154ec1
SH
67.TP
68.BR "\-b", " \-batch " <FILENAME>
69Read commands from provided file or standard input and invoke them.
70First failure will cause termination of ip.
71
72.TP
73.BR "\-force"
74Don't terminate ip on errors in batch mode.
75If there were any errors during execution of the commands, the application return code will be non zero.
76
985794ad 77.TP
49572501 78.BR "\-s" , " \-stats" , " \-statistics"
a89d5329 79Output more information. If the option
985794ad
SH
80appears twice or more, the amount of information increases.
81As a rule, the information is statistics or some time values.
82
a5eafa9a 83.TP
84.BR "\-d" , " \-details"
85Output more detailed information.
86
64c79560 87.TP
49572501 88.BR "\-l" , " \-loops " <COUNT>
142434dc 89Specify maximum number of loops the 'ip address flush' logic
a89d5329 90will attempt before giving up. The default is 10.
64c79560
BG
91Zero (0) means loop until all addresses are removed.
92
985794ad 93.TP
49572501
KR
94.BR "\-f" , " \-family " <FAMILY>
95Specifies the protocol family to use. The protocol family identifier can be one of
dacc5d41 96.BR "inet" , " inet6" , " bridge" , " ipx" , " dnet" , " mpls"
985794ad 97or
49572501
KR
98.BR link .
99If this option is not present,
a89d5329 100the protocol family is guessed from other arguments. If the rest
985794ad
SH
101of the command line does not give enough information to guess the
102family,
103.B ip
104falls back to the default one, usually
105.B inet
106or
107.BR "any" .
108.B link
109is a special family identifier meaning that no networking protocol
110is involved.
111
112.TP
113.B \-4
114shortcut for
115.BR "-family inet" .
116
117.TP
118.B \-6
119shortcut for
120.BR "\-family inet6" .
121
27bca615
SH
122.TP
123.B \-B
124shortcut for
125.BR "\-family bridge" .
126
f4809174
EB
127.TP
128.B \-D
129shortcut for
130.BR "\-family decnet" .
131
132.TP
133.B \-I
134shortcut for
135.BR "\-family ipx" .
136
dacc5d41
EB
137.TP
138.B \-M
139shortcut for
140.BR "\-family mpls" .
141
985794ad
SH
142.TP
143.B \-0
144shortcut for
145.BR "\-family link" .
146
147.TP
148.BR "\-o" , " \-oneline"
149output each record on a single line, replacing line feeds
150with the
1b3c149b 151.B '\e'
ae9b671d 152character. This is convenient when you want to count records
985794ad
SH
153with
154.BR wc (1)
1b3c149b 155or to
985794ad
SH
156.BR grep (1)
157the output.
158
159.TP
160.BR "\-r" , " \-resolve"
161use the system's name resolver to print DNS names instead of
162host addresses.
163
52700d40 164.TP
142434dc 165.BR "\-n" , " \-netns " <NETNS>
52700d40
VK
166switches
167.B ip
168to the specified network namespace
169.IR NETNS .
170Actually it just simplifies executing of:
171
172.B ip netns exec
173.IR NETNS
174.B ip
175.RI "[ " OPTIONS " ] " OBJECT " { " COMMAND " | "
176.BR help " }"
177
178to
179
180.B ip
181.RI "-n[etns] " NETNS " [ " OPTIONS " ] " OBJECT " { " COMMAND " | "
182.BR help " }"
183
b13ba03f
VK
184.TP
185.BR "\-a" , " \-all"
186executes specified command over all objects, it depends if command supports this option.
187
d7bd2db5
MN
188.TP
189.BR "\-c" , " -color"
190Use color output.
191
25bc3d3d
SA
192.TP
193.BR "\-t" , " \-timestamp"
194display current time when using monitor option.
195
ac0eff58
PS
196.TP
197.BR "\-ts" , " \-tshort"
198Like
199.BR \-timestamp ,
200but use shorter format.
201
202.TP
203.BR "\-rc" , " \-rcvbuf" <SIZE>
204Set the netlink socket receive buffer size, defaults to 1MB.
205
134080cf
PS
206.TP
207.BR "\-iec"
208print human readable rates in IEC units (e.g. 1Ki = 1024).
209
6a78ef97
PS
210.TP
211.BR "\-br" , "\-brief"
212Print only basic information in a tabular format for better readability. This option is currently only supported by
213.BR "ip addr show " and " ip link show " commands.
214
985794ad
SH
215.SH IP - COMMAND SYNTAX
216
217.SS
218.I OBJECT
219
985794ad
SH
220.TP
221.B address
222- protocol (IP or IPv6) address on a device.
4759758c
YH
223
224.TP
225.B addrlabel
226- label configuration for protocol address selection.
227
db4a7f19 228.TP
229.B l2tp
6121e1fe 230- tunnel ethernet over IP (L2TPv3).
db4a7f19 231
232.TP
233.B link
234- network device.
235
236.TP
237.B maddress
238- multicast address.
239
240.TP
241.B monitor
242- watch for netlink messages.
243
244.TP
245.B mroute
246- multicast routing cache entry.
247
248.TP
249.B mrule
250- rule in multicast routing policy database.
251
985794ad
SH
252.TP
253.B neighbour
db4a7f19 254- manage ARP or NDISC cache entries.
255
256.TP
257.B netns
258- manage network namespaces.
259
260.TP
261.B ntable
262- manage the neighbor cache's operation.
985794ad
SH
263
264.TP
265.B route
266- routing table entry.
267
268.TP
269.B rule
270- rule in routing policy database.
271
ea63a69b
JA
272.TP
273.B tcp_metrics/tcpmetrics
274- manage TCP Metrics
275
ac0eff58
PS
276.TP
277.B token
278- manage tokenized interface identifiers.
279
985794ad 280.TP
db4a7f19 281.B tunnel
282- tunnel over IP.
985794ad
SH
283
284.TP
db4a7f19 285.B tuntap
286- manage TUN/TAP devices.
985794ad
SH
287
288.TP
db4a7f19 289.B xfrm
290- manage IPSec policies.
985794ad
SH
291
292.PP
293The names of all objects may be written in full or
ce743da1 294abbreviated form, for example
985794ad 295.B address
49572501 296can be abbreviated as
985794ad
SH
297.B addr
298or just
299.B a.
300
301.SS
302.I COMMAND
303
304Specifies the action to perform on the object.
305The set of possible actions depends on the object type.
306As a rule, it is possible to
307.BR "add" , " delete"
308and
309.B show
310(or
311.B list
312) objects, but some objects do not allow all of these operations
a89d5329 313or have some additional commands. The
985794ad 314.B help
a89d5329 315command is available for all objects. It prints
985794ad
SH
316out a list of available commands and argument syntax conventions.
317.sp
318If no command is given, some default command is assumed.
319Usually it is
320.B list
321or, if the objects of this class cannot be listed,
322.BR "help" .
323
ce743da1
SH
324.SH EXIT STATUS
325Exit status is 0 if command was successful, and 1 if there is a syntax error.
326If an error was reported by the kernel exit status is 2.
327
0db70c59
AA
328.SH "EXAMPLES"
329.PP
330ip addr
331.RS 4
332Shows addresses assigned to all network interfaces.
333.RE
334.PP
335ip neigh
336.RS 4
337Shows the current neighbour table in kernel.
338.RE
339.PP
340ip link set x up
341.RS 4
342Bring up interface x.
343.RE
344.PP
345ip link set x down
346.RE
347.RS 4
348Bring down interface x.
349.RE
350.PP
351ip route
352.RS 4
353Show table routes.
354.RE
355
985794ad 356.SH HISTORY
985794ad
SH
357.B ip
358was written by Alexey N. Kuznetsov and added in Linux 2.2.
359.SH SEE ALSO
2a9721f1
SH
360.BR ip-address (8),
361.BR ip-addrlabel (8),
6121e1fe 362.BR ip-l2tp (8),
2a9721f1
SH
363.BR ip-link (8),
364.BR ip-maddress (8),
365.BR ip-monitor (8),
366.BR ip-mroute (8),
367.BR ip-neighbour (8),
db4a7f19 368.BR ip-netns (8),
2a9721f1
SH
369.BR ip-ntable (8),
370.BR ip-route (8),
371.BR ip-rule (8),
ea63a69b 372.BR ip-tcp_metrics (8),
ac0eff58 373.BR ip-token (8),
2a9721f1
SH
374.BR ip-tunnel (8),
375.BR ip-xfrm (8)
985794ad
SH
376.br
377.RB "IP Command reference " ip-cref.ps
2a9721f1 378.SH REPORTING BUGS
49572501 379Report any bugs to the Network Developers mailing list
2a9721f1
SH
380.B <netdev@vger.kernel.org>
381where the development and maintenance is primarily done.
382You do not have to be subscribed to the list to send a message there.
985794ad
SH
383
384.SH AUTHOR
2a9721f1 385Original Manpage by Michail Litvak <mci@owl.openwall.com>