]> git.proxmox.com Git - mirror_iproute2.git/blob - man/man8/ip.8
Merge branch 'net-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shemminger...
[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"
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 \-0
119 shortcut for
120 .BR "\-family link" .
121
122 .TP
123 .BR "\-o" , " \-oneline"
124 output each record on a single line, replacing line feeds
125 with the
126 .B '\e'
127 character. This is convenient when you want to count records
128 with
129 .BR wc (1)
130 or to
131 .BR grep (1)
132 the output.
133
134 .TP
135 .BR "\-r" , " \-resolve"
136 use the system's name resolver to print DNS names instead of
137 host addresses.
138
139 .TP
140 .BR "\-n" , " \-net" , " \-netns " <NETNS>
141 switches
142 .B ip
143 to the specified network namespace
144 .IR NETNS .
145 Actually it just simplifies executing of:
146
147 .B ip netns exec
148 .IR NETNS
149 .B ip
150 .RI "[ " OPTIONS " ] " OBJECT " { " COMMAND " | "
151 .BR help " }"
152
153 to
154
155 .B ip
156 .RI "-n[etns] " NETNS " [ " OPTIONS " ] " OBJECT " { " COMMAND " | "
157 .BR help " }"
158
159 .TP
160 .BR "\-a" , " \-all"
161 executes specified command over all objects, it depends if command supports this option.
162
163 .SH IP - COMMAND SYNTAX
164
165 .SS
166 .I OBJECT
167
168 .TP
169 .B address
170 - protocol (IP or IPv6) address on a device.
171
172 .TP
173 .B addrlabel
174 - label configuration for protocol address selection.
175
176 .TP
177 .B l2tp
178 - tunnel ethernet over IP (L2TPv3).
179
180 .TP
181 .B link
182 - network device.
183
184 .TP
185 .B maddress
186 - multicast address.
187
188 .TP
189 .B monitor
190 - watch for netlink messages.
191
192 .TP
193 .B mroute
194 - multicast routing cache entry.
195
196 .TP
197 .B mrule
198 - rule in multicast routing policy database.
199
200 .TP
201 .B neighbour
202 - manage ARP or NDISC cache entries.
203
204 .TP
205 .B netns
206 - manage network namespaces.
207
208 .TP
209 .B ntable
210 - manage the neighbor cache's operation.
211
212 .TP
213 .B route
214 - routing table entry.
215
216 .TP
217 .B rule
218 - rule in routing policy database.
219
220 .TP
221 .B tcp_metrics/tcpmetrics
222 - manage TCP Metrics
223
224 .TP
225 .B tunnel
226 - tunnel over IP.
227
228 .TP
229 .B tuntap
230 - manage TUN/TAP devices.
231
232 .TP
233 .B xfrm
234 - manage IPSec policies.
235
236 .PP
237 The names of all objects may be written in full or
238 abbreviated form, for exampe
239 .B address
240 can be abbreviated as
241 .B addr
242 or just
243 .B a.
244
245 .SS
246 .I COMMAND
247
248 Specifies the action to perform on the object.
249 The set of possible actions depends on the object type.
250 As a rule, it is possible to
251 .BR "add" , " delete"
252 and
253 .B show
254 (or
255 .B list
256 ) objects, but some objects do not allow all of these operations
257 or have some additional commands. The
258 .B help
259 command is available for all objects. It prints
260 out a list of available commands and argument syntax conventions.
261 .sp
262 If no command is given, some default command is assumed.
263 Usually it is
264 .B list
265 or, if the objects of this class cannot be listed,
266 .BR "help" .
267
268 .SH HISTORY
269 .B ip
270 was written by Alexey N. Kuznetsov and added in Linux 2.2.
271 .SH SEE ALSO
272 .BR ip-address (8),
273 .BR ip-addrlabel (8),
274 .BR ip-l2tp (8),
275 .BR ip-link (8),
276 .BR ip-maddress (8),
277 .BR ip-monitor (8),
278 .BR ip-mroute (8),
279 .BR ip-neighbour (8),
280 .BR ip-netns (8),
281 .BR ip-ntable (8),
282 .BR ip-route (8),
283 .BR ip-rule (8),
284 .BR ip-tcp_metrics (8),
285 .BR ip-tunnel (8),
286 .BR ip-xfrm (8)
287 .br
288 .RB "IP Command reference " ip-cref.ps
289 .SH REPORTING BUGS
290 Report any bugs to the Network Developers mailing list
291 .B <netdev@vger.kernel.org>
292 where the development and maintenance is primarily done.
293 You do not have to be subscribed to the list to send a message there.
294
295 .SH AUTHOR
296 Original Manpage by Michail Litvak <mci@owl.openwall.com>