]> git.proxmox.com Git - mirror_iproute2.git/blob - man/man8/ip-link.8.in
tc action policer: enable timestamp display
[mirror_iproute2.git] / man / man8 / ip-link.8.in
1 .TH IP\-LINK 8 "13 Dec 2012" "iproute2" "Linux"
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 link
10 .RI " { " COMMAND " | "
11 .BR help " }"
12 .sp
13
14 .ti -8
15 .BI "ip link add"
16 .RB "[ " link
17 .IR DEVICE " ]"
18 .RB "[ " name " ]"
19 .I NAME
20 .br
21 .RB "[ " txqueuelen
22 .IR PACKETS " ]"
23 .br
24 .RB "[ " address
25 .IR LLADDR " ]"
26 .RB "[ " broadcast
27 .IR LLADDR " ]"
28 .br
29 .RB "[ " mtu
30 .IR MTU " ]"
31 .RB "[ " index
32 .IR IDX " ]"
33 .br
34 .RB "[ " numtxqueues
35 .IR QUEUE_COUNT " ]"
36 .RB "[ " numrxqueues
37 .IR QUEUE_COUNT " ]"
38 .br
39 .BI type " TYPE"
40 .RI "[ " ARGS " ]"
41
42 .ti -8
43 .IR TYPE " := [ "
44 .BR bridge " | "
45 .BR bond " | "
46 .BR can " | "
47 .BR dummy " | "
48 .BR hsr " | "
49 .BR ifb " | "
50 .BR ipoib " |"
51 .BR macvlan " | "
52 .BR macvtap " | "
53 .BR vcan " | "
54 .BR veth " | "
55 .BR vlan " | "
56 .BR vxlan " |"
57 .BR ip6tnl " |"
58 .BR ipip " |"
59 .BR sit " |"
60 .BR gre " |"
61 .BR gretap " |"
62 .BR ip6gre " |"
63 .BR ip6gretap " |"
64 .BR vti " |"
65 .BR nlmon " |"
66 .BR ipvlan " |"
67 .BR lowpan " |"
68 .BR geneve " ]"
69
70 .ti -8
71 .BR "ip link delete " {
72 .IR DEVICE " | "
73 .BI "group " GROUP
74 }
75 .BI type " TYPE"
76 .RI "[ " ARGS " ]"
77
78 .ti -8
79 .BR "ip link set " {
80 .IR DEVICE " | "
81 .BI "group " GROUP
82 .RB "} [ { " up " | " down " } ]"
83 .br
84 .RB "[ " arp " { " on " | " off " } ]"
85 .br
86 .RB "[ " dynamic " { " on " | " off " } ]"
87 .br
88 .RB "[ " multicast " { " on " | " off " } ]"
89 .br
90 .RB "[ " allmulticast " { " on " | " off " } ]"
91 .br
92 .RB "[ " promisc " { " on " | " off " } ]"
93 .br
94 .RB "[ " protodown " { " on " | " off " } ]"
95 .br
96 .RB "[ " trailers " { " on " | " off " } ]"
97 .br
98 .RB "[ " txqueuelen
99 .IR PACKETS " ]"
100 .br
101 .RB "[ " name
102 .IR NEWNAME " ]"
103 .br
104 .RB "[ " address
105 .IR LLADDR " ]"
106 .br
107 .RB "[ " broadcast
108 .IR LLADDR " ]"
109 .br
110 .RB "[ " mtu
111 .IR MTU " ]"
112 .br
113 .RB "[ " netns " {"
114 .IR PID " | " NETNSNAME " } ]"
115 .br
116 .RB "[ " link-netnsid
117 .IR ID " ]"
118 .br
119 .RB "[ " alias
120 .IR NAME " ]"
121 .br
122 .RB "[ " vf
123 .IR NUM " ["
124 .B mac
125 .IR LLADDR " ]"
126 .br
127 .in +9
128 .RB "[ " vlan
129 .IR VLANID " [ "
130 .B qos
131 .IR VLAN-QOS " ] ]"
132 .br
133 .RB "[ " rate
134 .IR TXRATE " ]"
135 .br
136 .RB "[ " max_tx_rate
137 .IR TXRATE " ]"
138 .br
139 .RB "[ " min_tx_rate
140 .IR TXRATE " ]"
141 .br
142 .RB "[ " spoofchk " { " on " | " off " } ]"
143 .br
144 .RB "[ " state " { " auto " | " enable " | " disable " } ]"
145 .br
146 .RB "[ " trust " { " on " | " off " } ] ]"
147 .br
148 .in -9
149 .RB "[ " master
150 .IR DEVICE " ]"
151 .br
152 .RB "[ " nomaster " ]"
153 .br
154 .RB "[ " addrgenmode " { " eui64 " | " none " | " stable_secret " | " random " } ]"
155
156
157 .ti -8
158 .B ip link show
159 .RI "[ " DEVICE " | "
160 .B group
161 .IR GROUP " ] ["
162 .BR up " ] ["
163 .B master
164 .IR DEVICE " ] ["
165 .B type
166 .IR TYPE " ]"
167
168 .ti -8
169 .B ip link help
170 .RI "[ " TYPE " ]"
171
172 .SH "DESCRIPTION"
173 .SS ip link add - add virtual link
174
175 .TP
176 .BI link " DEVICE "
177 specifies the physical device to act operate on.
178
179 .I NAME
180 specifies the name of the new virtual device.
181
182 .I TYPE
183 specifies the type of the new device.
184 .sp
185 Link types:
186
187 .in +8
188 .B bridge
189 - Ethernet Bridge device
190 .sp
191 .B bond
192 - Bonding device
193 .B can
194 - Controller Area Network interface
195 .sp
196 .B dummy
197 - Dummy network interface
198 .sp
199 .B hsr
200 - High-availability Seamless Redundancy device
201 .sp
202 .B ifb
203 - Intermediate Functional Block device
204 .sp
205 .B ipoib
206 - IP over Infiniband device
207 .sp
208 .B macvlan
209 - Virtual interface base on link layer address (MAC)
210 .sp
211 .B macvtap
212 - Virtual interface based on link layer address (MAC) and TAP.
213 .sp
214 .B vcan
215 - Virtual Controller Area Network interface
216 .sp
217 .B veth
218 - Virtual ethernet interface
219 .sp
220 .BR vlan
221 - 802.1q tagged virtual LAN interface
222 .sp
223 .BR vxlan
224 - Virtual eXtended LAN
225 .sp
226 .BR ip6tnl
227 - Virtual tunnel interface IPv4|IPv6 over IPv6
228 .sp
229 .BR ipip
230 - Virtual tunnel interface IPv4 over IPv4
231 .sp
232 .BR sit
233 - Virtual tunnel interface IPv6 over IPv4
234 .sp
235 .BR gre
236 - Virtual tunnel interface GRE over IPv4
237 .sp
238 .BR gretap
239 - Virtual L2 tunnel interface GRE over IPv4
240 .sp
241 .BR ip6gre
242 - Virtual tunnel interface GRE over IPv6
243 .sp
244 .BR ip6gretap
245 - Virtual L2 tunnel interface GRE over IPv6
246 .sp
247 .BR vti
248 - Virtual tunnel interface
249 .sp
250 .BR nlmon
251 - Netlink monitoring device
252 .sp
253 .BR ipvlan
254 - Interface for L3 (IPv6/IPv4) based VLANs
255 .sp
256 .BR lowpan
257 - Interface for 6LoWPAN (IPv6) over IEEE 802.15.4 / Bluetooth
258 .sp
259 .BR geneve
260 - GEneric NEtwork Virtualization Encapsulation
261 .in -8
262
263 .TP
264 .BI numtxqueues " QUEUE_COUNT "
265 specifies the number of transmit queues for new device.
266
267 .TP
268 .BI numrxqueues " QUEUE_COUNT "
269 specifies the number of receive queues for new device.
270
271 .TP
272 .BI index " IDX "
273 specifies the desired index of the new virtual device. The link creation fails, if the index is busy.
274
275 .TP
276 VLAN Type Support
277 For a link of type
278 .I VLAN
279 the following additional arguments are supported:
280
281 .BI "ip link add
282 .BI link " DEVICE "
283 .BI name " NAME "
284 .BI type " vlan "
285 [
286 .BI protocol " VLAN_PROTO "
287 ]
288 .BI id " VLANID "
289 [
290 .BR reorder_hdr " { " on " | " off " } "
291 ]
292 [
293 .BR gvrp " { " on " | " off " } "
294 ]
295 [
296 .BR mvrp " { " on " | " off " } "
297 ]
298 [
299 .BR loose_binding " { " on " | " off " } "
300 ]
301 [
302 .BI ingress-qos-map " QOS-MAP "
303 ]
304 [
305 .BI egress-qos-map " QOS-MAP "
306 ]
307
308 .in +8
309 .sp
310 .BI protocol " VLAN_PROTO "
311 - either 802.1Q or 802.1ad.
312
313 .BI id " VLANID "
314 - specifies the VLAN Identifer to use. Note that numbers with a leading " 0 " or " 0x " are interpreted as octal or hexadeimal, respectively.
315
316 .BR reorder_hdr " { " on " | " off " } "
317 - specifies whether ethernet headers are reordered or not (default is
318 .BR on ")."
319
320 .in +4
321 If
322 .BR reorder_hdr " is " on
323 then VLAN header will be not inserted immediately but only before passing to the
324 physical device (if this device does not support VLAN offloading), the similar
325 on the RX direction - by default the packet will be untagged before being
326 received by VLAN device. Reordering allows to accelerate tagging on egress and
327 to hide VLAN header on ingress so the packet looks like regular Ethernet packet,
328 at the same time it might be confusing for packet capture as the VLAN header
329 does not exist within the packet.
330
331 VLAN offloading can be checked by
332 .BR ethtool "(8):"
333 .in +4
334 .sp
335 .B ethtool -k
336 <phy_dev> |
337 .RB grep " tx-vlan-offload"
338 .sp
339 .in -4
340 where <phy_dev> is the physical device to which VLAN device is bound.
341 .in -4
342
343 .BR gvrp " { " on " | " off " } "
344 - specifies whether this VLAN should be registered using GARP VLAN Registration Protocol.
345
346 .BR mvrp " { " on " | " off " } "
347 - specifies whether this VLAN should be registered using Multiple VLAN Registration Protocol.
348
349 .BR loose_binding " { " on " | " off " } "
350 - specifies whether the VLAN device state is bound to the physical device state.
351
352 .BI ingress-qos-map " QOS-MAP "
353 - defines a mapping of VLAN header prio field to the Linux internal packet
354 priority on incoming frames. The format is FROM:TO with multiple mappings
355 separated by spaces.
356
357 .BI egress-qos-map " QOS-MAP "
358 - defines a mapping of Linux internal packet priority to VLAN header prio field
359 but for outgoing frames. The format is the same as for ingress-qos-map.
360 .in +4
361
362 Linux packet priority can be set by
363 .BR iptables "(8)":
364 .in +4
365 .sp
366 .B iptables
367 -t mangle -A POSTROUTING [...] -j CLASSIFY --set-class 0:4
368 .sp
369 .in -4
370 and this "4" priority can be used in the egress qos mapping to set VLAN prio "5":
371 .sp
372 .in +4
373 .B ip
374 link set veth0.10 type vlan egress 4:5
375 .in -4
376 .in -4
377 .in -8
378
379 .TP
380 VXLAN Type Support
381 For a link of type
382 .I VXLAN
383 the following additional arguments are supported:
384
385 .BI "ip link add " DEVICE
386 .BI type " vxlan " id " ID"
387 [
388 .BI dev " PHYS_DEV "
389 .RB " ] [ { " group " | " remote " } "
390 .I IPADDR
391 ] [
392 .B local
393 .RI "{ "IPADDR " | "any " } "
394 ] [
395 .BI ttl " TTL "
396 ] [
397 .BI tos " TOS "
398 ] [
399 .BI flowlabel " FLOWLABEL "
400 ] [
401 .BI dstport " PORT "
402 ] [
403 .BI srcport " MIN MAX "
404 ] [
405 .I "[no]learning "
406 ] [
407 .I "[no]proxy "
408 ] [
409 .I "[no]rsc "
410 ] [
411 .I "[no]l2miss "
412 ] [
413 .I "[no]l3miss "
414 ] [
415 .I "[no]udpcsum "
416 ] [
417 .I "[no]udp6zerocsumtx "
418 ] [
419 .I "[no]udp6zerocsumrx "
420 ] [
421 .BI ageing " SECONDS "
422 ] [
423 .BI maxaddress " NUMBER "
424 ] [
425 .RI "[no]external "
426 ] [
427 .B gbp
428 ] [
429 .B gpe
430 ]
431
432 .in +8
433 .sp
434 .BI id " VNI "
435 - specifies the VXLAN Network Identifer (or VXLAN Segment
436 Identifier) to use.
437
438 .BI dev " PHYS_DEV"
439 - specifies the physical device to use for tunnel endpoint communication.
440
441 .sp
442 .BI group " IPADDR"
443 - specifies the multicast IP address to join.
444 This parameter cannot be specified with the
445 .B remote
446 parameter.
447
448 .sp
449 .BI remote " IPADDR"
450 - specifies the unicast destination IP address to use in outgoing packets
451 when the destination link layer address is not known in the VXLAN device
452 forwarding database. This parameter cannot be specified with the
453 .B group
454 parameter.
455
456 .sp
457 .BI local " IPADDR"
458 - specifies the source IP address to use in outgoing packets.
459
460 .sp
461 .BI ttl " TTL"
462 - specifies the TTL value to use in outgoing packets.
463
464 .sp
465 .BI tos " TOS"
466 - specifies the TOS value to use in outgoing packets.
467
468 .sp
469 .BI flowlabel " FLOWLABEL"
470 - specifies the flow label to use in outgoing packets.
471
472 .sp
473 .BI dstport " PORT"
474 - specifies the UDP destination port to communicate to the remote VXLAN tunnel endpoint.
475
476 .sp
477 .BI srcport " MIN MAX"
478 - specifies the range of port numbers to use as UDP
479 source ports to communicate to the remote VXLAN tunnel endpoint.
480
481 .sp
482 .I [no]learning
483 - specifies if unknown source link layer addresses and IP addresses
484 are entered into the VXLAN device forwarding database.
485
486 .sp
487 .I [no]rsc
488 - specifies if route short circuit is turned on.
489
490 .sp
491 .I [no]proxy
492 - specifies ARP proxy is turned on.
493
494 .sp
495 .I [no]l2miss
496 - specifies if netlink LLADDR miss notifications are generated.
497
498 .sp
499 .I [no]l3miss
500 - specifies if netlink IP ADDR miss notifications are generated.
501
502 .sp
503 .I [no]udpcsum
504 - specifies if UDP checksum is calculated for transmitted packets over IPv4.
505
506 .sp
507 .I [no]udp6zerocsumtx
508 - skip UDP checksum calculation for transmitted packets over IPv6.
509
510 .sp
511 .I [no]udp6zerocsumrx
512 - allow incoming UDP packets over IPv6 with zero checksum field.
513
514 .sp
515 .BI ageing " SECONDS"
516 - specifies the lifetime in seconds of FDB entries learnt by the kernel.
517
518 .sp
519 .BI maxaddress " NUMBER"
520 - specifies the maximum number of FDB entries.
521
522 .sp
523 .I [no]external
524 - specifies whether an external control plane
525 .RB "(e.g. " "ip route encap" )
526 or the internal FDB should be used.
527
528 .sp
529 .B gbp
530 - enables the Group Policy extension (VXLAN-GBP).
531
532 .in +4
533 Allows to transport group policy context across VXLAN network peers.
534 If enabled, includes the mark of a packet in the VXLAN header for outgoing
535 packets and fills the packet mark based on the information found in the
536 VXLAN header for incomming packets.
537
538 Format of upper 16 bits of packet mark (flags);
539
540 .in +2
541 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
542 .br
543 |-|-|-|-|-|-|-|-|-|D|-|-|A|-|-|-|
544 .br
545 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
546
547 .B D :=
548 Don't Learn bit. When set, this bit indicates that the egress
549 VTEP MUST NOT learn the source address of the encapsulated frame.
550
551 .B A :=
552 Indicates that the group policy has already been applied to
553 this packet. Policies MUST NOT be applied by devices when the A bit is set.
554 .in -2
555
556 Format of lower 16 bits of packet mark (policy ID):
557
558 .in +2
559 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
560 .br
561 | Group Policy ID |
562 .br
563 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
564 .in -2
565
566 Example:
567 iptables -A OUTPUT [...] -j MARK --set-mark 0x800FF
568
569 .in -4
570
571 .sp
572 .B gpe
573 - enables the Generic Protocol extension (VXLAN-GPE). Currently, this is
574 only supported together with the
575 .B external
576 keyword.
577
578 .in -8
579
580 .TP
581 GRE, IPIP, SIT Type Support
582 For a link of types
583 .I GRE/IPIP/SIT
584 the following additional arguments are supported:
585
586 .BI "ip link add " DEVICE
587 .BR type " { gre | ipip | sit } "
588 .BI " remote " ADDR " local " ADDR
589 [
590 .BR encap " { fou | gue | none } "
591 ] [
592 .BI "encap-sport { " PORT " | auto } "
593 ] [
594 .BI "encap-dport " PORT
595 ] [
596 .I " [no]encap-csum "
597 ] [
598 .I " [no]encap-remcsum "
599 ]
600
601 .in +8
602 .sp
603 .BI remote " ADDR "
604 - specifies the remote address of the tunnel.
605
606 .sp
607 .BI local " ADDR "
608 - specifies the fixed local address for tunneled packets.
609 It must be an address on another interface on this host.
610
611 .sp
612 .BR encap " { fou | gue | none } "
613 - specifies type of secondary UDP encapsulation. "fou" indicates
614 Foo-Over-UDP, "gue" indicates Generic UDP Encapsulation.
615
616 .sp
617 .BI "encap-sport { " PORT " | auto } "
618 - specifies the source port in UDP encapsulation.
619 .IR PORT
620 indicates the port by number, "auto"
621 indicates that the port number should be chosen automatically
622 (the kernel picks a flow based on the flow hash of the
623 encapsulated packet).
624
625 .sp
626 .I [no]encap-csum
627 - specifies if UDP checksums are enabled in the secondary
628 encapsulation.
629
630 .sp
631 .I [no]encap-remcsum
632 - specifies if Remote Checksum Offload is enabled. This is only
633 applicable for Generic UDP Encapsulation.
634
635 .in -8
636
637 .TP
638 IP6GRE/IP6GRETAP Type Support
639 For a link of type
640 .I IP6GRE/IP6GRETAP
641 the following additional arguments are supported:
642
643 .BI "ip link add " DEVICE
644 .BI type " { ip6gre | ip6gretap } " remote " ADDR " local " ADDR
645 [
646 .I "[i|o]seq]"
647 ] [
648 .I "[i|o]key" KEY
649 ] [
650 .I " [i|o]csum "
651 ] [
652 .BI hoplimit " TTL "
653 ] [
654 .BI encaplimit " ELIM "
655 ] [
656 .BI tclass " TCLASS "
657 ] [
658 .BI flowlabel " FLOWLABEL "
659 ] [
660 .BI "dscp inherit"
661 ] [
662 .BI dev " PHYS_DEV "
663 ]
664
665 .in +8
666 .sp
667 .BI remote " ADDR "
668 - specifies the remote IPv6 address of the tunnel.
669
670 .sp
671 .BI local " ADDR "
672 - specifies the fixed local IPv6 address for tunneled packets.
673 It must be an address on another interface on this host.
674
675 .sp
676 .BI [i|o]seq
677 - serialize packets.
678 The
679 .B oseq
680 flag enables sequencing of outgoing packets.
681 The
682 .B iseq
683 flag requires that all input packets are serialized.
684
685 .sp
686 .BI [i|o]key " KEY"
687 - use keyed GRE with key
688 .IR KEY ". "KEY
689 is either a number or an IPv4 address-like dotted quad.
690 The
691 .B key
692 parameter specifies the same key to use in both directions.
693 The
694 .BR ikey " and " okey
695 parameters specify different keys for input and output.
696
697 .sp
698 .BI [i|o]csum
699 - generate/require checksums for tunneled packets.
700 The
701 .B ocsum
702 flag calculates checksums for outgoing packets.
703 The
704 .B icsum
705 flag requires that all input packets have the correct
706 checksum. The
707 .B csum
708 flag is equivalent to the combination
709 .BR "icsum ocsum" .
710
711 .sp
712 .BI hoplimit " TTL"
713 - specifies Hop Limit value to use in outgoing packets.
714
715 .sp
716 .BI encaplimit " ELIM"
717 - specifies a fixed encapsulation limit. Default is 4.
718
719 .sp
720 .BI flowlabel " FLOWLABEL"
721 - specifies a fixed flowlabel.
722
723 .sp
724 .BI tclass " TCLASS"
725 - specifies the traffic class field on
726 tunneled packets, which can be specified as either a two-digit
727 hex value (e.g. c0) or a predefined string (e.g. internet).
728 The value
729 .B inherit
730 causes the field to be copied from the original IP header. The
731 values
732 .BI "inherit/" STRING
733 or
734 .BI "inherit/" 00 ".." ff
735 will set the field to
736 .I STRING
737 or
738 .IR 00 ".." ff
739 when tunneling non-IP packets. The default value is 00.
740
741 .in -8
742
743 .TP
744 IPoIB Type Support
745 For a link of type
746 .I IPoIB
747 the following additional arguments are supported:
748
749 .BI "ip link add " DEVICE " name " NAME
750 .BI type " ipoib [ " pkey " PKEY ] [" mode " MODE " ]
751
752 .in +8
753 .sp
754 .BI pkey " PKEY "
755 - specifies the IB P-Key to use.
756
757 .BI mode " MODE "
758 - specifies the mode (datagram or connected) to use.
759
760 .TP
761 GENEVE Type Support
762 For a link of type
763 .I GENEVE
764 the following additional arguments are supported:
765
766 .BI "ip link add " DEVICE
767 .BI type " geneve " id " ID " remote " IPADDR"
768 [
769 .BI ttl " TTL "
770 ] [
771 .BI tos " TOS "
772 ] [
773 .BI flowlabel " FLOWLABEL "
774 ]
775
776 .in +8
777 .sp
778 .BI id " VNI "
779 - specifies the Virtual Network Identifer to use.
780
781 .sp
782 .BI remote " IPADDR"
783 - specifies the unicast destination IP address to use in outgoing packets.
784
785 .sp
786 .BI ttl " TTL"
787 - specifies the TTL value to use in outgoing packets.
788
789 .sp
790 .BI tos " TOS"
791 - specifies the TOS value to use in outgoing packets.
792
793 .sp
794 .BI flowlabel " FLOWLABEL"
795 - specifies the flow label to use in outgoing packets.
796
797 .in -8
798
799 .TP
800 MACVLAN and MACVTAP Type Support
801 For a link of type
802 .I MACVLAN
803 or
804 .I MACVTAP
805 the following additional arguments are supported:
806
807 .BI "ip link add link " DEVICE " name " NAME
808 .BR type " { " macvlan " | " macvtap " } "
809 .BR mode " { " private " | " vepa " | " bridge " | " passthru
810 .BR " [ " nopromisc " ] } "
811
812 .in +8
813 .sp
814 .BR type " { " macvlan " | " macvtap " } "
815 - specifies the link type to use.
816 .BR macvlan " creates just a virtual interface, while "
817 .BR macvtap " in addition creates a character device "
818 .BR /dev/tapX " to be used just like a " tuntap " device."
819
820 .B mode private
821 - Do not allow communication between
822 .B macvlan
823 instances on the same physical interface, even if the external switch supports
824 hairpin mode.
825
826 .B mode vepa
827 - Virtual Ethernet Port Aggregator mode. Data from one
828 .B macvlan
829 instance to the other on the same physical interface is transmitted over the
830 physical interface. Either the attached switch needs to support hairpin mode,
831 or there must be a TCP/IP router forwarding the packets in order to allow
832 communication. This is the default mode.
833
834 .B mode bridge
835 - In bridge mode, all endpoints are directly connected to each other,
836 communication is not redirected through the physical interface's peer.
837
838 .BR mode " " passthru " [ " nopromisc " ] "
839 - This mode gives more power to a single endpoint, usually in
840 .BR macvtap " mode. It is not allowed for more than one endpoint on the same "
841 physical interface. All traffic will be forwarded to this endpoint, allowing
842 virtio guests to change MAC address or set promiscuous mode in order to bridge
843 the interface or create vlan interfaces on top of it. By default, this mode
844 forces the underlying interface into promiscuous mode. Passing the
845 .BR nopromisc " flag prevents this, so the promisc flag may be controlled "
846 using standard tools.
847 .in -8
848
849 .SS ip link delete - delete virtual link
850
851 .TP
852 .BI dev " DEVICE "
853 specifies the virtual device to act operate on.
854
855 .TP
856 .BI group " GROUP "
857 specifies the group of virtual links to delete. Group 0 is not allowed to be
858 deleted since it is the default group.
859
860 .TP
861 .BI type " TYPE "
862 specifies the type of the device.
863
864 .SS ip link set - change device attributes
865
866 .TP
867 .BI dev " DEVICE "
868 .I DEVICE
869 specifies network device to operate on. When configuring SR-IOV Virtual Function
870 (VF) devices, this keyword should specify the associated Physical Function (PF)
871 device.
872
873 .TP
874 .BI group " GROUP "
875 .I GROUP
876 has a dual role: If both group and dev are present, then move the device to the
877 specified group. If only a group is specified, then the command operates on
878 all devices in that group.
879
880 .TP
881 .BR up " and " down
882 change the state of the device to
883 .B UP
884 or
885 .BR "DOWN" .
886
887 .TP
888 .BR "arp on " or " arp off"
889 change the
890 .B NOARP
891 flag on the device.
892
893 .TP
894 .BR "multicast on " or " multicast off"
895 change the
896 .B MULTICAST
897 flag on the device.
898
899 .TP
900 .BR "protodown on " or " protodown off"
901 change the
902 .B PROTODOWN
903 state on the device. Indicates that a protocol error has been detected on the port. Switch drivers can react to this error by doing a phys down on the switch port.
904
905 .TP
906 .BR "dynamic on " or " dynamic off"
907 change the
908 .B DYNAMIC
909 flag on the device. Indicates that address can change when interface goes down (currently
910 .B NOT
911 used by the Linux).
912
913 .TP
914 .BI name " NAME"
915 change the name of the device. This operation is not
916 recommended if the device is running or has some addresses
917 already configured.
918
919 .TP
920 .BI txqueuelen " NUMBER"
921 .TP
922 .BI txqlen " NUMBER"
923 change the transmit queue length of the device.
924
925 .TP
926 .BI mtu " NUMBER"
927 change the
928 .I MTU
929 of the device.
930
931 .TP
932 .BI address " LLADDRESS"
933 change the station address of the interface.
934
935 .TP
936 .BI broadcast " LLADDRESS"
937 .TP
938 .BI brd " LLADDRESS"
939 .TP
940 .BI peer " LLADDRESS"
941 change the link layer broadcast address or the peer address when
942 the interface is
943 .IR "POINTOPOINT" .
944
945 .TP
946 .BI netns " NETNSNAME " \fR| " PID"
947 move the device to the network namespace associated with name
948 .IR "NETNSNAME " or
949 .RI process " PID".
950
951 Some devices are not allowed to change network namespace: loopback, bridge,
952 ppp, wireless. These are network namespace local devices. In such case
953 .B ip
954 tool will return "Invalid argument" error. It is possible to find out if device is local
955 to a single network namespace by checking
956 .B netns-local
957 flag in the output of the
958 .BR ethtool ":"
959
960 .in +8
961 .B ethtool -k
962 .I DEVICE
963 .in -8
964
965 To change network namespace for wireless devices the
966 .B iw
967 tool can be used. But it allows to change network namespace only for physical devices and by process
968 .IR PID .
969
970 .TP
971 .BI alias " NAME"
972 give the device a symbolic name for easy reference.
973
974 .TP
975 .BI group " GROUP"
976 specify the group the device belongs to.
977 The available groups are listed in file
978 .BR "@SYSCONFDIR@/group" .
979
980 .TP
981 .BI vf " NUM"
982 specify a Virtual Function device to be configured. The associated PF device
983 must be specified using the
984 .B dev
985 parameter.
986
987 .in +8
988 .BI mac " LLADDRESS"
989 - change the station address for the specified VF. The
990 .B vf
991 parameter must be specified.
992
993 .sp
994 .BI vlan " VLANID"
995 - change the assigned VLAN for the specified VF. When specified, all traffic
996 sent from the VF will be tagged with the specified VLAN ID. Incoming traffic
997 will be filtered for the specified VLAN ID, and will have all VLAN tags
998 stripped before being passed to the VF. Setting this parameter to 0 disables
999 VLAN tagging and filtering. The
1000 .B vf
1001 parameter must be specified.
1002
1003 .sp
1004 .BI qos " VLAN-QOS"
1005 - assign VLAN QOS (priority) bits for the VLAN tag. When specified, all VLAN
1006 tags transmitted by the VF will include the specified priority bits in the
1007 VLAN tag. If not specified, the value is assumed to be 0. Both the
1008 .B vf
1009 and
1010 .B vlan
1011 parameters must be specified. Setting both
1012 .B vlan
1013 and
1014 .B qos
1015 as 0 disables VLAN tagging and filtering for the VF.
1016
1017 .sp
1018 .BI rate " TXRATE"
1019 -- change the allowed transmit bandwidth, in Mbps, for the specified VF.
1020 Setting this parameter to 0 disables rate limiting.
1021 .B vf
1022 parameter must be specified.
1023 Please use new API
1024 .B "max_tx_rate"
1025 option instead.
1026
1027 .sp
1028 .BI max_tx_rate " TXRATE"
1029 - change the allowed maximum transmit bandwidth, in Mbps, for the specified VF.
1030 .B vf
1031 parameter must be specified.
1032
1033 .sp
1034 .BI min_tx_rate " TXRATE"
1035 - change the allowed minimum transmit bandwidth, in Mbps, for the specified VF.
1036 Minimum TXRATE should be always <= Maximum TXRATE.
1037 .B vf
1038 parameter must be specified.
1039
1040 .sp
1041 .BI spoofchk " on|off"
1042 - turn packet spoof checking on or off for the specified VF.
1043 .sp
1044 .BI state " auto|enable|disable"
1045 - set the virtual link state as seen by the specified VF. Setting to auto means a
1046 reflection of the PF link state, enable lets the VF to communicate with other VFs on
1047 this host even if the PF link state is down, disable causes the HW to drop any packets
1048 sent by the VF.
1049 .sp
1050 .BI trust " on|off"
1051 - trust the specified VF user. This enables that VF user can set a specific feature
1052 which may impact security and/or performance. (e.g. VF multicast promiscuous mode)
1053 .in -8
1054
1055 .TP
1056 .BI master " DEVICE"
1057 set master device of the device (enslave device).
1058
1059 .TP
1060 .BI nomaster
1061 unset master device of the device (release device).
1062
1063 .TP
1064 .BI addrgenmode " eui64|none|stable_secret|random"
1065 set the IPv6 address generation mode
1066
1067 .I eui64
1068 - use a Modified EUI-64 format interface identifier
1069
1070 .I none
1071 - disable automatic address generation
1072
1073 .I stable_secret
1074 - generate the interface identifier based on a preset /proc/sys/net/ipv6/conf/{default,DEVICE}/stable_secret
1075
1076 .I random
1077 - like stable_secret, but auto-generate a new random secret if none is set
1078
1079 .TP
1080 .BR "link-netnsid "
1081 set peer netnsid for a cross-netns interface
1082
1083 .PP
1084 .B Warning:
1085 If multiple parameter changes are requested,
1086 .B ip
1087 aborts immediately after any of the changes have failed.
1088 This is the only case when
1089 .B ip
1090 can move the system to an unpredictable state. The solution
1091 is to avoid changing several parameters with one
1092 .B ip link set
1093 call.
1094
1095 .SS ip link show - display device attributes
1096
1097 .TP
1098 .BI dev " NAME " (default)
1099 .I NAME
1100 specifies the network device to show.
1101 If this argument is omitted all devices in the default group are listed.
1102
1103 .TP
1104 .BI group " GROUP "
1105 .I GROUP
1106 specifies what group of devices to show.
1107
1108 .TP
1109 .B up
1110 only display running interfaces.
1111
1112 .TP
1113 .BI master " DEVICE "
1114 .I DEVICE
1115 specifies the master device which enslaves devices to show.
1116
1117 .TP
1118 .BI type " TYPE "
1119 .I TYPE
1120 specifies the type of devices to show.
1121
1122 .SS ip link help - display help
1123
1124 .PP
1125 .I "TYPE"
1126 specifies which help of link type to dislpay.
1127
1128 .SS
1129 .I GROUP
1130 may be a number or a string from the file
1131 .B @SYSCONFDIR@/group
1132 which can be manually filled.
1133
1134 .SH "EXAMPLES"
1135 .PP
1136 ip link show
1137 .RS 4
1138 Shows the state of all network interfaces on the system.
1139 .RE
1140 .PP
1141 ip link show type bridge
1142 .RS 4
1143 Shows the bridge devices.
1144 .RE
1145 .PP
1146 ip link show type vlan
1147 .RS 4
1148 Shows the vlan devices.
1149 .RE
1150 .PP
1151 ip link show master br0
1152 .RS 4
1153 Shows devices enslaved by br0
1154 .RE
1155 .PP
1156 ip link set dev ppp0 mtu 1400
1157 .RS 4
1158 Change the MTU the ppp0 device.
1159 .RE
1160 .PP
1161 ip link add link eth0 name eth0.10 type vlan id 10
1162 .RS 4
1163 Creates a new vlan device eth0.10 on device eth0.
1164 .RE
1165 .PP
1166 ip link delete dev eth0.10
1167 .RS 4
1168 Removes vlan device.
1169 .RE
1170
1171 ip link help gre
1172 .RS 4
1173 Display help for the gre link type.
1174 .RE
1175 .PP
1176 ip link add name tun1 type ipip remote 192.168.1.1
1177 local 192.168.1.2 ttl 225 encap gue encap-sport auto
1178 encap-dport 5555 encap-csum encap-remcsum
1179 .RS 4
1180 Creates an IPIP that is encapsulated with Generic UDP Encapsulation,
1181 and the outer UDP checksum and remote checksum offload are enabled.
1182
1183 .RE
1184 .PP
1185 ip link add link wpan0 lowpan0 type lowpan
1186 .RS 4
1187 Creates a 6LoWPAN interface named lowpan0 on the underlying
1188 IEEE 802.15.4 device wpan0.
1189 .RE
1190
1191 .SH SEE ALSO
1192 .br
1193 .BR ip (8),
1194 .BR ip-netns (8),
1195 .BR ethtool (8),
1196 .BR iptables (8)
1197
1198 .SH AUTHOR
1199 Original Manpage by Michail Litvak <mci@owl.openwall.com>