]> git.proxmox.com Git - mirror_iproute2.git/blob - man/man8/ip-link.8.in
d035a5c92ed5594f4d030d10f2a853d8ca47958b
[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 .BR "[ " gso_max_size
40 .IR BYTES " ]"
41 .RB "[ " gso_max_segs
42 .IR SEGMENTS " ]"
43 .br
44 .BI type " TYPE"
45 .RI "[ " ARGS " ]"
46
47 .ti -8
48 .BR "ip link delete " {
49 .IR DEVICE " | "
50 .BI "group " GROUP
51 }
52 .BI type " TYPE"
53 .RI "[ " ARGS " ]"
54
55 .ti -8
56 .BR "ip link set " {
57 .IR DEVICE " | "
58 .BI "group " GROUP
59 }
60 .br
61 .RB "[ { " up " | " down " } ]"
62 .br
63 .RB "[ " type
64 .IR "ETYPE TYPE_ARGS" " ]"
65 .br
66 .RB "[ " arp " { " on " | " off " } ]"
67 .br
68 .RB "[ " dynamic " { " on " | " off " } ]"
69 .br
70 .RB "[ " multicast " { " on " | " off " } ]"
71 .br
72 .RB "[ " allmulticast " { " on " | " off " } ]"
73 .br
74 .RB "[ " promisc " { " on " | " off " } ]"
75 .br
76 .RB "[ " protodown " { " on " | " off " } ]"
77 .br
78 .RB "[ " trailers " { " on " | " off " } ]"
79 .br
80 .RB "[ " txqueuelen
81 .IR PACKETS " ]"
82 .br
83 .RB "[ " name
84 .IR NEWNAME " ]"
85 .br
86 .RB "[ " address
87 .IR LLADDR " ]"
88 .br
89 .RB "[ " broadcast
90 .IR LLADDR " ]"
91 .br
92 .RB "[ " mtu
93 .IR MTU " ]"
94 .br
95 .RB "[ " netns " {"
96 .IR PID " | " NETNSNAME " } ]"
97 .br
98 .RB "[ " link-netnsid
99 .IR ID " ]"
100 .br
101 .RB "[ " alias
102 .IR NAME " ]"
103 .br
104 .RB "[ " vf
105 .IR NUM " ["
106 .B mac
107 .IR LLADDR " ]"
108 .br
109 .in +9
110 .RI "[ " VFVLAN-LIST " ]"
111 .br
112 .RB "[ " rate
113 .IR TXRATE " ]"
114 .br
115 .RB "[ " max_tx_rate
116 .IR TXRATE " ]"
117 .br
118 .RB "[ " min_tx_rate
119 .IR TXRATE " ]"
120 .br
121 .RB "[ " spoofchk " { " on " | " off " } ]"
122 .br
123 .RB "[ " query_rss " { " on " | " off " } ]"
124 .br
125 .RB "[ " state " { " auto " | " enable " | " disable " } ]"
126 .br
127 .RB "[ " trust " { " on " | " off " } ]"
128 .br
129 .RB "[ " node_guid " eui64 ]"
130 .br
131 .RB "[ " port_guid " eui64 ] ]"
132 .br
133 .in -9
134 .RB "[ { " xdp " | " xdpgeneric " | " xdpdrv " | " xdpoffload " } { " off " | "
135 .br
136 .in +8
137 .BR object
138 .IR FILE
139 .RB "[ " section
140 .IR NAME " ]"
141 .RB "[ " verbose " ] |"
142 .br
143 .BR pinned
144 .IR FILE " } ]"
145 .br
146 .in -8
147 .RB "[ " master
148 .IR DEVICE " ]"
149 .br
150 .RB "[ " nomaster " ]"
151 .br
152 .RB "[ " vrf
153 .IR NAME " ]"
154 .br
155 .RB "[ " addrgenmode " { " eui64 " | " none " | " stable_secret " | " random " } ]"
156 .br
157 .RB "[ " macaddr " { " flush " | { " add " | " del " } "
158 .IR MACADDR " | set [ "
159 .IR MACADDR " [ "
160 .IR MACADDR " [ ... ] ] ] } ]"
161 .br
162
163 .ti -8
164 .B ip link show
165 .RI "[ " DEVICE " | "
166 .B group
167 .IR GROUP " ] ["
168 .BR up " ] ["
169 .B master
170 .IR DEVICE " ] ["
171 .B type
172 .IR ETYPE " ] ["
173 .B vrf
174 .IR NAME " ]"
175
176 .ti -8
177 .B ip link xstats
178 .BI type " TYPE"
179 .RI "[ " ARGS " ]"
180
181 .ti -8
182 .B ip link afstats
183 .RB "[ " dev
184 .IR DEVICE " ]"
185
186 .ti -8
187 .B ip link help
188 .RI "[ " TYPE " ]"
189
190 .ti -8
191 .IR TYPE " := [ "
192 .BR bridge " | "
193 .BR bond " | "
194 .BR can " | "
195 .BR dummy " | "
196 .BR hsr " | "
197 .BR ifb " | "
198 .BR ipoib " |"
199 .BR macvlan " | "
200 .BR macvtap " | "
201 .BR vcan " | "
202 .BR vxcan " | "
203 .BR veth " | "
204 .BR vlan " | "
205 .BR vxlan " |"
206 .BR ip6tnl " |"
207 .BR ipip " |"
208 .BR sit " |"
209 .BR gre " |"
210 .BR gretap " |"
211 .BR erspan " |"
212 .BR ip6gre " |"
213 .BR ip6gretap " |"
214 .BR ip6erspan " |"
215 .BR vti " |"
216 .BR nlmon " |"
217 .BR ipvlan " |"
218 .BR ipvtap " |"
219 .BR lowpan " |"
220 .BR geneve " |"
221 .BR vrf " |"
222 .BR macsec " |"
223 .BR netdevsim " |"
224 .BR rmnet " |"
225 .BR xfrm " ]"
226
227 .ti -8
228 .IR ETYPE " := [ " TYPE " |"
229 .BR bridge_slave " | " bond_slave " ]"
230
231 .ti -8
232 .IR VFVLAN-LIST " := [ " VFVLAN-LIST " ] " VFVLAN
233
234 .ti -8
235 .IR VFVLAN " := "
236 .RB "[ " vlan
237 .IR VLANID " [ "
238 .B qos
239 .IR VLAN-QOS " ] ["
240 .B proto
241 .IR VLAN-PROTO " ] ]"
242
243 .SH "DESCRIPTION"
244 .SS ip link add - add virtual link
245
246 .TP
247 .BI link " DEVICE "
248 specifies the physical device to act operate on.
249
250 .I NAME
251 specifies the name of the new virtual device.
252
253 .I TYPE
254 specifies the type of the new device.
255 .sp
256 Link types:
257
258 .in +8
259 .B bridge
260 - Ethernet Bridge device
261 .sp
262 .B bond
263 - Bonding device
264 .sp
265 .B dummy
266 - Dummy network interface
267 .sp
268 .B hsr
269 - High-availability Seamless Redundancy device
270 .sp
271 .B ifb
272 - Intermediate Functional Block device
273 .sp
274 .B ipoib
275 - IP over Infiniband device
276 .sp
277 .B macvlan
278 - Virtual interface base on link layer address (MAC)
279 .sp
280 .B macvtap
281 - Virtual interface based on link layer address (MAC) and TAP.
282 .sp
283 .B vcan
284 - Virtual Controller Area Network interface
285 .sp
286 .B vxcan
287 - Virtual Controller Area Network tunnel interface
288 .sp
289 .B veth
290 - Virtual ethernet interface
291 .sp
292 .BR vlan
293 - 802.1q tagged virtual LAN interface
294 .sp
295 .BR vxlan
296 - Virtual eXtended LAN
297 .sp
298 .BR ip6tnl
299 - Virtual tunnel interface IPv4|IPv6 over IPv6
300 .sp
301 .BR ipip
302 - Virtual tunnel interface IPv4 over IPv4
303 .sp
304 .BR sit
305 - Virtual tunnel interface IPv6 over IPv4
306 .sp
307 .BR gre
308 - Virtual tunnel interface GRE over IPv4
309 .sp
310 .BR gretap
311 - Virtual L2 tunnel interface GRE over IPv4
312 .sp
313 .BR erspan
314 - Encapsulated Remote SPAN over GRE and IPv4
315 .sp
316 .BR ip6gre
317 - Virtual tunnel interface GRE over IPv6
318 .sp
319 .BR ip6gretap
320 - Virtual L2 tunnel interface GRE over IPv6
321 .sp
322 .BR ip6erspan
323 - Encapsulated Remote SPAN over GRE and IPv6
324 .sp
325 .BR vti
326 - Virtual tunnel interface
327 .sp
328 .BR nlmon
329 - Netlink monitoring device
330 .sp
331 .BR ipvlan
332 - Interface for L3 (IPv6/IPv4) based VLANs
333 .sp
334 .BR ipvtap
335 - Interface for L3 (IPv6/IPv4) based VLANs and TAP
336 .sp
337 .BR lowpan
338 - Interface for 6LoWPAN (IPv6) over IEEE 802.15.4 / Bluetooth
339 .sp
340 .BR geneve
341 - GEneric NEtwork Virtualization Encapsulation
342 .sp
343 .BR macsec
344 - Interface for IEEE 802.1AE MAC Security (MACsec)
345 .sp
346 .BR vrf
347 - Interface for L3 VRF domains
348 .sp
349 .BR netdevsim
350 - Interface for netdev API tests
351 .sp
352 .BR rmnet
353 - Qualcomm rmnet device
354 .sp
355 .BR xfrm
356 - Virtual xfrm interface
357 .in -8
358
359 .TP
360 .BI numtxqueues " QUEUE_COUNT "
361 specifies the number of transmit queues for new device.
362
363 .TP
364 .BI numrxqueues " QUEUE_COUNT "
365 specifies the number of receive queues for new device.
366
367 .TP
368 .BI gso_max_size " BYTES "
369 specifies the recommended maximum size of a Generic Segment Offload
370 packet the new device should accept.
371
372 .TP
373 .BI gso_max_segs " SEGMENTS "
374 specifies the recommended maximum number of a Generic Segment Offload
375 segments the new device should accept.
376
377 .TP
378 .BI index " IDX "
379 specifies the desired index of the new virtual device. The link
380 creation fails, if the index is busy.
381
382 .TP
383 VLAN Type Support
384 For a link of type
385 .I VLAN
386 the following additional arguments are supported:
387
388 .BI "ip link add
389 .BI link " DEVICE "
390 .BI name " NAME "
391 .B "type vlan"
392 [
393 .BI protocol " VLAN_PROTO "
394 ]
395 .BI id " VLANID "
396 [
397 .BR reorder_hdr " { " on " | " off " } "
398 ]
399 [
400 .BR gvrp " { " on " | " off " } "
401 ]
402 [
403 .BR mvrp " { " on " | " off " } "
404 ]
405 [
406 .BR loose_binding " { " on " | " off " } "
407 ]
408 [
409 .BR bridge_binding " { " on " | " off " } "
410 ]
411 [
412 .BI ingress-qos-map " QOS-MAP "
413 ]
414 [
415 .BI egress-qos-map " QOS-MAP "
416 ]
417
418 .in +8
419 .sp
420 .BI protocol " VLAN_PROTO "
421 - either 802.1Q or 802.1ad.
422
423 .BI id " VLANID "
424 - specifies the VLAN Identifer to use. Note that numbers with a leading " 0 " or " 0x " are interpreted as octal or hexadeimal, respectively.
425
426 .BR reorder_hdr " { " on " | " off " } "
427 - specifies whether ethernet headers are reordered or not (default is
428 .BR on ")."
429
430 .in +4
431 If
432 .BR reorder_hdr " is " on
433 then VLAN header will be not inserted immediately but only before
434 passing to the physical device (if this device does not support VLAN
435 offloading), the similar on the RX direction - by default the packet
436 will be untagged before being received by VLAN device. Reordering
437 allows to accelerate tagging on egress and to hide VLAN header on
438 ingress so the packet looks like regular Ethernet packet, at the same
439 time it might be confusing for packet capture as the VLAN header does
440 not exist within the packet.
441
442 VLAN offloading can be checked by
443 .BR ethtool "(8):"
444 .in +4
445 .sp
446 .B ethtool -k
447 <phy_dev> |
448 .RB grep " tx-vlan-offload"
449 .sp
450 .in -4
451 where <phy_dev> is the physical device to which VLAN device is bound.
452 .in -4
453
454 .BR gvrp " { " on " | " off " } "
455 - specifies whether this VLAN should be registered using GARP VLAN
456 Registration Protocol.
457
458 .BR mvrp " { " on " | " off " } "
459 - specifies whether this VLAN should be registered using Multiple VLAN
460 Registration Protocol.
461
462 .BR loose_binding " { " on " | " off " } "
463 - specifies whether the VLAN device state is bound to the physical device state.
464
465 .BR bridge_binding " { " on " | " off " } "
466 - specifies whether the VLAN device link state tracks the state of bridge ports
467 that are members of the VLAN.
468
469 .BI ingress-qos-map " QOS-MAP "
470 - defines a mapping of VLAN header prio field to the Linux internal packet
471 priority on incoming frames. The format is FROM:TO with multiple mappings
472 separated by spaces.
473
474 .BI egress-qos-map " QOS-MAP "
475 - defines a mapping of Linux internal packet priority to VLAN header prio field
476 but for outgoing frames. The format is the same as for ingress-qos-map.
477 .in +4
478
479 Linux packet priority can be set by
480 .BR iptables "(8)":
481 .in +4
482 .sp
483 .B iptables
484 -t mangle -A POSTROUTING [...] -j CLASSIFY --set-class 0:4
485 .sp
486 .in -4
487 and this "4" priority can be used in the egress qos mapping to set
488 VLAN prio "5":
489 .sp
490 .in +4
491 .B ip
492 link set veth0.10 type vlan egress 4:5
493 .in -4
494 .in -4
495 .in -8
496
497 .TP
498 VXLAN Type Support
499 For a link of type
500 .I VXLAN
501 the following additional arguments are supported:
502
503 .BI "ip link add " DEVICE
504 .BI type " vxlan " id " VNI"
505 [
506 .BI dev " PHYS_DEV "
507 .RB " ] [ { " group " | " remote " } "
508 .I IPADDR
509 ] [
510 .B local
511 .RI "{ "IPADDR " | "any " } "
512 ] [
513 .BI ttl " TTL "
514 ] [
515 .BI tos " TOS "
516 ] [
517 .BI df " DF "
518 ] [
519 .BI flowlabel " FLOWLABEL "
520 ] [
521 .BI dstport " PORT "
522 ] [
523 .BI srcport " MIN MAX "
524 ] [
525 .RB [ no ] learning
526 ] [
527 .RB [ no ] proxy
528 ] [
529 .RB [ no ] rsc
530 ] [
531 .RB [ no ] l2miss
532 ] [
533 .RB [ no ] l3miss
534 ] [
535 .RB [ no ] udpcsum
536 ] [
537 .RB [ no ] udp6zerocsumtx
538 ] [
539 .RB [ no ] udp6zerocsumrx
540 ] [
541 .BI ageing " SECONDS "
542 ] [
543 .BI maxaddress " NUMBER "
544 ] [
545 .RB [ no ] external
546 ] [
547 .B gbp
548 ] [
549 .B gpe
550 ]
551
552 .in +8
553 .sp
554 .BI id " VNI "
555 - specifies the VXLAN Network Identifer (or VXLAN Segment
556 Identifier) to use.
557
558 .BI dev " PHYS_DEV"
559 - specifies the physical device to use for tunnel endpoint communication.
560
561 .sp
562 .BI group " IPADDR"
563 - specifies the multicast IP address to join.
564 This parameter cannot be specified with the
565 .B remote
566 parameter.
567
568 .sp
569 .BI remote " IPADDR"
570 - specifies the unicast destination IP address to use in outgoing packets
571 when the destination link layer address is not known in the VXLAN device
572 forwarding database. This parameter cannot be specified with the
573 .B group
574 parameter.
575
576 .sp
577 .BI local " IPADDR"
578 - specifies the source IP address to use in outgoing packets.
579
580 .sp
581 .BI ttl " TTL"
582 - specifies the TTL value to use in outgoing packets.
583
584 .sp
585 .BI tos " TOS"
586 - specifies the TOS value to use in outgoing packets.
587
588 .sp
589 .BI df " DF"
590 - specifies the usage of the Don't Fragment flag (DF) bit in outgoing packets
591 with IPv4 headers. The value
592 .B inherit
593 causes the bit to be copied from the original IP header. The values
594 .B unset
595 and
596 .B set
597 cause the bit to be always unset or always set, respectively. By default, the
598 bit is not set.
599
600 .sp
601 .BI flowlabel " FLOWLABEL"
602 - specifies the flow label to use in outgoing packets.
603
604 .sp
605 .BI dstport " PORT"
606 - specifies the UDP destination port to communicate to the remote
607 VXLAN tunnel endpoint.
608
609 .sp
610 .BI srcport " MIN MAX"
611 - specifies the range of port numbers to use as UDP
612 source ports to communicate to the remote VXLAN tunnel endpoint.
613
614 .sp
615 .RB [ no ] learning
616 - specifies if unknown source link layer addresses and IP addresses
617 are entered into the VXLAN device forwarding database.
618
619 .sp
620 .RB [ no ] rsc
621 - specifies if route short circuit is turned on.
622
623 .sp
624 .RB [ no ] proxy
625 - specifies ARP proxy is turned on.
626
627 .sp
628 .RB [ no ] l2miss
629 - specifies if netlink LLADDR miss notifications are generated.
630
631 .sp
632 .RB [ no ] l3miss
633 - specifies if netlink IP ADDR miss notifications are generated.
634
635 .sp
636 .RB [ no ] udpcsum
637 - specifies if UDP checksum is calculated for transmitted packets over IPv4.
638
639 .sp
640 .RB [ no ] udp6zerocsumtx
641 - skip UDP checksum calculation for transmitted packets over IPv6.
642
643 .sp
644 .RB [ no ] udp6zerocsumrx
645 - allow incoming UDP packets over IPv6 with zero checksum field.
646
647 .sp
648 .BI ageing " SECONDS"
649 - specifies the lifetime in seconds of FDB entries learnt by the kernel.
650
651 .sp
652 .BI maxaddress " NUMBER"
653 - specifies the maximum number of FDB entries.
654
655 .sp
656 .RB [ no ] external
657 - specifies whether an external control plane
658 .RB "(e.g. " "ip route encap" )
659 or the internal FDB should be used.
660
661 .sp
662 .B gbp
663 - enables the Group Policy extension (VXLAN-GBP).
664
665 .in +4
666 Allows to transport group policy context across VXLAN network peers.
667 If enabled, includes the mark of a packet in the VXLAN header for outgoing
668 packets and fills the packet mark based on the information found in the
669 VXLAN header for incoming packets.
670
671 Format of upper 16 bits of packet mark (flags);
672
673 .in +2
674 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
675 .br
676 |-|-|-|-|-|-|-|-|-|D|-|-|A|-|-|-|
677 .br
678 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
679
680 .B D :=
681 Don't Learn bit. When set, this bit indicates that the egress
682 VTEP MUST NOT learn the source address of the encapsulated frame.
683
684 .B A :=
685 Indicates that the group policy has already been applied to
686 this packet. Policies MUST NOT be applied by devices when the A bit is set.
687 .in -2
688
689 Format of lower 16 bits of packet mark (policy ID):
690
691 .in +2
692 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
693 .br
694 | Group Policy ID |
695 .br
696 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
697 .in -2
698
699 Example:
700 iptables -A OUTPUT [...] -j MARK --set-mark 0x800FF
701
702 .in -4
703
704 .sp
705 .B gpe
706 - enables the Generic Protocol extension (VXLAN-GPE). Currently, this is
707 only supported together with the
708 .B external
709 keyword.
710
711 .in -8
712
713 .TP
714 VETH, VXCAN Type Support
715 For a link of types
716 .I VETH/VXCAN
717 the following additional arguments are supported:
718
719 .BI "ip link add " DEVICE
720 .BR type " { " veth " | " vxcan " }"
721 [
722 .BR peer
723 .BI "name " NAME
724 ]
725
726 .in +8
727 .sp
728 .BR peer
729 .BI "name " NAME
730 - specifies the virtual pair device name of the
731 .I VETH/VXCAN
732 tunnel.
733
734 .in -8
735
736 .TP
737 IPIP, SIT Type Support
738 For a link of type
739 .IR IPIP or SIT
740 the following additional arguments are supported:
741
742 .BI "ip link add " DEVICE
743 .BR type " { " ipip " | " sit " }"
744 .BI " remote " ADDR " local " ADDR
745 [
746 .BR encap " { " fou " | " gue " | " none " }"
747 ] [
748 .BR encap-sport " { " \fIPORT " | " auto " }"
749 ] [
750 .BI "encap-dport " PORT
751 ] [
752 .RB [ no ] encap-csum
753 ] [
754 .I " [no]encap-remcsum "
755 ] [
756 .I " mode " { ip6ip | ipip | mplsip | any } "
757 ] [
758 .BR external
759 ]
760
761 .in +8
762 .sp
763 .BI remote " ADDR "
764 - specifies the remote address of the tunnel.
765
766 .sp
767 .BI local " ADDR "
768 - specifies the fixed local address for tunneled packets.
769 It must be an address on another interface on this host.
770
771 .sp
772 .BR encap " { " fou " | " gue " | " none " }"
773 - specifies type of secondary UDP encapsulation. "fou" indicates
774 Foo-Over-UDP, "gue" indicates Generic UDP Encapsulation.
775
776 .sp
777 .BR encap-sport " { " \fIPORT " | " auto " }"
778 - specifies the source port in UDP encapsulation.
779 .IR PORT
780 indicates the port by number, "auto"
781 indicates that the port number should be chosen automatically
782 (the kernel picks a flow based on the flow hash of the
783 encapsulated packet).
784
785 .sp
786 .RB [ no ] encap-csum
787 - specifies if UDP checksums are enabled in the secondary
788 encapsulation.
789
790 .sp
791 .RB [ no ] encap-remcsum
792 - specifies if Remote Checksum Offload is enabled. This is only
793 applicable for Generic UDP Encapsulation.
794
795 .sp
796 .BI mode " { ip6ip | ipip | mplsip | any } "
797 - specifies mode in which device should run. "ip6ip" indicates
798 IPv6-Over-IPv4, "ipip" indicates "IPv4-Over-IPv4", "mplsip" indicates
799 MPLS-Over-IPv4, "any" indicates IPv6, IPv4 or MPLS Over IPv4. Supported for
800 SIT where the default is "ip6ip" and IPIP where the default is "ipip".
801 IPv6-Over-IPv4 is not supported for IPIP.
802
803 .sp
804 .BR external
805 - make this tunnel externally controlled
806 .RB "(e.g. " "ip route encap" ).
807
808 .in -8
809 .TP
810 GRE Type Support
811 For a link of type
812 .IR GRE " or " GRETAP
813 the following additional arguments are supported:
814
815 .BI "ip link add " DEVICE
816 .BR type " { " gre " | " gretap " }"
817 .BI " remote " ADDR " local " ADDR
818 [
819 .RB [ no ] "" [ i | o ] seq
820 ] [
821 .RB [ i | o ] key
822 .I KEY
823 |
824 .BR no [ i | o ] key
825 ] [
826 .RB [ no ] "" [ i | o ] csum
827 ] [
828 .BI ttl " TTL "
829 ] [
830 .BI tos " TOS "
831 ] [
832 .RB [ no ] pmtudisc
833 ] [
834 .RB [ no ] ignore-df
835 ] [
836 .BI dev " PHYS_DEV "
837 ] [
838 .BR encap " { " fou " | " gue " | " none " }"
839 ] [
840 .BR encap-sport " { " \fIPORT " | " auto " }"
841 ] [
842 .BI "encap-dport " PORT
843 ] [
844 .RB [ no ] encap-csum
845 ] [
846 .RB [ no ] encap-remcsum
847 ] [
848 .BR external
849 ]
850
851 .in +8
852 .sp
853 .BI remote " ADDR "
854 - specifies the remote address of the tunnel.
855
856 .sp
857 .BI local " ADDR "
858 - specifies the fixed local address for tunneled packets.
859 It must be an address on another interface on this host.
860
861 .sp
862 .RB [ no ] "" [ i | o ] seq
863 - serialize packets.
864 The
865 .B oseq
866 flag enables sequencing of outgoing packets.
867 The
868 .B iseq
869 flag requires that all input packets are serialized.
870
871 .sp
872 .RB [ i | o ] key
873 .I KEY
874 |
875 .BR no [ i | o ] key
876 - use keyed GRE with key
877 .IR KEY ". "KEY
878 is either a number or an IPv4 address-like dotted quad.
879 The
880 .B key
881 parameter specifies the same key to use in both directions.
882 The
883 .BR ikey " and " okey
884 parameters specify different keys for input and output.
885
886 .sp
887 .RB [ no ] "" [ i | o ] csum
888 - generate/require checksums for tunneled packets.
889 The
890 .B ocsum
891 flag calculates checksums for outgoing packets.
892 The
893 .B icsum
894 flag requires that all input packets have the correct
895 checksum. The
896 .B csum
897 flag is equivalent to the combination
898 .B "icsum ocsum" .
899
900 .sp
901 .BI ttl " TTL"
902 - specifies the TTL value to use in outgoing packets.
903
904 .sp
905 .BI tos " TOS"
906 - specifies the TOS value to use in outgoing packets.
907
908 .sp
909 .RB [ no ] pmtudisc
910 - enables/disables Path MTU Discovery on this tunnel.
911 It is enabled by default. Note that a fixed ttl is incompatible
912 with this option: tunneling with a fixed ttl always makes pmtu
913 discovery.
914
915 .sp
916 .RB [ no ] ignore-df
917 - enables/disables IPv4 DF suppression on this tunnel.
918 Normally datagrams that exceed the MTU will be fragmented; the presence
919 of the DF flag inhibits this, resulting instead in an ICMP Unreachable
920 (Fragmentation Required) message. Enabling this attribute causes the
921 DF flag to be ignored.
922
923 .sp
924 .BI dev " PHYS_DEV"
925 - specifies the physical device to use for tunnel endpoint communication.
926
927 .sp
928 .BR encap " { " fou " | " gue " | " none " }"
929 - specifies type of secondary UDP encapsulation. "fou" indicates
930 Foo-Over-UDP, "gue" indicates Generic UDP Encapsulation.
931
932 .sp
933 .BR encap-sport " { " \fIPORT " | " auto " }"
934 - specifies the source port in UDP encapsulation.
935 .IR PORT
936 indicates the port by number, "auto"
937 indicates that the port number should be chosen automatically
938 (the kernel picks a flow based on the flow hash of the
939 encapsulated packet).
940
941 .sp
942 .RB [ no ] encap-csum
943 - specifies if UDP checksums are enabled in the secondary
944 encapsulation.
945
946 .sp
947 .RB [ no ] encap-remcsum
948 - specifies if Remote Checksum Offload is enabled. This is only
949 applicable for Generic UDP Encapsulation.
950
951 .sp
952 .BR external
953 - make this tunnel externally controlled
954 .RB "(e.g. " "ip route encap" ).
955
956 .in -8
957
958 .TP
959 IP6GRE/IP6GRETAP Type Support
960 For a link of type
961 .I IP6GRE/IP6GRETAP
962 the following additional arguments are supported:
963
964 .BI "ip link add " DEVICE
965 .BR type " { " ip6gre " | " ip6gretap " }"
966 .BI remote " ADDR " local " ADDR"
967 [
968 .RB [ no ] "" [ i | o ] seq
969 ] [
970 .RB [ i | o ] key
971 .I KEY
972 |
973 .BR no [ i | o ] key
974 ] [
975 .RB [ no ] "" [ i | o ] csum
976 ] [
977 .BI hoplimit " TTL "
978 ] [
979 .BI encaplimit " ELIM "
980 ] [
981 .BI tclass " TCLASS "
982 ] [
983 .BI flowlabel " FLOWLABEL "
984 ] [
985 .BI "dscp inherit"
986 ] [
987 .BI "[no]allow-localremote"
988 ] [
989 .BI dev " PHYS_DEV "
990 ] [
991 .RB external
992 ]
993
994 .in +8
995 .sp
996 .BI remote " ADDR "
997 - specifies the remote IPv6 address of the tunnel.
998
999 .sp
1000 .BI local " ADDR "
1001 - specifies the fixed local IPv6 address for tunneled packets.
1002 It must be an address on another interface on this host.
1003
1004 .sp
1005 .RB [ no ] "" [ i | o ] seq
1006 - serialize packets.
1007 The
1008 .B oseq
1009 flag enables sequencing of outgoing packets.
1010 The
1011 .B iseq
1012 flag requires that all input packets are serialized.
1013
1014 .sp
1015 .RB [ i | o ] key
1016 .I KEY
1017 |
1018 .BR no [ i | o ] key
1019 - use keyed GRE with key
1020 .IR KEY ". "KEY
1021 is either a number or an IPv4 address-like dotted quad.
1022 The
1023 .B key
1024 parameter specifies the same key to use in both directions.
1025 The
1026 .BR ikey " and " okey
1027 parameters specify different keys for input and output.
1028
1029 .sp
1030 .RB [ no ] "" [ i | o ] csum
1031 - generate/require checksums for tunneled packets.
1032 The
1033 .B ocsum
1034 flag calculates checksums for outgoing packets.
1035 The
1036 .B icsum
1037 flag requires that all input packets have the correct
1038 checksum. The
1039 .B csum
1040 flag is equivalent to the combination
1041 .BR "icsum ocsum" .
1042
1043 .sp
1044 .BI hoplimit " TTL"
1045 - specifies Hop Limit value to use in outgoing packets.
1046
1047 .sp
1048 .BI encaplimit " ELIM"
1049 - specifies a fixed encapsulation limit. Default is 4.
1050
1051 .sp
1052 .BI flowlabel " FLOWLABEL"
1053 - specifies a fixed flowlabel.
1054
1055 .sp
1056 .BI [no]allow-localremote
1057 - specifies whether to allow remote endpoint to have an address configured on
1058 local host.
1059
1060 .sp
1061 .BI tclass " TCLASS"
1062 - specifies the traffic class field on
1063 tunneled packets, which can be specified as either a two-digit
1064 hex value (e.g. c0) or a predefined string (e.g. internet).
1065 The value
1066 .B inherit
1067 causes the field to be copied from the original IP header. The
1068 values
1069 .BI "inherit/" STRING
1070 or
1071 .BI "inherit/" 00 ".." ff
1072 will set the field to
1073 .I STRING
1074 or
1075 .IR 00 ".." ff
1076 when tunneling non-IP packets. The default value is 00.
1077
1078 .sp
1079 .RB external
1080 - make this tunnel externally controlled (or not, which is the default).
1081 In the kernel, this is referred to as collect metadata mode. This flag is
1082 mutually exclusive with the
1083 .BR remote ,
1084 .BR local ,
1085 .BR seq ,
1086 .BR key,
1087 .BR csum,
1088 .BR hoplimit,
1089 .BR encaplimit,
1090 .BR flowlabel " and " tclass
1091 options.
1092
1093 .in -8
1094
1095 .TP
1096 IPoIB Type Support
1097 For a link of type
1098 .I IPoIB
1099 the following additional arguments are supported:
1100
1101 .BI "ip link add " DEVICE " name " NAME
1102 .BR "type ipoib " [ " pkey \fIPKEY" " ] [ " mode " \fIMODE \fR]"
1103
1104 .in +8
1105 .sp
1106 .BI pkey " PKEY "
1107 - specifies the IB P-Key to use.
1108
1109 .BI mode " MODE "
1110 - specifies the mode (datagram or connected) to use.
1111
1112 .TP
1113 ERSPAN Type Support
1114 For a link of type
1115 .I ERSPAN/IP6ERSPAN
1116 the following additional arguments are supported:
1117
1118 .BI "ip link add " DEVICE
1119 .BR type " { " erspan " | " ip6erspan " }"
1120 .BI remote " ADDR " local " ADDR " seq
1121 .RB key
1122 .I KEY
1123 .BR erspan_ver " \fIversion "
1124 [
1125 .BR erspan " \fIIDX "
1126 ] [
1127 .BR erspan_dir " { " \fIingress " | " \fIegress " }"
1128 ] [
1129 .BR erspan_hwid " \fIhwid "
1130 ] [
1131 .BI "[no]allow-localremote"
1132 ] [
1133 .RB external
1134 ]
1135
1136 .in +8
1137 .sp
1138 .BI remote " ADDR "
1139 - specifies the remote address of the tunnel.
1140
1141 .sp
1142 .BI local " ADDR "
1143 - specifies the fixed local address for tunneled packets.
1144 It must be an address on another interface on this host.
1145
1146 .sp
1147 .BR erspan_ver " \fIversion "
1148 - specifies the ERSPAN version number.
1149 .IR version
1150 indicates the ERSPAN version to be created: 1 for version 1 (type II)
1151 or 2 for version 2 (type III).
1152
1153 .sp
1154 .BR erspan " \fIIDX "
1155 - specifies the ERSPAN v1 index field.
1156 .IR IDX
1157 indicates a 20 bit index/port number associated with the ERSPAN
1158 traffic's source port and direction.
1159
1160 .sp
1161 .BR erspan_dir " { " \fIingress " | " \fIegress " }"
1162 - specifies the ERSPAN v2 mirrored traffic's direction.
1163
1164 .sp
1165 .BR erspan_hwid " \fIhwid "
1166 - an unique identifier of an ERSPAN v2 engine within a system.
1167 .IR hwid
1168 is a 6-bit value for users to configure.
1169
1170 .sp
1171 .BI [no]allow-localremote
1172 - specifies whether to allow remote endpoint to have an address configured on
1173 local host.
1174
1175 .sp
1176 .BR external
1177 - make this tunnel externally controlled (or not, which is the default).
1178 In the kernel, this is referred to as collect metadata mode. This flag is
1179 mutually exclusive with the
1180 .BR remote ,
1181 .BR local ,
1182 .BR erspan_ver ,
1183 .BR erspan ,
1184 .BR erspan_dir " and " erspan_hwid
1185 options.
1186
1187 .in -8
1188
1189 .TP
1190 GENEVE Type Support
1191 For a link of type
1192 .I GENEVE
1193 the following additional arguments are supported:
1194
1195 .BI "ip link add " DEVICE
1196 .BI type " geneve " id " VNI " remote " IPADDR"
1197 [
1198 .BI ttl " TTL "
1199 ] [
1200 .BI tos " TOS "
1201 ] [
1202 .BI df " DF "
1203 ] [
1204 .BI flowlabel " FLOWLABEL "
1205 ] [
1206 .BI dstport " PORT"
1207 ] [
1208 .RB [ no ] external
1209 ] [
1210 .RB [ no ] udpcsum
1211 ] [
1212 .RB [ no ] udp6zerocsumtx
1213 ] [
1214 .RB [ no ] udp6zerocsumrx
1215 ]
1216
1217 .in +8
1218 .sp
1219 .BI id " VNI "
1220 - specifies the Virtual Network Identifer to use.
1221
1222 .sp
1223 .BI remote " IPADDR"
1224 - specifies the unicast destination IP address to use in outgoing packets.
1225
1226 .sp
1227 .BI ttl " TTL"
1228 - specifies the TTL value to use in outgoing packets. "0" or "auto" means
1229 use whatever default value, "inherit" means inherit the inner protocol's
1230 ttl. Default option is "0".
1231
1232 .sp
1233 .BI tos " TOS"
1234 - specifies the TOS value to use in outgoing packets.
1235
1236 .sp
1237 .BI df " DF"
1238 - specifies the usage of the Don't Fragment flag (DF) bit in outgoing packets
1239 with IPv4 headers. The value
1240 .B inherit
1241 causes the bit to be copied from the original IP header. The values
1242 .B unset
1243 and
1244 .B set
1245 cause the bit to be always unset or always set, respectively. By default, the
1246 bit is not set.
1247
1248 .sp
1249 .BI flowlabel " FLOWLABEL"
1250 - specifies the flow label to use in outgoing packets.
1251
1252 .sp
1253 .BI dstport " PORT"
1254 - select a destination port other than the default of 6081.
1255
1256 .sp
1257 .RB [ no ] external
1258 - make this tunnel externally controlled (or not, which is the default). This
1259 flag is mutually exclusive with the
1260 .BR id ,
1261 .BR remote ,
1262 .BR ttl ,
1263 .BR tos " and " flowlabel
1264 options.
1265
1266 .sp
1267 .RB [ no ] udpcsum
1268 - specifies if UDP checksum is calculated for transmitted packets over IPv4.
1269
1270 .sp
1271 .RB [ no ] udp6zerocsumtx
1272 - skip UDP checksum calculation for transmitted packets over IPv6.
1273
1274 .sp
1275 .RB [ no ] udp6zerocsumrx
1276 - allow incoming UDP packets over IPv6 with zero checksum field.
1277
1278 .in -8
1279
1280 .TP
1281 MACVLAN and MACVTAP Type Support
1282 For a link of type
1283 .I MACVLAN
1284 or
1285 .I MACVTAP
1286 the following additional arguments are supported:
1287
1288 .BI "ip link add link " DEVICE " name " NAME
1289 .BR type " { " macvlan " | " macvtap " } "
1290 .BR mode " { " private " | " vepa " | " bridge " | " passthru
1291 .RB " [ " nopromisc " ] | " source " } "
1292
1293 .in +8
1294 .sp
1295 .BR type " { " macvlan " | " macvtap " } "
1296 - specifies the link type to use.
1297 .BR macvlan " creates just a virtual interface, while "
1298 .BR macvtap " in addition creates a character device "
1299 .BR /dev/tapX " to be used just like a " tuntap " device."
1300
1301 .B mode private
1302 - Do not allow communication between
1303 .B macvlan
1304 instances on the same physical interface, even if the external switch supports
1305 hairpin mode.
1306
1307 .B mode vepa
1308 - Virtual Ethernet Port Aggregator mode. Data from one
1309 .B macvlan
1310 instance to the other on the same physical interface is transmitted over the
1311 physical interface. Either the attached switch needs to support hairpin mode,
1312 or there must be a TCP/IP router forwarding the packets in order to allow
1313 communication. This is the default mode.
1314
1315 .B mode bridge
1316 - In bridge mode, all endpoints are directly connected to each other,
1317 communication is not redirected through the physical interface's peer.
1318
1319 .BR mode " " passthru " [ " nopromisc " ] "
1320 - This mode gives more power to a single endpoint, usually in
1321 .BR macvtap " mode. It is not allowed for more than one endpoint on the same "
1322 physical interface. All traffic will be forwarded to this endpoint, allowing
1323 virtio guests to change MAC address or set promiscuous mode in order to bridge
1324 the interface or create vlan interfaces on top of it. By default, this mode
1325 forces the underlying interface into promiscuous mode. Passing the
1326 .BR nopromisc " flag prevents this, so the promisc flag may be controlled "
1327 using standard tools.
1328
1329 .B mode source
1330 - allows one to set a list of allowed mac address, which is used to match
1331 against source mac address from received frames on underlying interface. This
1332 allows creating mac based VLAN associations, instead of standard port or tag
1333 based. The feature is useful to deploy 802.1x mac based behavior,
1334 where drivers of underlying interfaces doesn't allows that.
1335 .in -8
1336
1337 .TP
1338 High-availability Seamless Redundancy (HSR) Support
1339 For a link of type
1340 .I HSR
1341 the following additional arguments are supported:
1342
1343 .BI "ip link add link " DEVICE " name " NAME " type hsr"
1344 .BI slave1 " SLAVE1-IF " slave2 " SLAVE2-IF "
1345 .RB [ " supervision"
1346 .IR ADDR-BYTE " ] ["
1347 .BR version " { " 0 " | " 1 " } ]"
1348
1349 .in +8
1350 .sp
1351 .BR type " hsr "
1352 - specifies the link type to use, here HSR.
1353
1354 .BI slave1 " SLAVE1-IF "
1355 - Specifies the physical device used for the first of the two ring ports.
1356
1357 .BI slave2 " SLAVE2-IF "
1358 - Specifies the physical device used for the second of the two ring ports.
1359
1360 .BI supervision " ADDR-BYTE"
1361 - The last byte of the multicast address used for HSR supervision frames.
1362 Default option is "0", possible values 0-255.
1363
1364 .BR version " { " 0 " | " 1 " }"
1365 - Selects the protocol version of the interface. Default option is "0", which
1366 corresponds to the 2010 version of the HSR standard. Option "1" activates the
1367 2012 version.
1368 .in -8
1369
1370 .TP
1371 BRIDGE Type Support
1372 For a link of type
1373 .I BRIDGE
1374 the following additional arguments are supported:
1375
1376 .BI "ip link add " DEVICE " type bridge "
1377 [
1378 .BI ageing_time " AGEING_TIME "
1379 ] [
1380 .BI group_fwd_mask " MASK "
1381 ] [
1382 .BI group_address " ADDRESS "
1383 ] [
1384 .BI forward_delay " FORWARD_DELAY "
1385 ] [
1386 .BI hello_time " HELLO_TIME "
1387 ] [
1388 .BI max_age " MAX_AGE "
1389 ] [
1390 .BI stp_state " STP_STATE "
1391 ] [
1392 .BI priority " PRIORITY "
1393 ] [
1394 .BI vlan_filtering " VLAN_FILTERING "
1395 ] [
1396 .BI vlan_protocol " VLAN_PROTOCOL "
1397 ] [
1398 .BI vlan_default_pvid " VLAN_DEFAULT_PVID "
1399 ] [
1400 .BI vlan_stats_enabled " VLAN_STATS_ENABLED "
1401 ] [
1402 .BI vlan_stats_per_port " VLAN_STATS_PER_PORT "
1403 ] [
1404 .BI mcast_snooping " MULTICAST_SNOOPING "
1405 ] [
1406 .BI mcast_router " MULTICAST_ROUTER "
1407 ] [
1408 .BI mcast_query_use_ifaddr " MCAST_QUERY_USE_IFADDR "
1409 ] [
1410 .BI mcast_querier " MULTICAST_QUERIER "
1411 ] [
1412 .BI mcast_hash_elasticity " HASH_ELASTICITY "
1413 ] [
1414 .BI mcast_hash_max " HASH_MAX "
1415 ] [
1416 .BI mcast_last_member_count " LAST_MEMBER_COUNT "
1417 ] [
1418 .BI mcast_startup_query_count " STARTUP_QUERY_COUNT "
1419 ] [
1420 .BI mcast_last_member_interval " LAST_MEMBER_INTERVAL "
1421 ] [
1422 .BI mcast_membership_interval " MEMBERSHIP_INTERVAL "
1423 ] [
1424 .BI mcast_querier_interval " QUERIER_INTERVAL "
1425 ] [
1426 .BI mcast_query_interval " QUERY_INTERVAL "
1427 ] [
1428 .BI mcast_query_response_interval " QUERY_RESPONSE_INTERVAL "
1429 ] [
1430 .BI mcast_startup_query_interval " STARTUP_QUERY_INTERVAL "
1431 ] [
1432 .BI mcast_stats_enabled " MCAST_STATS_ENABLED "
1433 ] [
1434 .BI mcast_igmp_version " IGMP_VERSION "
1435 ] [
1436 .BI mcast_mld_version " MLD_VERSION "
1437 ] [
1438 .BI nf_call_iptables " NF_CALL_IPTABLES "
1439 ] [
1440 .BI nf_call_ip6tables " NF_CALL_IP6TABLES "
1441 ] [
1442 .BI nf_call_arptables " NF_CALL_ARPTABLES "
1443 ]
1444
1445 .in +8
1446 .sp
1447 .BI ageing_time " AGEING_TIME "
1448 - configure the bridge's FDB entries ageing time, ie the number of
1449 seconds a MAC address will be kept in the FDB after a packet has been
1450 received from that address. after this time has passed, entries are
1451 cleaned up.
1452
1453 .BI group_fwd_mask " MASK "
1454 - set the group forward mask. This is the bitmask that is applied to
1455 decide whether to forward incoming frames destined to link-local
1456 addresses, ie addresses of the form 01:80:C2:00:00:0X (defaults to 0,
1457 ie the bridge does not forward any link-local frames).
1458
1459 .BI group_address " ADDRESS "
1460 - set the MAC address of the multicast group this bridge uses for STP.
1461 The address must be a link-local address in standard Ethernet MAC
1462 address format, ie an address of the form 01:80:C2:00:00:0X, with X
1463 in [0, 4..f].
1464
1465 .BI forward_delay " FORWARD_DELAY "
1466 - set the forwarding delay in seconds, ie the time spent in LISTENING
1467 state (before moving to LEARNING) and in LEARNING state (before
1468 moving to FORWARDING). Only relevant if STP is enabled. Valid values
1469 are between 2 and 30.
1470
1471 .BI hello_time " HELLO_TIME "
1472 - set the time in seconds between hello packets sent by the bridge,
1473 when it is a root bridge or a designated bridges.
1474 Only relevant if STP is enabled. Valid values are between 1 and 10.
1475
1476 .BI max_age " MAX_AGE "
1477 - set the hello packet timeout, ie the time in seconds until another
1478 bridge in the spanning tree is assumed to be dead, after reception of
1479 its last hello message. Only relevant if STP is enabled. Valid values
1480 are between 6 and 40.
1481
1482 .BI stp_state " STP_STATE "
1483 - turn spanning tree protocol on
1484 .RI ( STP_STATE " > 0) "
1485 or off
1486 .RI ( STP_STATE " == 0). "
1487 for this bridge.
1488
1489 .BI priority " PRIORITY "
1490 - set this bridge's spanning tree priority, used during STP root
1491 bridge election.
1492 .I PRIORITY
1493 is a 16bit unsigned integer.
1494
1495 .BI vlan_filtering " VLAN_FILTERING "
1496 - turn VLAN filtering on
1497 .RI ( VLAN_FILTERING " > 0) "
1498 or off
1499 .RI ( VLAN_FILTERING " == 0). "
1500 When disabled, the bridge will not consider the VLAN tag when handling packets.
1501
1502 .BR vlan_protocol " { " 802.1Q " | " 802.1ad " } "
1503 - set the protocol used for VLAN filtering.
1504
1505 .BI vlan_default_pvid " VLAN_DEFAULT_PVID "
1506 - set the default PVID (native/untagged VLAN ID) for this bridge.
1507
1508 .BI vlan_stats_enabled " VLAN_STATS_ENABLED "
1509 - enable
1510 .RI ( VLAN_STATS_ENABLED " == 1) "
1511 or disable
1512 .RI ( VLAN_STATS_ENABLED " == 0) "
1513 per-VLAN stats accounting.
1514
1515 .BI vlan_stats_per_port " VLAN_STATS_PER_PORT "
1516 - enable
1517 .RI ( VLAN_STATS_PER_PORT " == 1) "
1518 or disable
1519 .RI ( VLAN_STATS_PER_PORT " == 0) "
1520 per-VLAN per-port stats accounting. Can be changed only when there are no port VLANs configured.
1521
1522 .BI mcast_snooping " MULTICAST_SNOOPING "
1523 - turn multicast snooping on
1524 .RI ( MULTICAST_SNOOPING " > 0) "
1525 or off
1526 .RI ( MULTICAST_SNOOPING " == 0). "
1527
1528 .BI mcast_router " MULTICAST_ROUTER "
1529 - set bridge's multicast router if IGMP snooping is enabled.
1530 .I MULTICAST_ROUTER
1531 is an integer value having the following meaning:
1532 .in +8
1533 .sp
1534 .B 0
1535 - disabled.
1536
1537 .B 1
1538 - automatic (queried).
1539
1540 .B 2
1541 - permanently enabled.
1542 .in -8
1543
1544 .BI mcast_query_use_ifaddr " MCAST_QUERY_USE_IFADDR "
1545 - whether to use the bridge's own IP address as source address for IGMP queries
1546 .RI ( MCAST_QUERY_USE_IFADDR " > 0) "
1547 or the default of 0.0.0.0
1548 .RI ( MCAST_QUERY_USE_IFADDR " == 0). "
1549
1550 .BI mcast_querier " MULTICAST_QUERIER "
1551 - enable
1552 .RI ( MULTICAST_QUERIER " > 0) "
1553 or disable
1554 .RI ( MULTICAST_QUERIER " == 0) "
1555 IGMP querier, ie sending of multicast queries by the bridge (default: disabled).
1556
1557 .BI mcast_querier_interval " QUERIER_INTERVAL "
1558 - interval between queries sent by other routers. if no queries are seen
1559 after this delay has passed, the bridge will start to send its own queries
1560 (as if
1561 .BI mcast_querier
1562 was enabled).
1563
1564 .BI mcast_hash_elasticity " HASH_ELASTICITY "
1565 - set multicast database hash elasticity, ie the maximum chain length
1566 in the multicast hash table (defaults to 4).
1567
1568 .BI mcast_hash_max " HASH_MAX "
1569 - set maximum size of multicast hash table (defaults to 512,
1570 value must be a power of 2).
1571
1572 .BI mcast_last_member_count " LAST_MEMBER_COUNT "
1573 - set multicast last member count, ie the number of queries the bridge
1574 will send before stopping forwarding a multicast group after a "leave"
1575 message has been received (defaults to 2).
1576
1577 .BI mcast_last_member_interval " LAST_MEMBER_INTERVAL "
1578 - interval between queries to find remaining members of a group,
1579 after a "leave" message is received.
1580
1581 .BI mcast_startup_query_count " STARTUP_QUERY_COUNT "
1582 - set the number of IGMP queries to send during startup phase (defaults to 2).
1583
1584 .BI mcast_startup_query_interval " STARTUP_QUERY_INTERVAL "
1585 - interval between queries in the startup phase.
1586
1587 .BI mcast_query_interval " QUERY_INTERVAL "
1588 - interval between queries sent by the bridge after the end of the
1589 startup phase.
1590
1591 .BI mcast_query_response_interval " QUERY_RESPONSE_INTERVAL "
1592 - set the Max Response Time/Maximum Response Delay for IGMP/MLD
1593 queries sent by the bridge.
1594
1595 .BI mcast_membership_interval " MEMBERSHIP_INTERVAL "
1596 - delay after which the bridge will leave a group,
1597 if no membership reports for this group are received.
1598
1599 .BI mcast_stats_enabled " MCAST_STATS_ENABLED "
1600 - enable
1601 .RI ( MCAST_STATS_ENABLED " > 0) "
1602 or disable
1603 .RI ( MCAST_STATS_ENABLED " == 0) "
1604 multicast (IGMP/MLD) stats accounting.
1605
1606 .BI mcast_igmp_version " IGMP_VERSION "
1607 - set the IGMP version.
1608
1609 .BI mcast_mld_version " MLD_VERSION "
1610 - set the MLD version.
1611
1612 .BI nf_call_iptables " NF_CALL_IPTABLES "
1613 - enable
1614 .RI ( NF_CALL_IPTABLES " > 0) "
1615 or disable
1616 .RI ( NF_CALL_IPTABLES " == 0) "
1617 iptables hooks on the bridge.
1618
1619 .BI nf_call_ip6tables " NF_CALL_IP6TABLES "
1620 - enable
1621 .RI ( NF_CALL_IP6TABLES " > 0) "
1622 or disable
1623 .RI ( NF_CALL_IP6TABLES " == 0) "
1624 ip6tables hooks on the bridge.
1625
1626 .BI nf_call_arptables " NF_CALL_ARPTABLES "
1627 - enable
1628 .RI ( NF_CALL_ARPTABLES " > 0) "
1629 or disable
1630 .RI ( NF_CALL_ARPTABLES " == 0) "
1631 arptables hooks on the bridge.
1632
1633
1634 .in -8
1635
1636 .TP
1637 MACsec Type Support
1638 For a link of type
1639 .I MACsec
1640 the following additional arguments are supported:
1641
1642 .BI "ip link add link " DEVICE " name " NAME " type macsec"
1643 [ [
1644 .BI address " <lladdr>"
1645 ]
1646 .BI port " PORT"
1647 |
1648 .BI sci " SCI"
1649 ] [
1650 .BI cipher " CIPHER_SUITE"
1651 ] [
1652 .BR icvlen " { "
1653 .IR 8..16 " } ] ["
1654 .BR encrypt " {"
1655 .BR on " | " off " } ] [ "
1656 .BR send_sci " { " on " | " off " } ] ["
1657 .BR end_station " { " on " | " off " } ] ["
1658 .BR scb " { " on " | " off " } ] ["
1659 .BR protect " { " on " | " off " } ] ["
1660 .BR replay " { " on " | " off " }"
1661 .BR window " { "
1662 .IR 0..2^32-1 " } ] ["
1663 .BR validate " { " strict " | " check " | " disabled " } ] ["
1664 .BR encodingsa " { "
1665 .IR 0..3 " } ]"
1666
1667 .in +8
1668 .sp
1669 .BI address " <lladdr> "
1670 - sets the system identifier component of secure channel for this MACsec device.
1671
1672 .sp
1673 .BI port " PORT "
1674 - sets the port number component of secure channel for this MACsec
1675 device, in a range from 1 to 65535 inclusive. Numbers with a leading "
1676 0 " or " 0x " are interpreted as octal and hexadecimal, respectively.
1677
1678 .sp
1679 .BI sci " SCI "
1680 - sets the secure channel identifier for this MACsec device.
1681 .I SCI
1682 is a 64bit wide number in hexadecimal format.
1683
1684 .sp
1685 .BI cipher " CIPHER_SUITE "
1686 - defines the cipher suite to use.
1687
1688 .sp
1689 .BI icvlen " LENGTH "
1690 - sets the length of the Integrity Check Value (ICV).
1691
1692 .sp
1693 .BR "encrypt on " or " encrypt off"
1694 - switches between authenticated encryption, or authenticity mode only.
1695
1696 .sp
1697 .BR "send_sci on " or " send_sci off"
1698 - specifies whether the SCI is included in every packet,
1699 or only when it is necessary.
1700
1701 .sp
1702 .BR "end_station on " or " end_station off"
1703 - sets the End Station bit.
1704
1705 .sp
1706 .BR "scb on " or " scb off"
1707 - sets the Single Copy Broadcast bit.
1708
1709 .sp
1710 .BR "protect on " or " protect off"
1711 - enables MACsec protection on the device.
1712
1713 .sp
1714 .BR "replay on " or " replay off"
1715 - enables replay protection on the device.
1716
1717 .in +8
1718
1719 .sp
1720 .BI window " SIZE "
1721 - sets the size of the replay window.
1722
1723 .in -8
1724
1725 .sp
1726 .BR "validate strict " or " validate check " or " validate disabled"
1727 - sets the validation mode on the device.
1728
1729 .sp
1730 .BI encodingsa " AN "
1731 - sets the active secure association for transmission.
1732
1733 .in -8
1734
1735 .TP
1736 VRF Type Support
1737 For a link of type
1738 .I VRF
1739 the following additional arguments are supported:
1740
1741 .BI "ip link add " DEVICE " type vrf table " TABLE
1742
1743 .in +8
1744 .sp
1745 .BR table " table id associated with VRF device"
1746
1747 .in -8
1748
1749 .TP
1750 RMNET Type Support
1751 For a link of type
1752 .I RMNET
1753 the following additional arguments are supported:
1754
1755 .BI "ip link add link " DEVICE " name " NAME " type rmnet mux_id " MUXID
1756
1757 .in +8
1758 .sp
1759 .BI mux_id " MUXID "
1760 - specifies the mux identifier for the rmnet device, possible values 1-254.
1761
1762 .in -8
1763
1764 .TP
1765 XFRM Type Support
1766 For a link of type
1767 .I XFRM
1768 the following additional arguments are supported:
1769
1770 .BI "ip link add " DEVICE " type xfrm dev " PHYS_DEV " [ if_id " IF_ID " ]"
1771
1772 .in +8
1773 .sp
1774 .BI dev " PHYS_DEV "
1775 - specifies the underlying physical interface from which transform traffic is sent and received.
1776
1777 .sp
1778 .BI if_id " IF-ID "
1779 - specifies the hexadecimal lookup key used to send traffic to and from specific xfrm
1780 policies. Policies must be configured with the same key. If not set, the key defaults to
1781 0 and will match any policies which similarly do not have a lookup key configuration.
1782
1783 .in -8
1784
1785 .SS ip link delete - delete virtual link
1786
1787 .TP
1788 .BI dev " DEVICE "
1789 specifies the virtual device to act operate on.
1790
1791 .TP
1792 .BI group " GROUP "
1793 specifies the group of virtual links to delete. Group 0 is not allowed to be
1794 deleted since it is the default group.
1795
1796 .TP
1797 .BI type " TYPE "
1798 specifies the type of the device.
1799
1800 .SS ip link set - change device attributes
1801
1802 .PP
1803 .B Warning:
1804 If multiple parameter changes are requested,
1805 .B ip
1806 aborts immediately after any of the changes have failed.
1807 This is the only case when
1808 .B ip
1809 can move the system to an unpredictable state. The solution
1810 is to avoid changing several parameters with one
1811 .B ip link set
1812 call.
1813
1814 .TP
1815 .BI dev " DEVICE "
1816 .I DEVICE
1817 specifies network device to operate on. When configuring SR-IOV
1818 Virtual Function (VF) devices, this keyword should specify the
1819 associated Physical Function (PF) device.
1820
1821 .TP
1822 .BI group " GROUP "
1823 .I GROUP
1824 has a dual role: If both group and dev are present, then move the device to the
1825 specified group. If only a group is specified, then the command operates on
1826 all devices in that group.
1827
1828 .TP
1829 .BR up " and " down
1830 change the state of the device to
1831 .B UP
1832 or
1833 .BR "DOWN" .
1834
1835 .TP
1836 .BR "arp on " or " arp off"
1837 change the
1838 .B NOARP
1839 flag on the device.
1840
1841 .TP
1842 .BR "multicast on " or " multicast off"
1843 change the
1844 .B MULTICAST
1845 flag on the device.
1846
1847 .TP
1848 .BR "protodown on " or " protodown off"
1849 change the
1850 .B PROTODOWN
1851 state on the device. Indicates that a protocol error has been detected
1852 on the port. Switch drivers can react to this error by doing a phys
1853 down on the switch port.
1854
1855 .TP
1856 .BR "dynamic on " or " dynamic off"
1857 change the
1858 .B DYNAMIC
1859 flag on the device. Indicates that address can change when interface
1860 goes down (currently
1861 .B NOT
1862 used by the Linux).
1863
1864 .TP
1865 .BI name " NAME"
1866 change the name of the device. This operation is not
1867 recommended if the device is running or has some addresses
1868 already configured.
1869
1870 .TP
1871 .BI txqueuelen " NUMBER"
1872 .TP
1873 .BI txqlen " NUMBER"
1874 change the transmit queue length of the device.
1875
1876 .TP
1877 .BI mtu " NUMBER"
1878 change the
1879 .I MTU
1880 of the device.
1881
1882 .TP
1883 .BI address " LLADDRESS"
1884 change the station address of the interface.
1885
1886 .TP
1887 .BI broadcast " LLADDRESS"
1888 .TP
1889 .BI brd " LLADDRESS"
1890 .TP
1891 .BI peer " LLADDRESS"
1892 change the link layer broadcast address or the peer address when
1893 the interface is
1894 .IR "POINTOPOINT" .
1895
1896 .TP
1897 .BI netns " NETNSNAME " \fR| " PID"
1898 move the device to the network namespace associated with name
1899 .IR "NETNSNAME " or
1900 .RI process " PID".
1901
1902 Some devices are not allowed to change network namespace: loopback, bridge,
1903 ppp, wireless. These are network namespace local devices. In such case
1904 .B ip
1905 tool will return "Invalid argument" error. It is possible to find out
1906 if device is local to a single network namespace by checking
1907 .B netns-local
1908 flag in the output of the
1909 .BR ethtool ":"
1910
1911 .in +8
1912 .B ethtool -k
1913 .I DEVICE
1914 .in -8
1915
1916 To change network namespace for wireless devices the
1917 .B iw
1918 tool can be used. But it allows to change network namespace only for
1919 physical devices and by process
1920 .IR PID .
1921
1922 .TP
1923 .BI alias " NAME"
1924 give the device a symbolic name for easy reference.
1925
1926 .TP
1927 .BI group " GROUP"
1928 specify the group the device belongs to.
1929 The available groups are listed in file
1930 .BR "@SYSCONFDIR@/group" .
1931
1932 .TP
1933 .BI vf " NUM"
1934 specify a Virtual Function device to be configured. The associated PF device
1935 must be specified using the
1936 .B dev
1937 parameter.
1938
1939 .in +8
1940 .BI mac " LLADDRESS"
1941 - change the station address for the specified VF. The
1942 .B vf
1943 parameter must be specified.
1944
1945 .sp
1946 .BI vlan " VLANID"
1947 - change the assigned VLAN for the specified VF. When specified, all traffic
1948 sent from the VF will be tagged with the specified VLAN ID. Incoming traffic
1949 will be filtered for the specified VLAN ID, and will have all VLAN tags
1950 stripped before being passed to the VF. Setting this parameter to 0 disables
1951 VLAN tagging and filtering. The
1952 .B vf
1953 parameter must be specified.
1954
1955 .sp
1956 .BI qos " VLAN-QOS"
1957 - assign VLAN QOS (priority) bits for the VLAN tag. When specified, all VLAN
1958 tags transmitted by the VF will include the specified priority bits in the
1959 VLAN tag. If not specified, the value is assumed to be 0. Both the
1960 .B vf
1961 and
1962 .B vlan
1963 parameters must be specified. Setting both
1964 .B vlan
1965 and
1966 .B qos
1967 as 0 disables VLAN tagging and filtering for the VF.
1968
1969 .sp
1970 .BI proto " VLAN-PROTO"
1971 - assign VLAN PROTOCOL for the VLAN tag, either 802.1Q or 802.1ad.
1972 Setting to 802.1ad, all traffic sent from the VF will be tagged with
1973 VLAN S-Tag. Incoming traffic will have VLAN S-Tags stripped before
1974 being passed to the VF. Setting to 802.1ad also enables an option to
1975 concatenate another VLAN tag, so both S-TAG and C-TAG will be
1976 inserted/stripped for outgoing/incoming traffic, respectively. If not
1977 specified, the value is assumed to be 802.1Q. Both the
1978 .B vf
1979 and
1980 .B vlan
1981 parameters must be specified.
1982
1983 .sp
1984 .BI rate " TXRATE"
1985 -- change the allowed transmit bandwidth, in Mbps, for the specified VF.
1986 Setting this parameter to 0 disables rate limiting.
1987 .B vf
1988 parameter must be specified.
1989 Please use new API
1990 .B "max_tx_rate"
1991 option instead.
1992
1993 .sp
1994 .BI max_tx_rate " TXRATE"
1995 - change the allowed maximum transmit bandwidth, in Mbps, for the
1996 specified VF. Setting this parameter to 0 disables rate limiting.
1997 .B vf
1998 parameter must be specified.
1999
2000 .sp
2001 .BI min_tx_rate " TXRATE"
2002 - change the allowed minimum transmit bandwidth, in Mbps, for the specified VF.
2003 Minimum TXRATE should be always <= Maximum TXRATE.
2004 Setting this parameter to 0 disables rate limiting.
2005 .B vf
2006 parameter must be specified.
2007
2008 .sp
2009 .BI spoofchk " on|off"
2010 - turn packet spoof checking on or off for the specified VF.
2011 .sp
2012 .BI query_rss " on|off"
2013 - toggle the ability of querying the RSS configuration of a specific
2014 VF. VF RSS information like RSS hash key may be considered sensitive
2015 on some devices where this information is shared between VF and PF
2016 and thus its querying may be prohibited by default.
2017 .sp
2018 .BI state " auto|enable|disable"
2019 - set the virtual link state as seen by the specified VF. Setting to
2020 auto means a reflection of the PF link state, enable lets the VF to
2021 communicate with other VFs on this host even if the PF link state is
2022 down, disable causes the HW to drop any packets sent by the VF.
2023 .sp
2024 .BI trust " on|off"
2025 - trust the specified VF user. This enables that VF user can set a
2026 specific feature which may impact security and/or
2027 performance. (e.g. VF multicast promiscuous mode)
2028 .sp
2029 .BI node_guid " eui64"
2030 - configure node GUID for Infiniband VFs.
2031 .sp
2032 .BI port_guid " eui64"
2033 - configure port GUID for Infiniband VFs.
2034 .in -8
2035
2036 .TP
2037 .B xdp object "|" pinned "|" off
2038 set (or unset) a XDP ("eXpress Data Path") BPF program to run on every
2039 packet at driver level.
2040 .B ip link
2041 output will indicate a
2042 .B xdp
2043 flag for the networking device. If the driver does not have native XDP
2044 support, the kernel will fall back to a slower, driver-independent "generic"
2045 XDP variant. The
2046 .B ip link
2047 output will in that case indicate
2048 .B xdpgeneric
2049 instead of
2050 .B xdp
2051 only. If the driver does have native XDP support, but the program is
2052 loaded under
2053 .B xdpgeneric object "|" pinned
2054 then the kernel will use the generic XDP variant instead of the native one.
2055 .B xdpdrv
2056 has the opposite effect of requestsing that the automatic fallback to the
2057 generic XDP variant be disabled and in case driver is not XDP-capable error
2058 should be returned.
2059 .B xdpdrv
2060 also disables hardware offloads.
2061 .B xdpoffload
2062 in ip link output indicates that the program has been offloaded to hardware
2063 and can also be used to request the "offload" mode, much like
2064 .B xdpgeneric
2065 it forces program to be installed specifically in HW/FW of the apater.
2066
2067 .B off
2068 (or
2069 .B none
2070 )
2071 - Detaches any currently attached XDP/BPF program from the given device.
2072
2073 .BI object " FILE "
2074 - Attaches a XDP/BPF program to the given device. The
2075 .I FILE
2076 points to a BPF ELF file (f.e. generated by LLVM) that contains the BPF
2077 program code, map specifications, etc. If a XDP/BPF program is already
2078 attached to the given device, an error will be thrown. If no XDP/BPF
2079 program is currently attached, the device supports XDP and the program
2080 from the BPF ELF file passes the kernel verifier, then it will be attached
2081 to the device. If the option
2082 .I -force
2083 is passed to
2084 .B ip
2085 then any prior attached XDP/BPF program will be atomically overridden and
2086 no error will be thrown in this case. If no
2087 .B section
2088 option is passed, then the default section name ("prog") will be assumed,
2089 otherwise the provided section name will be used. If no
2090 .B verbose
2091 option is passed, then a verifier log will only be dumped on load error.
2092 See also
2093 .B EXAMPLES
2094 section for usage examples.
2095
2096 .BI section " NAME "
2097 - Specifies a section name that contains the BPF program code. If no section
2098 name is specified, the default one ("prog") will be used. This option is
2099 to be passed with the
2100 .B object
2101 option.
2102
2103 .BI verbose
2104 - Act in verbose mode. For example, even in case of success, this will
2105 print the verifier log in case a program was loaded from a BPF ELF file.
2106
2107 .BI pinned " FILE "
2108 - Attaches a XDP/BPF program to the given device. The
2109 .I FILE
2110 points to an already pinned BPF program in the BPF file system. The option
2111 .B section
2112 doesn't apply here, but otherwise semantics are the same as with the option
2113 .B object
2114 described already.
2115
2116 .TP
2117 .BI master " DEVICE"
2118 set master device of the device (enslave device).
2119
2120 .TP
2121 .BI nomaster
2122 unset master device of the device (release device).
2123
2124 .TP
2125 .BI addrgenmode " eui64|none|stable_secret|random"
2126 set the IPv6 address generation mode
2127
2128 .I eui64
2129 - use a Modified EUI-64 format interface identifier
2130
2131 .I none
2132 - disable automatic address generation
2133
2134 .I stable_secret
2135 - generate the interface identifier based on a preset
2136 /proc/sys/net/ipv6/conf/{default,DEVICE}/stable_secret
2137
2138 .I random
2139 - like stable_secret, but auto-generate a new random secret if none is set
2140
2141 .TP
2142 .BR "link-netnsid "
2143 set peer netnsid for a cross-netns interface
2144
2145 .TP
2146 .BI type " ETYPE TYPE_ARGS"
2147 Change type-specific settings. For a list of supported types and arguments refer
2148 to the description of
2149 .B "ip link add"
2150 above. In addition to that, it is possible to manipulate settings to slave
2151 devices:
2152
2153 .TP
2154 Bridge Slave Support
2155 For a link with master
2156 .B bridge
2157 the following additional arguments are supported:
2158
2159 .B "ip link set type bridge_slave"
2160 [
2161 .B fdb_flush
2162 ] [
2163 .BI state " STATE"
2164 ] [
2165 .BI priority " PRIO"
2166 ] [
2167 .BI cost " COST"
2168 ] [
2169 .BR guard " { " on " | " off " }"
2170 ] [
2171 .BR hairpin " { " on " | " off " }"
2172 ] [
2173 .BR fastleave " { " on " | " off " }"
2174 ] [
2175 .BR root_block " { " on " | " off " }"
2176 ] [
2177 .BR learning " { " on " | " off " }"
2178 ] [
2179 .BR flood " { " on " | " off " }"
2180 ] [
2181 .BR proxy_arp " { " on " | " off " }"
2182 ] [
2183 .BR proxy_arp_wifi " { " on " | " off " }"
2184 ] [
2185 .BI mcast_router " MULTICAST_ROUTER"
2186 ] [
2187 .BR mcast_fast_leave " { " on " | " off "}"
2188 ] [
2189 .BR mcast_flood " { " on " | " off " }"
2190 ] [
2191 .BR mcast_to_unicast " { " on " | " off " }"
2192 ] [
2193 .BR group_fwd_mask " MASK"
2194 ] [
2195 .BR neigh_suppress " { " on " | " off " }"
2196 ] [
2197 .BR vlan_tunnel " { " on " | " off " }"
2198 ] [
2199 .BR isolated " { " on " | " off " }"
2200 ] [
2201 .BR backup_port " DEVICE"
2202 ] [
2203 .BR nobackup_port " ]"
2204
2205 .in +8
2206 .sp
2207 .B fdb_flush
2208 - flush bridge slave's fdb dynamic entries.
2209
2210 .BI state " STATE"
2211 - Set port state.
2212 .I STATE
2213 is a number representing the following states:
2214 .BR 0 " (disabled),"
2215 .BR 1 " (listening),"
2216 .BR 2 " (learning),"
2217 .BR 3 " (forwarding),"
2218 .BR 4 " (blocking)."
2219
2220 .BI priority " PRIO"
2221 - set port priority (allowed values are between 0 and 63, inclusively).
2222
2223 .BI cost " COST"
2224 - set port cost (allowed values are between 1 and 65535, inclusively).
2225
2226 .BR guard " { " on " | " off " }"
2227 - block incoming BPDU packets on this port.
2228
2229 .BR hairpin " { " on " | " off " }"
2230 - enable hairpin mode on this port. This will allow incoming packets on this
2231 port to be reflected back.
2232
2233 .BR fastleave " { " on " | " off " }"
2234 - enable multicast fast leave on this port.
2235
2236 .BR root_block " { " on " | " off " }"
2237 - block this port from becoming the bridge's root port.
2238
2239 .BR learning " { " on " | " off " }"
2240 - allow MAC address learning on this port.
2241
2242 .BR flood " { " on " | " off " }"
2243 - open the flood gates on this port, i.e. forward all unicast frames to this
2244 port also. Requires
2245 .BR proxy_arp " and " proxy_arp_wifi
2246 to be turned off.
2247
2248 .BR proxy_arp " { " on " | " off " }"
2249 - enable proxy ARP on this port.
2250
2251 .BR proxy_arp_wifi " { " on " | " off " }"
2252 - enable proxy ARP on this port which meets extended requirements by IEEE
2253 802.11 and Hotspot 2.0 specifications.
2254
2255 .BI mcast_router " MULTICAST_ROUTER"
2256 - configure this port for having multicast routers attached. A port with a
2257 multicast router will receive all multicast traffic.
2258 .I MULTICAST_ROUTER
2259 may be either
2260 .B 0
2261 to disable multicast routers on this port,
2262 .B 1
2263 to let the system detect the presence of of routers (this is the default),
2264 .B 2
2265 to permanently enable multicast traffic forwarding on this port or
2266 .B 3
2267 to enable multicast routers temporarily on this port, not depending on incoming
2268 queries.
2269
2270 .BR mcast_fast_leave " { " on " | " off " }"
2271 - this is a synonym to the
2272 .B fastleave
2273 option above.
2274
2275 .BR mcast_flood " { " on " | " off " }"
2276 - controls whether a given port will flood multicast traffic for which
2277 there is no MDB entry.
2278
2279 .BR mcast_to_unicast " { " on " | " off " }"
2280 - controls whether a given port will replicate packets using unicast
2281 instead of multicast. By default this flag is off.
2282
2283 .BI group_fwd_mask " MASK "
2284 - set the group forward mask. This is the bitmask that is applied to
2285 decide whether to forward incoming frames destined to link-local
2286 addresses, ie addresses of the form 01:80:C2:00:00:0X (defaults to
2287 0, ie the bridge does not forward any link-local frames coming on
2288 this port).
2289
2290 .BR neigh_suppress " { " on " | " off " }"
2291 - controls whether neigh discovery (arp and nd) proxy and suppression
2292 is enabled on the port. By default this flag is off.
2293
2294 .BR vlan_tunnel " { " on " | " off " }"
2295 - controls whether vlan to tunnel mapping is enabled on the port. By
2296 default this flag is off.
2297
2298 .BI backup_port " DEVICE"
2299 - if the port loses carrier all traffic will be redirected to the
2300 configured backup port
2301
2302 .BR nobackup_port
2303 - removes the currently configured backup port
2304
2305 .in -8
2306
2307 .TP
2308 Bonding Slave Support
2309 For a link with master
2310 .B bond
2311 the following additional arguments are supported:
2312
2313 .B "ip link set type bond_slave"
2314 [
2315 .BI queue_id " ID"
2316 ]
2317
2318 .in +8
2319 .sp
2320 .BI queue_id " ID"
2321 - set the slave's queue ID (a 16bit unsigned value).
2322
2323 .in -8
2324
2325 .TP
2326 MACVLAN and MACVTAP Support
2327 Modify list of allowed macaddr for link in source mode.
2328
2329 .B "ip link set type { macvlan | macvap } "
2330 [
2331 .BI macaddr " " "" COMMAND " " MACADDR " ..."
2332 ]
2333
2334 Commands:
2335 .in +8
2336 .B add
2337 - add MACADDR to allowed list
2338 .sp
2339 .B set
2340 - replace allowed list
2341 .sp
2342 .B del
2343 - remove MACADDR from allowed list
2344 .sp
2345 .B flush
2346 - flush whole allowed list
2347 .sp
2348 .in -8
2349
2350
2351 .SS ip link show - display device attributes
2352
2353 .TP
2354 .BI dev " NAME " (default)
2355 .I NAME
2356 specifies the network device to show.
2357 If this argument is omitted all devices in the default group are listed.
2358
2359 .TP
2360 .BI group " GROUP "
2361 .I GROUP
2362 specifies what group of devices to show.
2363
2364 .TP
2365 .B up
2366 only display running interfaces.
2367
2368 .TP
2369 .BI master " DEVICE "
2370 .I DEVICE
2371 specifies the master device which enslaves devices to show.
2372
2373 .TP
2374 .BI vrf " NAME "
2375 .I NAME
2376 speficies the VRF which enslaves devices to show.
2377
2378 .TP
2379 .BI type " TYPE "
2380 .I TYPE
2381 specifies the type of devices to show.
2382
2383 Note that the type name is not checked against the list of supported types -
2384 instead it is sent as-is to the kernel. Later it is used to filter the returned
2385 interface list by comparing it with the relevant attribute in case the kernel
2386 didn't filter already. Therefore any string is accepted, but may lead to empty
2387 output.
2388
2389 .SS ip link xstats - display extended statistics
2390
2391 .TP
2392 .BI type " TYPE "
2393 .I TYPE
2394 specifies the type of devices to display extended statistics for.
2395
2396 .SS ip link afstats - display address-family specific statistics
2397
2398 .TP
2399 .BI dev " DEVICE "
2400 .I DEVICE
2401 specifies the device to display address-family statistics for.
2402
2403 .SS ip link help - display help
2404
2405 .PP
2406 .I "TYPE"
2407 specifies which help of link type to dislpay.
2408
2409 .SS
2410 .I GROUP
2411 may be a number or a string from the file
2412 .B @SYSCONFDIR@/group
2413 which can be manually filled.
2414
2415 .SH "EXAMPLES"
2416 .PP
2417 ip link show
2418 .RS 4
2419 Shows the state of all network interfaces on the system.
2420 .RE
2421 .PP
2422 ip link show type bridge
2423 .RS 4
2424 Shows the bridge devices.
2425 .RE
2426 .PP
2427 ip link show type vlan
2428 .RS 4
2429 Shows the vlan devices.
2430 .RE
2431 .PP
2432 ip link show master br0
2433 .RS 4
2434 Shows devices enslaved by br0
2435 .RE
2436 .PP
2437 ip link set dev ppp0 mtu 1400
2438 .RS 4
2439 Change the MTU the ppp0 device.
2440 .RE
2441 .PP
2442 ip link add link eth0 name eth0.10 type vlan id 10
2443 .RS 4
2444 Creates a new vlan device eth0.10 on device eth0.
2445 .RE
2446 .PP
2447 ip link delete dev eth0.10
2448 .RS 4
2449 Removes vlan device.
2450 .RE
2451
2452 ip link help gre
2453 .RS 4
2454 Display help for the gre link type.
2455 .RE
2456 .PP
2457 ip link add name tun1 type ipip remote 192.168.1.1
2458 local 192.168.1.2 ttl 225 encap gue encap-sport auto
2459 encap-dport 5555 encap-csum encap-remcsum
2460 .RS 4
2461 Creates an IPIP that is encapsulated with Generic UDP Encapsulation,
2462 and the outer UDP checksum and remote checksum offload are enabled.
2463 .RE
2464 .PP
2465 ip link set dev eth0 xdp obj prog.o
2466 .RS 4
2467 Attaches a XDP/BPF program to device eth0, where the program is
2468 located in prog.o, section "prog" (default section). In case a
2469 XDP/BPF program is already attached, throw an error.
2470 .RE
2471 .PP
2472 ip -force link set dev eth0 xdp obj prog.o sec foo
2473 .RS 4
2474 Attaches a XDP/BPF program to device eth0, where the program is
2475 located in prog.o, section "foo". In case a XDP/BPF program is
2476 already attached, it will be overridden by the new one.
2477 .RE
2478 .PP
2479 ip -force link set dev eth0 xdp pinned /sys/fs/bpf/foo
2480 .RS 4
2481 Attaches a XDP/BPF program to device eth0, where the program was
2482 previously pinned as an object node into BPF file system under
2483 name foo.
2484 .RE
2485 .PP
2486 ip link set dev eth0 xdp off
2487 .RS 4
2488 If a XDP/BPF program is attached on device eth0, detach it and
2489 effectively turn off XDP for device eth0.
2490 .RE
2491 .PP
2492 ip link add link wpan0 lowpan0 type lowpan
2493 .RS 4
2494 Creates a 6LoWPAN interface named lowpan0 on the underlying
2495 IEEE 802.15.4 device wpan0.
2496 .RE
2497 .PP
2498 ip link add dev ip6erspan11 type ip6erspan seq key 102
2499 local fc00:100::2 remote fc00:100::1
2500 erspan_ver 2 erspan_dir ingress erspan_hwid 17
2501 .RS 4
2502 Creates a IP6ERSPAN version 2 interface named ip6erspan00.
2503 .RE
2504
2505 .SH SEE ALSO
2506 .br
2507 .BR ip (8),
2508 .BR ip-netns (8),
2509 .BR ethtool (8),
2510 .BR iptables (8)
2511
2512 .SH AUTHOR
2513 Original Manpage by Michail Litvak <mci@owl.openwall.com>