]>
Commit | Line | Data |
---|---|---|
77987911 | 1 | .TH IP\-LINK 8 "13 Dec 2012" "iproute2" "Linux" |
761a1e60 CT |
2 | .SH "NAME" |
3 | ip-link \- network device configuration | |
4 | .SH "SYNOPSIS" | |
5 | .sp | |
6 | .ad l | |
7 | .in +8 | |
8 | .ti -8 | |
9 | .B ip | |
10 | .RI "[ " OPTIONS " ]" | |
11 | .B link | |
12 | .RI " { " COMMAND " | " | |
13 | .BR help " }" | |
14 | .sp | |
15 | ||
16 | .ti -8 | |
17 | .IR OPTIONS " := { " | |
18 | \fB\-V\fR[\fIersion\fR] | | |
19 | \fB\-s\fR[\fItatistics\fR] | | |
20 | \fB\-r\fR[\fIesolve\fR] | | |
21 | \fB\-f\fR[\fIamily\fR] { | |
22 | .BR inet " | " inet6 " | " ipx " | " dnet " | " link " } | " | |
23 | \fB\-o\fR[\fIneline\fR] } | |
24 | ||
25 | .ti -8 | |
9fc56974 AH |
26 | .BI "ip link add" |
27 | .RB "[ " link | |
28 | .IR DEVICE " ]" | |
761a1e60 CT |
29 | .RB "[ " name " ]" |
30 | .I NAME | |
31 | .br | |
32 | .RB "[ " txqueuelen | |
33 | .IR PACKETS " ]" | |
34 | .br | |
35 | .RB "[ " address | |
36 | .IR LLADDR " ]" | |
37 | .RB "[ " broadcast | |
38 | .IR LLADDR " ]" | |
39 | .br | |
40 | .RB "[ " mtu | |
41 | .IR MTU " ]" | |
42 | .br | |
d992f3e6 JP |
43 | .RB "[ " numtxqueues |
44 | .IR QUEUE_COUNT " ]" | |
45 | .RB "[ " numrxqueues | |
46 | .IR QUEUE_COUNT " ]" | |
47 | .br | |
761a1e60 CT |
48 | .BR type " TYPE" |
49 | .RI "[ " ARGS " ]" | |
50 | ||
51 | .ti -8 | |
52 | .IR TYPE " := [ " | |
f1a6f4e9 SH |
53 | .BR bridge " | " |
54 | .BR can " | " | |
55 | .BR dummy " | " | |
56 | .BR ifb " | " | |
57 | .BR ipoib " |" | |
58 | .BR macvlan " | " | |
59 | .BR vcan " | " | |
60 | .BR veth " | " | |
61 | .BR vlan " | " | |
77987911 ND |
62 | .BR vxlan " |" |
63 | .BR ip6tnl " |" | |
64 | .BR ipip " |" | |
65 | .BR sit " ]" | |
761a1e60 CT |
66 | |
67 | .ti -8 | |
68 | .BI "ip link delete " DEVICE | |
69 | .BI type " TYPE" | |
70 | .RI "[ " ARGS " ]" | |
71 | ||
72 | .ti -8 | |
73 | .BR "ip link set " { | |
74 | .IR DEVICE " | " | |
75 | .BI "group " GROUP | |
76 | .RB "} { " up " | " down " | " arp " { " on " | " off " } |" | |
77 | .br | |
78 | .BR promisc " { " on " | " off " } |" | |
79 | .br | |
80 | .BR allmulticast " { " on " | " off " } |" | |
81 | .br | |
82 | .BR dynamic " { " on " | " off " } |" | |
83 | .br | |
84 | .BR multicast " { " on " | " off " } |" | |
85 | .br | |
86 | .B txqueuelen | |
87 | .IR PACKETS " |" | |
88 | .br | |
89 | .B name | |
90 | .IR NEWNAME " |" | |
91 | .br | |
92 | .B address | |
93 | .IR LLADDR " |" | |
94 | .B broadcast | |
95 | .IR LLADDR " |" | |
96 | .br | |
97 | .B mtu | |
98 | .IR MTU " |" | |
99 | .br | |
100 | .B netns | |
101 | .IR PID " |" | |
102 | .br | |
103 | .B netns | |
104 | .IR NETNSNAME " |" | |
105 | .br | |
106 | .B alias | |
107 | .IR NAME " |" | |
108 | .br | |
109 | .B vf | |
110 | .IR NUM " [" | |
111 | .B mac | |
112 | .IR LLADDR " ] [" | |
113 | .B vlan | |
114 | .IR VLANID " [ " | |
115 | .B qos | |
116 | .IR VLAN-QOS " ] ] [" | |
117 | .B rate | |
118 | .IR TXRATE " ] [" | |
119 | .B spoofchk { on | off } | |
120 | ] | | |
121 | .br | |
122 | .B master | |
123 | .IR DEVICE | |
124 | .br | |
125 | .B nomaster | |
126 | .BR " }" | |
127 | ||
128 | ||
129 | .ti -8 | |
130 | .B ip link show | |
131 | .RI "[ " DEVICE " | " | |
132 | .B group | |
133 | .IR GROUP " ]" | |
134 | ||
135 | .SH "DESCRIPTION" | |
136 | .SS ip link add - add virtual link | |
137 | ||
138 | .TP | |
139 | .BI link " DEVICE " | |
140 | specifies the physical device to act operate on. | |
141 | ||
142 | .I NAME | |
143 | specifies the name of the new virtual device. | |
144 | ||
145 | .I TYPE | |
146 | specifies the type of the new device. | |
147 | .sp | |
148 | Link types: | |
149 | ||
150 | .in +8 | |
f1a6f4e9 SH |
151 | .B bridge |
152 | - Ethernet Bridge device | |
761a1e60 | 153 | .sp |
f1a6f4e9 SH |
154 | .B can |
155 | - Controller Area Network interface | |
761a1e60 CT |
156 | .sp |
157 | .B dummy | |
158 | - Dummy network interface | |
159 | .sp | |
160 | .B ifb | |
161 | - Intermediate Functional Block device | |
162 | .sp | |
f1a6f4e9 SH |
163 | .B ipoib |
164 | - IP over Infiniband device | |
165 | .sp | |
761a1e60 | 166 | .B macvlan |
f1a6f4e9 | 167 | - Virtual interface base on link layer address (MAC) |
761a1e60 | 168 | .sp |
f1a6f4e9 SH |
169 | .B vcan |
170 | - Virtual Local CAN interface | |
761a1e60 | 171 | .sp |
f1a6f4e9 SH |
172 | .B veth |
173 | - Virtual ethernet interface | |
de038993 | 174 | .sp |
f1a6f4e9 SH |
175 | .BR vlan |
176 | - 802.1q tagged virtual LAN interface | |
177 | .sp | |
178 | .BR vxlan | |
179 | - Virtual eXtended LAN | |
77987911 ND |
180 | .sp |
181 | .BR ip6tnl | |
182 | - Virtual tunnel interface IPv4|IPv6 over IPv6 | |
183 | .sp | |
184 | .BR ipip | |
185 | - Virtual tunnel interface IPv4 over IPv4 | |
186 | .sp | |
187 | .BR sit | |
188 | - Virtual tunnel interface IPv6 over IPv4 | |
761a1e60 CT |
189 | .in -8 |
190 | ||
d992f3e6 JP |
191 | .TP |
192 | .BI numtxqueues " QUEUE_COUNT " | |
193 | specifies the number of transmit queues for new device. | |
194 | ||
195 | .TP | |
196 | .BI numrxqueues " QUEUE_COUNT " | |
197 | specifies the number of receive queues for new device. | |
198 | ||
2816a568 TR |
199 | .TP |
200 | VXLAN Type Support | |
201 | For a link of type | |
202 | .I VXLAN | |
203 | the following additional arguments are supported: | |
204 | ||
205 | .BI "ip link add " DEVICE | |
206 | .BI type " vxlan " id " ID | |
207 | .R " [ " | |
208 | .BI dev " PHYS_DEV " | |
209 | .R " ] [ " | |
210 | .BI group " IPADDR " | |
211 | .R " ] [ " | |
212 | .BI local " IPADDR " | |
213 | .R " ] [ " | |
214 | .BI ttl " TTL " | |
215 | .R " ] [ " | |
216 | .BI tos " TOS " | |
217 | .R " ] [ " | |
218 | .BI port " MIN MAX " | |
219 | .R " ] [ " | |
220 | .I "[no]learning " | |
221 | .R " ] [ " | |
222 | .I "[no]proxy " | |
223 | .R " ] [ " | |
224 | .I "[no]rsc " | |
225 | .R " ] [ " | |
226 | .I "[no]l2miss " | |
227 | .R " ] [ " | |
228 | .I "[no]l3miss " | |
229 | .R " ]" | |
230 | ||
231 | .in +8 | |
232 | .sp | |
233 | .BI id " VNI " | |
234 | - specifies the VXLAN Network Identifer (or VXLAN Segment | |
235 | Identifier) to use. | |
236 | ||
237 | .BI dev " PHYS_DEV" | |
238 | - specifies the physical device to use for tunnel endpoint communication. | |
239 | ||
240 | .sp | |
241 | .BI group " IPADDR" | |
242 | - specifies the multicast IP address to join. | |
243 | ||
244 | .sp | |
245 | .BI local " IPADDR" | |
246 | - specifies the source IP address to use in outgoing packets. | |
247 | ||
248 | .sp | |
249 | .BI ttl " TTL" | |
250 | - specifies the TTL value to use in outgoing packets. | |
251 | ||
252 | .sp | |
253 | .BI tos " TOS" | |
254 | - specifies the TOS value to use in outgoing packets. | |
255 | ||
256 | .sp | |
257 | .BI port " MIN MAX" | |
258 | - specifies the range of port numbers to use as UDP | |
259 | source ports to communicate to the remote VXLAN tunnel endpoint. | |
260 | ||
261 | .sp | |
262 | .I [no]learning | |
263 | - specifies if unknown source link layer addresses and IP addresses | |
264 | are entered into the VXLAN device forwarding database. | |
265 | ||
266 | .sp | |
267 | .I [no]rsc | |
268 | - specifies if route short circuit is turned on. | |
269 | ||
270 | .sp | |
271 | .I [no]proxy | |
272 | - specifies ARP proxy is turned on. | |
273 | ||
274 | .sp | |
275 | .I [no]l2miss | |
276 | - specifies if netlink LLADDR miss notifications are generated. | |
277 | ||
278 | .sp | |
279 | .I [no]l3miss | |
280 | - specifies if netlink IP ADDR miss notifications are generated. | |
281 | ||
282 | .in -8 | |
283 | ||
761a1e60 CT |
284 | .SS ip link delete - delete virtual link |
285 | .I DEVICE | |
286 | specifies the virtual device to act operate on. | |
287 | .I TYPE | |
288 | specifies the type of the device. | |
289 | ||
290 | ||
291 | .TP | |
292 | .BI dev " DEVICE " | |
293 | specifies the physical device to act operate on. | |
294 | ||
295 | .SS ip link set - change device attributes | |
296 | ||
297 | .TP | |
298 | .BI dev " DEVICE " | |
299 | .I DEVICE | |
6274b0b7 | 300 | specifies network device to operate on. When configuring SR-IOV Virtual Function |
761a1e60 CT |
301 | (VF) devices, this keyword should specify the associated Physical Function (PF) |
302 | device. | |
303 | ||
304 | .TP | |
305 | .BI group " GROUP " | |
306 | .I GROUP | |
307 | has a dual role: If both group and dev are present, then move the device to the | |
308 | specified group. If only a group is specified, then the command operates on | |
309 | all devices in that group. | |
310 | ||
311 | .TP | |
312 | .BR up " and " down | |
313 | change the state of the device to | |
314 | .B UP | |
315 | or | |
316 | .BR "DOWN" . | |
317 | ||
318 | .TP | |
319 | .BR "arp on " or " arp off" | |
320 | change the | |
321 | .B NOARP | |
322 | flag on the device. | |
323 | ||
324 | .TP | |
325 | .BR "multicast on " or " multicast off" | |
326 | change the | |
327 | .B MULTICAST | |
328 | flag on the device. | |
329 | ||
330 | .TP | |
331 | .BR "dynamic on " or " dynamic off" | |
332 | change the | |
333 | .B DYNAMIC | |
334 | flag on the device. | |
335 | ||
336 | .TP | |
337 | .BI name " NAME" | |
338 | change the name of the device. This operation is not | |
339 | recommended if the device is running or has some addresses | |
340 | already configured. | |
341 | ||
342 | .TP | |
343 | .BI txqueuelen " NUMBER" | |
344 | .TP | |
345 | .BI txqlen " NUMBER" | |
346 | change the transmit queue length of the device. | |
347 | ||
348 | .TP | |
349 | .BI mtu " NUMBER" | |
350 | change the | |
351 | .I MTU | |
352 | of the device. | |
353 | ||
354 | .TP | |
355 | .BI address " LLADDRESS" | |
356 | change the station address of the interface. | |
357 | ||
358 | .TP | |
359 | .BI broadcast " LLADDRESS" | |
360 | .TP | |
361 | .BI brd " LLADDRESS" | |
362 | .TP | |
363 | .BI peer " LLADDRESS" | |
364 | change the link layer broadcast address or the peer address when | |
365 | the interface is | |
366 | .IR "POINTOPOINT" . | |
367 | ||
368 | .TP | |
369 | .BI netns " PID" | |
370 | move the device to the network namespace associated with the process | |
371 | .IR "PID". | |
372 | ||
373 | .TP | |
374 | .BI netns " NETNSNAME" | |
375 | move the device to the network namespace associated with name | |
376 | .IR "NETNSNAME". | |
377 | ||
378 | .TP | |
379 | .BI alias " NAME" | |
380 | give the device a symbolic name for easy reference. | |
381 | ||
382 | .TP | |
383 | .BI group " GROUP" | |
384 | specify the group the device belongs to. | |
385 | The available groups are listed in file | |
386 | .BR "@SYSCONFDIR@/group" . | |
387 | ||
388 | .TP | |
389 | .BI vf " NUM" | |
390 | specify a Virtual Function device to be configured. The associated PF device | |
391 | must be specified using the | |
392 | .B dev | |
393 | parameter. | |
394 | ||
395 | .in +8 | |
396 | .BI mac " LLADDRESS" | |
397 | - change the station address for the specified VF. The | |
398 | .B vf | |
399 | parameter must be specified. | |
400 | ||
401 | .sp | |
402 | .BI vlan " VLANID" | |
403 | - change the assigned VLAN for the specified VF. When specified, all traffic | |
404 | sent from the VF will be tagged with the specified VLAN ID. Incoming traffic | |
405 | will be filtered for the specified VLAN ID, and will have all VLAN tags | |
406 | stripped before being passed to the VF. Setting this parameter to 0 disables | |
407 | VLAN tagging and filtering. The | |
408 | .B vf | |
409 | parameter must be specified. | |
410 | ||
411 | .sp | |
412 | .BI qos " VLAN-QOS" | |
413 | - assign VLAN QOS (priority) bits for the VLAN tag. When specified, all VLAN | |
414 | tags transmitted by the VF will include the specified priority bits in the | |
415 | VLAN tag. If not specified, the value is assumed to be 0. Both the | |
416 | .B vf | |
417 | and | |
418 | .B vlan | |
419 | parameters must be specified. Setting both | |
420 | .B vlan | |
421 | and | |
422 | .B qos | |
423 | as 0 disables VLAN tagging and filtering for the VF. | |
424 | ||
425 | .sp | |
426 | .BI rate " TXRATE" | |
427 | - change the allowed transmit bandwidth, in Mbps, for the specified VF. | |
428 | Setting this parameter to 0 disables rate limiting. The | |
429 | .B vf | |
430 | parameter must be specified. | |
431 | ||
432 | .sp | |
433 | .BI spoofchk " on|off" | |
434 | - turn packet spoof checking on or off for the specified VF. | |
435 | .in -8 | |
436 | ||
437 | .TP | |
438 | .BI master " DEVICE" | |
439 | set master device of the device (enslave device). | |
440 | ||
441 | .TP | |
442 | .BI nomaster | |
443 | unset master device of the device (release device). | |
444 | ||
445 | .PP | |
446 | .B Warning: | |
447 | If multiple parameter changes are requested, | |
448 | .B ip | |
449 | aborts immediately after any of the changes have failed. | |
450 | This is the only case when | |
451 | .B ip | |
452 | can move the system to an unpredictable state. The solution | |
453 | is to avoid changing several parameters with one | |
454 | .B ip link set | |
455 | call. | |
456 | ||
457 | .SS ip link show - display device attributes | |
458 | ||
459 | .TP | |
460 | .BI dev " NAME " (default) | |
461 | .I NAME | |
462 | specifies the network device to show. | |
463 | If this argument is omitted all devices in the default group are listed. | |
464 | ||
465 | .TP | |
466 | .BI group " GROUP " | |
467 | .I GROUP | |
468 | specifies what group of devices to show. | |
469 | ||
470 | .TP | |
471 | .B up | |
472 | only display running interfaces. | |
473 | ||
474 | .SH "EXAMPLES" | |
475 | .PP | |
476 | ip link show | |
477 | .RS 4 | |
478 | Shows the state of all network interfaces on the system. | |
479 | .RE | |
480 | .PP | |
481 | ip link set dev ppp0 mtu 1400 | |
482 | .RS 4 | |
483 | Change the MTU the ppp0 device. | |
484 | .RE | |
485 | .PP | |
486 | ip link add link eth0 name eth0.10 type vlan id 10 | |
487 | .RS 4 | |
488 | Creates a new vlan device eth0.10 on device eth0. | |
489 | .RE | |
490 | .PP | |
491 | ip link delete dev eth0.10 | |
492 | .RS 4 | |
493 | Removes vlan device. | |
494 | .RE | |
495 | ||
496 | .SH SEE ALSO | |
497 | .br | |
498 | .BR ip (8) | |
499 | ||
500 | .SH AUTHOR | |
501 | Original Manpage by Michail Litvak <mci@owl.openwall.com> |