Debian Codegraph @

upstream/debian-unstable/man8/ip-link.8

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