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