1 .TH IP 8 "20 Dec 2011" "iproute2" "Linux"
3 ip \- show / manipulate routing, network devices, interfaces and tunnels
10 .RI "[ " OPTIONS " ] " OBJECT " { " COMMAND " | "
17 .BI "-batch " filename
22 .BR link " | " address " | " addrlabel " | " route " | " rule " | " neigh " | "\
23 ntable " | " tunnel " | " tuntap " | " maddress " | " mroute " | " mrule " | "\
24 monitor " | " xfrm " | " netns " | " l2tp " | " tcp_metrics " | " token " | "\
30 \fB\-V\fR[\fIersion\fR] |
31 \fB\-h\fR[\fIuman-readable\fR] |
32 \fB\-s\fR[\fItatistics\fR] |
33 \fB\-d\fR[\fIetails\fR] |
34 \fB\-r\fR[\fIesolve\fR] |
36 \fB\-f\fR[\fIamily\fR] {
37 .BR inet " | " inet6 " | " link " } | "
44 \fB-l\fR[\fIoops\fR] { \fBmaximum-addr-flush-attempts\fR } |
45 \fB\-o\fR[\fIneline\fR] |
46 \fB\-rc\fR[\fIvbuf\fR] [\fBsize\fR] |
47 \fB\-t\fR[\fIimestamp\fR] |
48 \fB\-ts\fR[\fIhort\fR] |
49 \fB\-n\fR[\fIetns\fR] name |
51 \fB\-c\fR[\fIolor\fR] |
52 \fB\-br\fR[\fIief\fR] |
59 .BR "\-V" , " -Version"
60 Print the version of the
65 .BR "\-h", " \-human", " \-human-readable"
66 output statistics with human readable values followed by suffix.
69 .BR "\-b", " \-batch " <FILENAME>
70 Read commands from provided file or standard input and invoke them.
71 First failure will cause termination of ip.
75 Don't terminate ip on errors in batch mode.
76 If there were any errors during execution of the commands, the application return code will be non zero.
79 .BR "\-s" , " \-stats" , " \-statistics"
80 Output more information. If the option
81 appears twice or more, the amount of information increases.
82 As a rule, the information is statistics or some time values.
85 .BR "\-d" , " \-details"
86 Output more detailed information.
89 .BR "\-l" , " \-loops " <COUNT>
90 Specify maximum number of loops the 'ip address flush' logic
91 will attempt before giving up. The default is 10.
92 Zero (0) means loop until all addresses are removed.
95 .BR "\-f" , " \-family " <FAMILY>
96 Specifies the protocol family to use. The protocol family identifier can be one of
97 .BR "inet" , " inet6" , " bridge" , " mpls"
100 If this option is not present,
101 the protocol family is guessed from other arguments. If the rest
102 of the command line does not give enough information to guess the
105 falls back to the default one, usually
110 is a special family identifier meaning that no networking protocol
121 .BR "\-family inet6" .
126 .BR "\-family bridge" .
131 .BR "\-family mpls" .
136 .BR "\-family link" .
139 .BR "\-o" , " \-oneline"
140 output each record on a single line, replacing line feeds
143 character. This is convenient when you want to count records
151 .BR "\-r" , " \-resolve"
152 use the system's name resolver to print DNS names instead of
156 .BR "\-n" , " \-netns " <NETNS>
159 to the specified network namespace
161 Actually it just simplifies executing of:
166 .RI "[ " OPTIONS " ] " OBJECT " { " COMMAND " | "
172 .RI "-n[etns] " NETNS " [ " OPTIONS " ] " OBJECT " { " COMMAND " | "
177 executes specified command over all objects, it depends if command supports this option.
180 .BR \-c [ color ][ = { always | auto | never }
181 Configure color output. If parameter is omitted or
183 color output is enabled regardless of stdout state. If parameter is
185 stdout is checked to be a terminal before enabling color output. If parameter is
187 color output is disabled. If specified multiple times, the last one takes
188 precedence. This flag is ignored if
192 Used color palette can be influenced by
199 .BR "\-t" , " \-timestamp"
200 display current time when using monitor option.
203 .BR "\-ts" , " \-tshort"
206 but use shorter format.
209 .BR "\-rc" , " \-rcvbuf" <SIZE>
210 Set the netlink socket receive buffer size, defaults to 1MB.
214 print human readable rates in IEC units (e.g. 1Ki = 1024).
217 .BR "\-br" , " \-brief"
218 Print only basic information in a tabular format for better readability. This option is currently only supported by
219 .BR "ip addr show " and " ip link show " commands.
223 Output results in JavaScript Object Notation (JSON).
226 .BR "\-p", " \-pretty"
227 The default JSON format is compact and more efficient to parse but hard for most users to read.
228 This flag adds indentation for readability.
230 .SH IP - COMMAND SYNTAX
237 - protocol (IP or IPv6) address on a device.
241 - label configuration for protocol address selection.
245 - tunnel ethernet over IP (L2TPv3).
257 - watch for netlink messages.
261 - multicast routing cache entry.
265 - rule in multicast routing policy database.
269 - manage ARP or NDISC cache entries.
273 - manage network namespaces.
277 - manage the neighbor cache's operation.
281 - routing table entry.
285 - rule in routing policy database.
288 .B tcp_metrics/tcpmetrics
293 - manage tokenized interface identifiers.
301 - manage TUN/TAP devices.
305 - manage IPSec policies.
308 The names of all objects may be written in full or
309 abbreviated form, for example
311 can be abbreviated as
319 Specifies the action to perform on the object.
320 The set of possible actions depends on the object type.
321 As a rule, it is possible to
322 .BR "add" , " delete"
327 ) objects, but some objects do not allow all of these operations
328 or have some additional commands. The
330 command is available for all objects. It prints
331 out a list of available commands and argument syntax conventions.
333 If no command is given, some default command is assumed.
336 or, if the objects of this class cannot be listed,
342 If set, it's value is used for detection whether background is dark or light and use contrast colors for it.
344 COLORFGBG environment variable usually contains either two or three
345 values separated by semicolons; we want the last value in either case.
346 If this value is 0-6 or 8, chose colors suitable for dark background:
348 COLORFGBG=";0" ip -c a
351 Exit status is 0 if command was successful, and 1 if there is a syntax error.
352 If an error was reported by the kernel exit status is 2.
358 Shows addresses assigned to all network interfaces.
363 Shows the current neighbour table in kernel.
368 Bring up interface x.
374 Bring down interface x.
384 was written by Alexey N. Kuznetsov and added in Linux 2.2.
387 .BR ip-addrlabel (8),
393 .BR ip-neighbour (8),
398 .BR ip-tcp_metrics (8),
403 .RB "IP Command reference " ip-cref.ps
405 Report any bugs to the Network Developers mailing list
406 .B <netdev@vger.kernel.org>
407 where the development and maintenance is primarily done.
408 You do not have to be subscribed to the list to send a message there.
411 Original Manpage by Michail Litvak <mci@owl.openwall.com>