]>
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 " ]" | |
4de8d885 PE |
42 | .RB "[ " index |
43 | .IR IDX " ]" | |
761a1e60 | 44 | .br |
d992f3e6 JP |
45 | .RB "[ " numtxqueues |
46 | .IR QUEUE_COUNT " ]" | |
47 | .RB "[ " numrxqueues | |
48 | .IR QUEUE_COUNT " ]" | |
49 | .br | |
761a1e60 CT |
50 | .BR type " TYPE" |
51 | .RI "[ " ARGS " ]" | |
52 | ||
53 | .ti -8 | |
54 | .IR TYPE " := [ " | |
f1a6f4e9 | 55 | .BR bridge " | " |
cc26a890 | 56 | .BR bond " ]" |
f1a6f4e9 SH |
57 | .BR can " | " |
58 | .BR dummy " | " | |
5c0aec93 | 59 | .BR hsr " | " |
f1a6f4e9 SH |
60 | .BR ifb " | " |
61 | .BR ipoib " |" | |
62 | .BR macvlan " | " | |
63 | .BR vcan " | " | |
64 | .BR veth " | " | |
65 | .BR vlan " | " | |
77987911 ND |
66 | .BR vxlan " |" |
67 | .BR ip6tnl " |" | |
68 | .BR ipip " |" | |
9abde37c | 69 | .BR sit " |" |
70 | .BR gre " |" | |
71 | .BR gretap " |" | |
72 | .BR ip6gre " |" | |
73 | .BR ip6gretap " ]" | |
761a1e60 CT |
74 | |
75 | .ti -8 | |
76 | .BI "ip link delete " DEVICE | |
77 | .BI type " TYPE" | |
78 | .RI "[ " ARGS " ]" | |
79 | ||
80 | .ti -8 | |
81 | .BR "ip link set " { | |
82 | .IR DEVICE " | " | |
83 | .BI "group " GROUP | |
84 | .RB "} { " up " | " down " | " arp " { " on " | " off " } |" | |
85 | .br | |
86 | .BR promisc " { " on " | " off " } |" | |
87 | .br | |
88 | .BR allmulticast " { " on " | " off " } |" | |
89 | .br | |
90 | .BR dynamic " { " on " | " off " } |" | |
91 | .br | |
92 | .BR multicast " { " on " | " off " } |" | |
93 | .br | |
94 | .B txqueuelen | |
95 | .IR PACKETS " |" | |
96 | .br | |
97 | .B name | |
98 | .IR NEWNAME " |" | |
99 | .br | |
100 | .B address | |
101 | .IR LLADDR " |" | |
102 | .B broadcast | |
103 | .IR LLADDR " |" | |
104 | .br | |
105 | .B mtu | |
106 | .IR MTU " |" | |
107 | .br | |
108 | .B netns | |
109 | .IR PID " |" | |
110 | .br | |
111 | .B netns | |
112 | .IR NETNSNAME " |" | |
113 | .br | |
114 | .B alias | |
115 | .IR NAME " |" | |
116 | .br | |
117 | .B vf | |
118 | .IR NUM " [" | |
119 | .B mac | |
120 | .IR LLADDR " ] [" | |
121 | .B vlan | |
122 | .IR VLANID " [ " | |
123 | .B qos | |
124 | .IR VLAN-QOS " ] ] [" | |
125 | .B rate | |
126 | .IR TXRATE " ] [" | |
127 | .B spoofchk { on | off } | |
128 | ] | | |
129 | .br | |
130 | .B master | |
131 | .IR DEVICE | |
132 | .br | |
133 | .B nomaster | |
134 | .BR " }" | |
135 | ||
136 | ||
137 | .ti -8 | |
138 | .B ip link show | |
139 | .RI "[ " DEVICE " | " | |
140 | .B group | |
141 | .IR GROUP " ]" | |
142 | ||
143 | .SH "DESCRIPTION" | |
144 | .SS ip link add - add virtual link | |
145 | ||
146 | .TP | |
147 | .BI link " DEVICE " | |
148 | specifies the physical device to act operate on. | |
149 | ||
150 | .I NAME | |
151 | specifies the name of the new virtual device. | |
152 | ||
153 | .I TYPE | |
154 | specifies the type of the new device. | |
155 | .sp | |
156 | Link types: | |
157 | ||
158 | .in +8 | |
f1a6f4e9 SH |
159 | .B bridge |
160 | - Ethernet Bridge device | |
761a1e60 | 161 | .sp |
cc26a890 JP |
162 | .B bond |
163 | - Bonding device | |
164 | .sp | |
f1a6f4e9 SH |
165 | .B can |
166 | - Controller Area Network interface | |
761a1e60 CT |
167 | .sp |
168 | .B dummy | |
169 | - Dummy network interface | |
170 | .sp | |
171 | .B ifb | |
172 | - Intermediate Functional Block device | |
173 | .sp | |
f1a6f4e9 SH |
174 | .B ipoib |
175 | - IP over Infiniband device | |
176 | .sp | |
761a1e60 | 177 | .B macvlan |
f1a6f4e9 | 178 | - Virtual interface base on link layer address (MAC) |
761a1e60 | 179 | .sp |
f1a6f4e9 SH |
180 | .B vcan |
181 | - Virtual Local CAN interface | |
761a1e60 | 182 | .sp |
f1a6f4e9 SH |
183 | .B veth |
184 | - Virtual ethernet interface | |
de038993 | 185 | .sp |
f1a6f4e9 SH |
186 | .BR vlan |
187 | - 802.1q tagged virtual LAN interface | |
188 | .sp | |
189 | .BR vxlan | |
190 | - Virtual eXtended LAN | |
77987911 ND |
191 | .sp |
192 | .BR ip6tnl | |
193 | - Virtual tunnel interface IPv4|IPv6 over IPv6 | |
194 | .sp | |
195 | .BR ipip | |
196 | - Virtual tunnel interface IPv4 over IPv4 | |
197 | .sp | |
198 | .BR sit | |
199 | - Virtual tunnel interface IPv6 over IPv4 | |
9abde37c | 200 | .sp |
201 | .BR gre | |
202 | - Virtual tunnel interface GRE over IPv4 | |
203 | .sp | |
204 | .BR gretap | |
205 | - Virtual L2 tuunel interface GRE over IPv4 | |
206 | .sp | |
207 | .BR ip6gre | |
208 | - Virtual tuunel interface GRE over IPv6 | |
209 | .sp | |
210 | .BR ip6gretap | |
211 | - Virtual L2 tuunel interface GRE over IPv6 | |
761a1e60 CT |
212 | .in -8 |
213 | ||
d992f3e6 JP |
214 | .TP |
215 | .BI numtxqueues " QUEUE_COUNT " | |
216 | specifies the number of transmit queues for new device. | |
217 | ||
218 | .TP | |
219 | .BI numrxqueues " QUEUE_COUNT " | |
220 | specifies the number of receive queues for new device. | |
221 | ||
4de8d885 PE |
222 | .TP |
223 | .BI index " IDX " | |
224 | specifies the desired index of the new virtual device. The link creation fails, if the index is busy. | |
225 | ||
2816a568 TR |
226 | .TP |
227 | VXLAN Type Support | |
228 | For a link of type | |
229 | .I VXLAN | |
230 | the following additional arguments are supported: | |
231 | ||
232 | .BI "ip link add " DEVICE | |
233 | .BI type " vxlan " id " ID | |
234 | .R " [ " | |
235 | .BI dev " PHYS_DEV " | |
7cfa3802 AW |
236 | .RB " ] [ { " group " | " remote " } " |
237 | .I IPADDR | |
2816a568 TR |
238 | .R " ] [ " |
239 | .BI local " IPADDR " | |
240 | .R " ] [ " | |
241 | .BI ttl " TTL " | |
242 | .R " ] [ " | |
243 | .BI tos " TOS " | |
244 | .R " ] [ " | |
245 | .BI port " MIN MAX " | |
246 | .R " ] [ " | |
247 | .I "[no]learning " | |
248 | .R " ] [ " | |
249 | .I "[no]proxy " | |
250 | .R " ] [ " | |
251 | .I "[no]rsc " | |
252 | .R " ] [ " | |
253 | .I "[no]l2miss " | |
254 | .R " ] [ " | |
255 | .I "[no]l3miss " | |
256 | .R " ]" | |
257 | ||
258 | .in +8 | |
259 | .sp | |
260 | .BI id " VNI " | |
261 | - specifies the VXLAN Network Identifer (or VXLAN Segment | |
262 | Identifier) to use. | |
263 | ||
264 | .BI dev " PHYS_DEV" | |
265 | - specifies the physical device to use for tunnel endpoint communication. | |
266 | ||
267 | .sp | |
268 | .BI group " IPADDR" | |
269 | - specifies the multicast IP address to join. | |
7cfa3802 AW |
270 | This parameter cannot be specified with the |
271 | .B remote | |
272 | parameter. | |
273 | ||
274 | .sp | |
275 | .BI remote " IPADDR" | |
276 | - specifies the unicast destination IP address to use in outgoing packets | |
277 | when the destination link layer address is not known in the VXLAN device | |
278 | forwarding database. This parameter cannot be specified with the | |
279 | .B group | |
280 | parameter. | |
2816a568 TR |
281 | |
282 | .sp | |
283 | .BI local " IPADDR" | |
284 | - specifies the source IP address to use in outgoing packets. | |
285 | ||
286 | .sp | |
287 | .BI ttl " TTL" | |
288 | - specifies the TTL value to use in outgoing packets. | |
289 | ||
290 | .sp | |
291 | .BI tos " TOS" | |
292 | - specifies the TOS value to use in outgoing packets. | |
293 | ||
294 | .sp | |
295 | .BI port " MIN MAX" | |
296 | - specifies the range of port numbers to use as UDP | |
297 | source ports to communicate to the remote VXLAN tunnel endpoint. | |
298 | ||
299 | .sp | |
300 | .I [no]learning | |
301 | - specifies if unknown source link layer addresses and IP addresses | |
302 | are entered into the VXLAN device forwarding database. | |
303 | ||
304 | .sp | |
305 | .I [no]rsc | |
306 | - specifies if route short circuit is turned on. | |
307 | ||
308 | .sp | |
309 | .I [no]proxy | |
310 | - specifies ARP proxy is turned on. | |
311 | ||
312 | .sp | |
313 | .I [no]l2miss | |
314 | - specifies if netlink LLADDR miss notifications are generated. | |
315 | ||
316 | .sp | |
317 | .I [no]l3miss | |
318 | - specifies if netlink IP ADDR miss notifications are generated. | |
319 | ||
320 | .in -8 | |
321 | ||
9abde37c | 322 | .TP |
323 | IP6GRE/IP6GRETAP Type Support | |
324 | For a link of type | |
325 | .I IP6GRE/IP6GRETAP | |
326 | the following additional arguments are supported: | |
327 | ||
328 | .BI "ip link add " DEVICE | |
329 | .BI type " { ip6gre | ip6gretap } " remote " ADDR " local " ADDR | |
330 | .R " [ " | |
331 | .I "[i|o]seq]" | |
332 | .R " ] [ " | |
333 | .I "[i|o]key" KEY | |
334 | .R " ] [ " | |
335 | .I " [i|o]csum " | |
336 | .R " ] [ " | |
337 | .BI hoplimit " TTL " | |
338 | .R " ] [ " | |
339 | .BI encaplimit " ELIM " | |
340 | .R " ] [ " | |
341 | .BI tclass " TCLASS " | |
342 | .R " ] [ " | |
343 | .BI flowlabel " FLOWLABEL " | |
344 | .R " ] [ " | |
345 | .BI "dscp inherit" | |
346 | .R " ] [ " | |
347 | .BI dev " PHYS_DEV " | |
348 | .R " ]" | |
349 | ||
350 | .in +8 | |
351 | .sp | |
352 | .BI remote " ADDR " | |
353 | - specifies the remote IPv6 address of the tunnel. | |
354 | ||
355 | .sp | |
356 | .BI local " ADDR " | |
357 | - specifies the fixed local IPv6 address for tunneled packets. | |
358 | It must be and address on another interface on this host. | |
359 | ||
360 | .sp | |
361 | .BI [i|o]seq | |
362 | - serialize packets. | |
363 | The | |
364 | .B oseq | |
365 | flag enables sequencing of outgoing packets. | |
366 | The | |
367 | .B iseq | |
368 | flag requires that all input packets are serialized. | |
369 | ||
370 | .sp | |
371 | .BI [i|o]key " KEY" | |
372 | - use keyed GRE with key | |
373 | .IR KEY ". "KEY | |
374 | is either a number or an IPv4 address-like dotted quad. | |
375 | The | |
376 | .B key | |
377 | parameter specifies the same key to use in both directions. | |
378 | The | |
379 | .BR ikey " and " okey | |
380 | parameters specify different keys for input and output. | |
381 | ||
382 | .sp | |
383 | .BI [i|o]csum | |
384 | - generate/require checksums for tunneled packets. | |
385 | The | |
386 | .B ocsum | |
387 | flag calculates checksums for outgoing packets. | |
388 | The | |
389 | .B icsum | |
390 | flag requires that all input packets have the correct | |
391 | checksum. The | |
392 | .B csum | |
393 | flag is equivalent to the combination | |
394 | .BR "icsum ocsum" . | |
395 | ||
396 | .sp | |
397 | .BI hoplimit " TTL" | |
398 | - specifies Hop Limit value to use in outgoing packets. | |
399 | ||
400 | .sp | |
401 | .BI encaplimit " ELIM" | |
402 | - specifies a fixed encapsulation limit. Default is 4. | |
403 | ||
404 | .sp | |
405 | .BI flowlabel " FLOWLABEL" | |
406 | - specifies a fixed flowlabel. | |
407 | ||
408 | .sp | |
409 | .BI tclass " TCLASS" | |
410 | - specifies the traffic class field on | |
411 | tunneled packets, which can be specified as either a two-digit | |
412 | hex value (e.g. c0) or a predefined string (e.g. internet). | |
413 | The value | |
414 | .B inherit | |
415 | causes the field to be copied from the original IP header. The | |
416 | values | |
417 | .BI "inherit/" STRING | |
418 | or | |
419 | .BI "inherit/" 00 ".." ff | |
420 | will set the field to | |
421 | .I STRING | |
422 | or | |
423 | .IR 00 ".." ff | |
424 | when tunneling non-IP packets. The default value is 00. | |
425 | ||
426 | .in -8 | |
427 | ||
761a1e60 CT |
428 | .SS ip link delete - delete virtual link |
429 | .I DEVICE | |
430 | specifies the virtual device to act operate on. | |
431 | .I TYPE | |
432 | specifies the type of the device. | |
433 | ||
434 | ||
435 | .TP | |
436 | .BI dev " DEVICE " | |
437 | specifies the physical device to act operate on. | |
438 | ||
439 | .SS ip link set - change device attributes | |
440 | ||
441 | .TP | |
442 | .BI dev " DEVICE " | |
443 | .I DEVICE | |
6274b0b7 | 444 | specifies network device to operate on. When configuring SR-IOV Virtual Function |
761a1e60 CT |
445 | (VF) devices, this keyword should specify the associated Physical Function (PF) |
446 | device. | |
447 | ||
448 | .TP | |
449 | .BI group " GROUP " | |
450 | .I GROUP | |
451 | has a dual role: If both group and dev are present, then move the device to the | |
452 | specified group. If only a group is specified, then the command operates on | |
453 | all devices in that group. | |
454 | ||
455 | .TP | |
456 | .BR up " and " down | |
457 | change the state of the device to | |
458 | .B UP | |
459 | or | |
460 | .BR "DOWN" . | |
461 | ||
462 | .TP | |
463 | .BR "arp on " or " arp off" | |
464 | change the | |
465 | .B NOARP | |
466 | flag on the device. | |
467 | ||
468 | .TP | |
469 | .BR "multicast on " or " multicast off" | |
470 | change the | |
471 | .B MULTICAST | |
472 | flag on the device. | |
473 | ||
474 | .TP | |
475 | .BR "dynamic on " or " dynamic off" | |
476 | change the | |
477 | .B DYNAMIC | |
478 | flag on the device. | |
479 | ||
480 | .TP | |
481 | .BI name " NAME" | |
482 | change the name of the device. This operation is not | |
483 | recommended if the device is running or has some addresses | |
484 | already configured. | |
485 | ||
486 | .TP | |
487 | .BI txqueuelen " NUMBER" | |
488 | .TP | |
489 | .BI txqlen " NUMBER" | |
490 | change the transmit queue length of the device. | |
491 | ||
492 | .TP | |
493 | .BI mtu " NUMBER" | |
494 | change the | |
495 | .I MTU | |
496 | of the device. | |
497 | ||
498 | .TP | |
499 | .BI address " LLADDRESS" | |
500 | change the station address of the interface. | |
501 | ||
502 | .TP | |
503 | .BI broadcast " LLADDRESS" | |
504 | .TP | |
505 | .BI brd " LLADDRESS" | |
506 | .TP | |
507 | .BI peer " LLADDRESS" | |
508 | change the link layer broadcast address or the peer address when | |
509 | the interface is | |
510 | .IR "POINTOPOINT" . | |
511 | ||
512 | .TP | |
513 | .BI netns " PID" | |
514 | move the device to the network namespace associated with the process | |
515 | .IR "PID". | |
516 | ||
517 | .TP | |
518 | .BI netns " NETNSNAME" | |
519 | move the device to the network namespace associated with name | |
520 | .IR "NETNSNAME". | |
521 | ||
522 | .TP | |
523 | .BI alias " NAME" | |
524 | give the device a symbolic name for easy reference. | |
525 | ||
526 | .TP | |
527 | .BI group " GROUP" | |
528 | specify the group the device belongs to. | |
529 | The available groups are listed in file | |
530 | .BR "@SYSCONFDIR@/group" . | |
531 | ||
532 | .TP | |
533 | .BI vf " NUM" | |
534 | specify a Virtual Function device to be configured. The associated PF device | |
535 | must be specified using the | |
536 | .B dev | |
537 | parameter. | |
538 | ||
539 | .in +8 | |
540 | .BI mac " LLADDRESS" | |
541 | - change the station address for the specified VF. The | |
542 | .B vf | |
543 | parameter must be specified. | |
544 | ||
545 | .sp | |
546 | .BI vlan " VLANID" | |
547 | - change the assigned VLAN for the specified VF. When specified, all traffic | |
548 | sent from the VF will be tagged with the specified VLAN ID. Incoming traffic | |
549 | will be filtered for the specified VLAN ID, and will have all VLAN tags | |
550 | stripped before being passed to the VF. Setting this parameter to 0 disables | |
551 | VLAN tagging and filtering. The | |
552 | .B vf | |
553 | parameter must be specified. | |
554 | ||
555 | .sp | |
556 | .BI qos " VLAN-QOS" | |
557 | - assign VLAN QOS (priority) bits for the VLAN tag. When specified, all VLAN | |
558 | tags transmitted by the VF will include the specified priority bits in the | |
559 | VLAN tag. If not specified, the value is assumed to be 0. Both the | |
560 | .B vf | |
561 | and | |
562 | .B vlan | |
563 | parameters must be specified. Setting both | |
564 | .B vlan | |
565 | and | |
566 | .B qos | |
567 | as 0 disables VLAN tagging and filtering for the VF. | |
568 | ||
569 | .sp | |
570 | .BI rate " TXRATE" | |
571 | - change the allowed transmit bandwidth, in Mbps, for the specified VF. | |
572 | Setting this parameter to 0 disables rate limiting. The | |
573 | .B vf | |
574 | parameter must be specified. | |
575 | ||
576 | .sp | |
577 | .BI spoofchk " on|off" | |
578 | - turn packet spoof checking on or off for the specified VF. | |
579 | .in -8 | |
580 | ||
581 | .TP | |
582 | .BI master " DEVICE" | |
583 | set master device of the device (enslave device). | |
584 | ||
585 | .TP | |
586 | .BI nomaster | |
587 | unset master device of the device (release device). | |
588 | ||
589 | .PP | |
590 | .B Warning: | |
591 | If multiple parameter changes are requested, | |
592 | .B ip | |
593 | aborts immediately after any of the changes have failed. | |
594 | This is the only case when | |
595 | .B ip | |
596 | can move the system to an unpredictable state. The solution | |
597 | is to avoid changing several parameters with one | |
598 | .B ip link set | |
599 | call. | |
600 | ||
601 | .SS ip link show - display device attributes | |
602 | ||
603 | .TP | |
604 | .BI dev " NAME " (default) | |
605 | .I NAME | |
606 | specifies the network device to show. | |
607 | If this argument is omitted all devices in the default group are listed. | |
608 | ||
609 | .TP | |
610 | .BI group " GROUP " | |
611 | .I GROUP | |
612 | specifies what group of devices to show. | |
613 | ||
614 | .TP | |
615 | .B up | |
616 | only display running interfaces. | |
617 | ||
618 | .SH "EXAMPLES" | |
619 | .PP | |
620 | ip link show | |
621 | .RS 4 | |
622 | Shows the state of all network interfaces on the system. | |
623 | .RE | |
624 | .PP | |
625 | ip link set dev ppp0 mtu 1400 | |
626 | .RS 4 | |
627 | Change the MTU the ppp0 device. | |
628 | .RE | |
629 | .PP | |
630 | ip link add link eth0 name eth0.10 type vlan id 10 | |
631 | .RS 4 | |
632 | Creates a new vlan device eth0.10 on device eth0. | |
633 | .RE | |
634 | .PP | |
635 | ip link delete dev eth0.10 | |
636 | .RS 4 | |
637 | Removes vlan device. | |
638 | .RE | |
639 | ||
640 | .SH SEE ALSO | |
641 | .br | |
642 | .BR ip (8) | |
643 | ||
644 | .SH AUTHOR | |
645 | Original Manpage by Michail Litvak <mci@owl.openwall.com> |