]> git.proxmox.com Git - mirror_iproute2.git/blob - man/man8/ip.8
Merge branch 'master' into net-next
[mirror_iproute2.git] / man / man8 / ip.8
1 .TH IP 8 "20 Dec 2011" "iproute2" "Linux"
2 .SH NAME
3 ip \- show / manipulate routing, devices, policy routing and tunnels
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
14 .ti -8
15 .B ip
16 .RB "[ " -force " ] "
17 .BI "-batch " filename
18 .sp
19
20 .ti -8
21 .IR OBJECT " := { "
22 .BR link " | " addr " | " addrlabel " | " route " | " rule " | " neigh " | "\
23 ntable " | " tunnel " | " tuntap " | " maddr " | " mroute " | " mrule " | "\
24 monitor " | " xfrm " | " netns " | " l2tp " | " tcp_metrics " }"
25 .sp
26
27 .ti -8
28 .IR OPTIONS " := { "
29 \fB\-V\fR[\fIersion\fR] |
30 \fB\-s\fR[\fItatistics\fR] |
31 \fB\-r\fR[\fIesolve\fR] |
32 \fB\-f\fR[\fIamily\fR] {
33 .BR inet " | " inet6 " | " ipx " | " dnet " | " link " } | "
34 \fB\-o\fR[\fIneline\fR] |
35 \fB\-n\fR[\fIetns\fR] name |
36 \fB\-a\fR[\fIll\fR] |
37 \fB\-c\fR[\fIolor\fR] }
38
39
40 .SH OPTIONS
41
42 .TP
43 .BR "\-V" , " -Version"
44 Print the version of the
45 .B ip
46 utility and exit.
47
48 .TP
49 .BR "\-b", " \-batch " <FILENAME>
50 Read commands from provided file or standard input and invoke them.
51 First failure will cause termination of ip.
52
53 .TP
54 .BR "\-force"
55 Don't terminate ip on errors in batch mode.
56 If there were any errors during execution of the commands, the application return code will be non zero.
57
58 .TP
59 .BR "\-s" , " \-stats" , " \-statistics"
60 Output more information. If the option
61 appears twice or more, the amount of information increases.
62 As a rule, the information is statistics or some time values.
63
64 .TP
65 .BR "\-d" , " \-details"
66 Output more detailed information.
67
68 .TP
69 .BR "\-l" , " \-loops " <COUNT>
70 Specify maximum number of loops the 'ip addr flush' logic
71 will attempt before giving up. The default is 10.
72 Zero (0) means loop until all addresses are removed.
73
74 .TP
75 .BR "\-f" , " \-family " <FAMILY>
76 Specifies the protocol family to use. The protocol family identifier can be one of
77 .BR "inet" , " inet6" , " bridge" , " ipx" , " dnet" , " mpls"
78 or
79 .BR link .
80 If this option is not present,
81 the protocol family is guessed from other arguments. If the rest
82 of the command line does not give enough information to guess the
83 family,
84 .B ip
85 falls back to the default one, usually
86 .B inet
87 or
88 .BR "any" .
89 .B link
90 is a special family identifier meaning that no networking protocol
91 is involved.
92
93 .TP
94 .B \-4
95 shortcut for
96 .BR "-family inet" .
97
98 .TP
99 .B \-6
100 shortcut for
101 .BR "\-family inet6" .
102
103 .TP
104 .B \-B
105 shortcut for
106 .BR "\-family bridge" .
107
108 .TP
109 .B \-D
110 shortcut for
111 .BR "\-family decnet" .
112
113 .TP
114 .B \-I
115 shortcut for
116 .BR "\-family ipx" .
117
118 .TP
119 .B \-M
120 shortcut for
121 .BR "\-family mpls" .
122
123 .TP
124 .B \-0
125 shortcut for
126 .BR "\-family link" .
127
128 .TP
129 .BR "\-o" , " \-oneline"
130 output each record on a single line, replacing line feeds
131 with the
132 .B '\e'
133 character. This is convenient when you want to count records
134 with
135 .BR wc (1)
136 or to
137 .BR grep (1)
138 the output.
139
140 .TP
141 .BR "\-r" , " \-resolve"
142 use the system's name resolver to print DNS names instead of
143 host addresses.
144
145 .TP
146 .BR "\-n" , " \-net" , " \-netns " <NETNS>
147 switches
148 .B ip
149 to the specified network namespace
150 .IR NETNS .
151 Actually it just simplifies executing of:
152
153 .B ip netns exec
154 .IR NETNS
155 .B ip
156 .RI "[ " OPTIONS " ] " OBJECT " { " COMMAND " | "
157 .BR help " }"
158
159 to
160
161 .B ip
162 .RI "-n[etns] " NETNS " [ " OPTIONS " ] " OBJECT " { " COMMAND " | "
163 .BR help " }"
164
165 .TP
166 .BR "\-a" , " \-all"
167 executes specified command over all objects, it depends if command supports this option.
168
169 .TP
170 .BR "\-c" , " -color"
171 Use color output.
172
173 .SH IP - COMMAND SYNTAX
174
175 .SS
176 .I OBJECT
177
178 .TP
179 .B address
180 - protocol (IP or IPv6) address on a device.
181
182 .TP
183 .B addrlabel
184 - label configuration for protocol address selection.
185
186 .TP
187 .B l2tp
188 - tunnel ethernet over IP (L2TPv3).
189
190 .TP
191 .B link
192 - network device.
193
194 .TP
195 .B maddress
196 - multicast address.
197
198 .TP
199 .B monitor
200 - watch for netlink messages.
201
202 .TP
203 .B mroute
204 - multicast routing cache entry.
205
206 .TP
207 .B mrule
208 - rule in multicast routing policy database.
209
210 .TP
211 .B neighbour
212 - manage ARP or NDISC cache entries.
213
214 .TP
215 .B netns
216 - manage network namespaces.
217
218 .TP
219 .B ntable
220 - manage the neighbor cache's operation.
221
222 .TP
223 .B route
224 - routing table entry.
225
226 .TP
227 .B rule
228 - rule in routing policy database.
229
230 .TP
231 .B tcp_metrics/tcpmetrics
232 - manage TCP Metrics
233
234 .TP
235 .B tunnel
236 - tunnel over IP.
237
238 .TP
239 .B tuntap
240 - manage TUN/TAP devices.
241
242 .TP
243 .B xfrm
244 - manage IPSec policies.
245
246 .PP
247 The names of all objects may be written in full or
248 abbreviated form, for example
249 .B address
250 can be abbreviated as
251 .B addr
252 or just
253 .B a.
254
255 .SS
256 .I COMMAND
257
258 Specifies the action to perform on the object.
259 The set of possible actions depends on the object type.
260 As a rule, it is possible to
261 .BR "add" , " delete"
262 and
263 .B show
264 (or
265 .B list
266 ) objects, but some objects do not allow all of these operations
267 or have some additional commands. The
268 .B help
269 command is available for all objects. It prints
270 out a list of available commands and argument syntax conventions.
271 .sp
272 If no command is given, some default command is assumed.
273 Usually it is
274 .B list
275 or, if the objects of this class cannot be listed,
276 .BR "help" .
277
278 .SH EXIT STATUS
279 Exit status is 0 if command was successful, and 1 if there is a syntax error.
280 If an error was reported by the kernel exit status is 2.
281
282 .SH HISTORY
283 .B ip
284 was written by Alexey N. Kuznetsov and added in Linux 2.2.
285 .SH SEE ALSO
286 .BR ip-address (8),
287 .BR ip-addrlabel (8),
288 .BR ip-l2tp (8),
289 .BR ip-link (8),
290 .BR ip-maddress (8),
291 .BR ip-monitor (8),
292 .BR ip-mroute (8),
293 .BR ip-neighbour (8),
294 .BR ip-netns (8),
295 .BR ip-ntable (8),
296 .BR ip-route (8),
297 .BR ip-rule (8),
298 .BR ip-tcp_metrics (8),
299 .BR ip-tunnel (8),
300 .BR ip-xfrm (8)
301 .br
302 .RB "IP Command reference " ip-cref.ps
303 .SH REPORTING BUGS
304 Report any bugs to the Network Developers mailing list
305 .B <netdev@vger.kernel.org>
306 where the development and maintenance is primarily done.
307 You do not have to be subscribed to the list to send a message there.
308
309 .SH AUTHOR
310 Original Manpage by Michail Litvak <mci@owl.openwall.com>