Debian Codegraph @

upstream/fedora-44/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_max_learned " FDB_MAX_LEARNED "
1729 ] [
1730 .BI vlan_filtering " VLAN_FILTERING "
1731 ] [
1732 .BI vlan_protocol " VLAN_PROTOCOL "
1733 ] [
1734 .BI vlan_default_pvid " VLAN_DEFAULT_PVID "
1735 ] [
1736 .BI vlan_stats_enabled " VLAN_STATS_ENABLED "
1737 ] [
1738 .BI vlan_stats_per_port " VLAN_STATS_PER_PORT "
1739 ] [
1740 .BI mcast_snooping " MULTICAST_SNOOPING "
1741 ] [
1742 .BI mcast_vlan_snooping " MULTICAST_VLAN_SNOOPING "
1743 ] [
1744 .BI mcast_router " MULTICAST_ROUTER "
1745 ] [
1746 .BI mcast_query_use_ifaddr " MCAST_QUERY_USE_IFADDR "
1747 ] [
1748 .BI mcast_querier " MULTICAST_QUERIER "
1749 ] [
1750 .BI mcast_hash_elasticity " HASH_ELASTICITY "
1751 ] [
1752 .BI mcast_hash_max " HASH_MAX "
1753 ] [
1754 .BI mcast_last_member_count " LAST_MEMBER_COUNT "
1755 ] [
1756 .BI mcast_startup_query_count " STARTUP_QUERY_COUNT "
1757 ] [
1758 .BI mcast_last_member_interval " LAST_MEMBER_INTERVAL "
1759 ] [
1760 .BI mcast_membership_interval " MEMBERSHIP_INTERVAL "
1761 ] [
1762 .BI mcast_querier_interval " QUERIER_INTERVAL "
1763 ] [
1764 .BI mcast_query_interval " QUERY_INTERVAL "
1765 ] [
1766 .BI mcast_query_response_interval " QUERY_RESPONSE_INTERVAL "
1767 ] [
1768 .BI mcast_startup_query_interval " STARTUP_QUERY_INTERVAL "
1769 ] [
1770 .BI mcast_stats_enabled " MCAST_STATS_ENABLED "
1771 ] [
1772 .BI mcast_igmp_version " IGMP_VERSION "
1773 ] [
1774 .BI mcast_mld_version " MLD_VERSION "
1775 ] [
1776 .BI nf_call_iptables " NF_CALL_IPTABLES "
1777 ] [
1778 .BI nf_call_ip6tables " NF_CALL_IP6TABLES "
1779 ] [
1780 .BI nf_call_arptables " NF_CALL_ARPTABLES "
1781 ] [
1782 .BI mdb_offload_fail_notification " MDB_OFFLOAD_FAIL_NOTIFICATION "
1783 ]
1784
1785 .in +8
1786 .sp
1787 .BI ageing_time " AGEING_TIME "
1788 - configure the bridge's FDB entries ageing time, ie the number of
1789 seconds a MAC address will be kept in the FDB after a packet has been
1790 received from that address. after this time has passed, entries are
1791 cleaned up.
1792
1793 .BI group_fwd_mask " MASK "
1794 - set the group forward mask. This is the bitmask that is applied to
1795 decide whether to forward incoming frames destined to link-local
1796 addresses, ie addresses of the form 01:80:C2:00:00:0X (defaults to 0,
1797 ie the bridge does not forward any link-local frames).
1798
1799 .BI group_address " ADDRESS "
1800 - set the MAC address of the multicast group this bridge uses for STP.
1801 The address must be a link-local address in standard Ethernet MAC
1802 address format, ie an address of the form 01:80:C2:00:00:0X, with X
1803 in [0, 4..f].
1804
1805 .BI forward_delay " FORWARD_DELAY "
1806 - set the forwarding delay in seconds, ie the time spent in LISTENING
1807 state (before moving to LEARNING) and in LEARNING state (before
1808 moving to FORWARDING). Only relevant if STP is enabled. Valid values
1809 are between 2 and 30.
1810
1811 .BI hello_time " HELLO_TIME "
1812 - set the time in seconds between hello packets sent by the bridge,
1813 when it is a root bridge or a designated bridges.
1814 Only relevant if STP is enabled. Valid values are between 1 and 10.
1815
1816 .BI max_age " MAX_AGE "
1817 - set the hello packet timeout, ie the time in seconds until another
1818 bridge in the spanning tree is assumed to be dead, after reception of
1819 its last hello message. Only relevant if STP is enabled. Valid values
1820 are between 6 and 40.
1821
1822 .BI stp_state " STP_STATE "
1823 - turn spanning tree protocol on
1824 .RI ( STP_STATE " > 0) "
1825 or off
1826 .RI ( STP_STATE " == 0). "
1827 for this bridge.
1828
1829 .BI mst_enabled " MST_ENABLED "
1830 - turn multiple spanning tree (MST) support on
1831 .RI ( MST_ENABLED " > 0) "
1832 or off
1833 .RI ( MST_ENABLED " == 0). "
1834 When enabled, sets of VLANs can be associated with multiple spanning
1835 tree instances (MSTIs), and STP states for each port can be controlled
1836 on a per-MSTI basis. Note: no implementation of the MSTP protocol is
1837 provided, only the primitives needed to implement it. To avoid
1838 interfering with the legacy per-VLAN STP states, this setting can only
1839 be changed when no bridge VLANs are configured.
1840
1841 .BI priority " PRIORITY "
1842 - set this bridge's spanning tree priority, used during STP root
1843 bridge election.
1844 .I PRIORITY
1845 is a 16bit unsigned integer.
1846
1847 .BI no_linklocal_learn " NO_LINKLOCAL_LEARN "
1848 - turn link-local learning on
1849 .RI ( NO_LINKLOCAL_LEARN " == 0) "
1850 or off
1851 .RI ( NO_LINKLOCAL_LEARN " > 0). "
1852 When disabled, the bridge will not learn from link-local frames (default:
1853 enabled).
1854
1855 .BI fdb_max_learned " FDB_MAX_LEARNED "
1856 - set the maximum number of learned FDB entries. If
1857 .RI ( FDB_MAX_LEARNED " == 0) "
1858 the feature is disabled. Default is
1859 .BR 0 .
1860 .I FDB_MAX_LEARNED
1861 is a 32bit unsigned integer.
1862
1863 .BI vlan_filtering " VLAN_FILTERING "
1864 - turn VLAN filtering on
1865 .RI ( VLAN_FILTERING " > 0) "
1866 or off
1867 .RI ( VLAN_FILTERING " == 0). "
1868 When disabled, the bridge will not consider the VLAN tag when handling packets.
1869
1870 .BR vlan_protocol " { " 802.1Q " | " 802.1ad " } "
1871 - set the protocol used for VLAN filtering.
1872
1873 .BI vlan_default_pvid " VLAN_DEFAULT_PVID "
1874 - set the default PVID (native/untagged VLAN ID) for this bridge.
1875
1876 .BI vlan_stats_enabled " VLAN_STATS_ENABLED "
1877 - enable
1878 .RI ( VLAN_STATS_ENABLED " == 1) "
1879 or disable
1880 .RI ( VLAN_STATS_ENABLED " == 0) "
1881 per-VLAN stats accounting.
1882
1883 .BI vlan_stats_per_port " VLAN_STATS_PER_PORT "
1884 - enable
1885 .RI ( VLAN_STATS_PER_PORT " == 1) "
1886 or disable
1887 .RI ( VLAN_STATS_PER_PORT " == 0) "
1888 per-VLAN per-port stats accounting. Can be changed only when there are no port VLANs configured.
1889
1890 .BI mcast_snooping " MULTICAST_SNOOPING "
1891 - turn multicast snooping on
1892 .RI ( MULTICAST_SNOOPING " > 0) "
1893 or off
1894 .RI ( MULTICAST_SNOOPING " == 0). "
1895
1896 .BI mcast_vlan_snooping " MULTICAST_VLAN_SNOOPING "
1897 - turn multicast VLAN snooping on
1898 .RI ( MULTICAST_VLAN_SNOOPING " > 0) "
1899 or off
1900 .RI ( MULTICAST_VLAN_SNOOPING " == 0). "
1901
1902 .BI mcast_router " MULTICAST_ROUTER "
1903 - set bridge's multicast router if IGMP snooping is enabled.
1904 .I MULTICAST_ROUTER
1905 is an integer value having the following meaning:
1906 .in +8
1907 .sp
1908 .B 0
1909 - disabled.
1910
1911 .B 1
1912 - automatic (queried).
1913
1914 .B 2
1915 - permanently enabled.
1916 .in -8
1917
1918 .BI mcast_query_use_ifaddr " MCAST_QUERY_USE_IFADDR "
1919 - whether to use the bridge's own IP address as source address for IGMP queries
1920 .RI ( MCAST_QUERY_USE_IFADDR " > 0) "
1921 or the default of 0.0.0.0
1922 .RI ( MCAST_QUERY_USE_IFADDR " == 0). "
1923
1924 .BI mcast_querier " MULTICAST_QUERIER "
1925 - enable
1926 .RI ( MULTICAST_QUERIER " > 0) "
1927 or disable
1928 .RI ( MULTICAST_QUERIER " == 0) "
1929 IGMP querier, ie sending of multicast queries by the bridge (default: disabled).
1930
1931 .BI mcast_querier_interval " QUERIER_INTERVAL "
1932 - interval between queries sent by other routers. if no queries are seen
1933 after this delay has passed, the bridge will start to send its own queries
1934 (as if
1935 .BI mcast_querier
1936 was enabled).
1937
1938 .BI mcast_hash_elasticity " HASH_ELASTICITY "
1939 - set multicast database hash elasticity, ie the maximum chain length
1940 in the multicast hash table (defaults to 4).
1941
1942 .BI mcast_hash_max " HASH_MAX "
1943 - set maximum size of multicast hash table (defaults to 512,
1944 value must be a power of 2).
1945
1946 .BI mcast_last_member_count " LAST_MEMBER_COUNT "
1947 - set multicast last member count, ie the number of queries the bridge
1948 will send before stopping forwarding a multicast group after a "leave"
1949 message has been received (defaults to 2).
1950
1951 .BI mcast_last_member_interval " LAST_MEMBER_INTERVAL "
1952 - interval between queries to find remaining members of a group,
1953 after a "leave" message is received.
1954
1955 .BI mcast_startup_query_count " STARTUP_QUERY_COUNT "
1956 - set the number of IGMP queries to send during startup phase (defaults to 2).
1957
1958 .BI mcast_startup_query_interval " STARTUP_QUERY_INTERVAL "
1959 - interval between queries in the startup phase.
1960
1961 .BI mcast_query_interval " QUERY_INTERVAL "
1962 - interval between queries sent by the bridge after the end of the
1963 startup phase.
1964
1965 .BI mcast_query_response_interval " QUERY_RESPONSE_INTERVAL "
1966 - set the Max Response Time/Maximum Response Delay for IGMP/MLD
1967 queries sent by the bridge.
1968
1969 .BI mcast_membership_interval " MEMBERSHIP_INTERVAL "
1970 - delay after which the bridge will leave a group,
1971 if no membership reports for this group are received.
1972
1973 .BI mcast_stats_enabled " MCAST_STATS_ENABLED "
1974 - enable
1975 .RI ( MCAST_STATS_ENABLED " > 0) "
1976 or disable
1977 .RI ( MCAST_STATS_ENABLED " == 0) "
1978 multicast (IGMP/MLD) stats accounting.
1979
1980 .BI mcast_igmp_version " IGMP_VERSION "
1981 - set the IGMP version.
1982
1983 .BI mcast_mld_version " MLD_VERSION "
1984 - set the MLD version.
1985
1986 .BI nf_call_iptables " NF_CALL_IPTABLES "
1987 - enable
1988 .RI ( NF_CALL_IPTABLES " > 0) "
1989 or disable
1990 .RI ( NF_CALL_IPTABLES " == 0) "
1991 iptables hooks on the bridge.
1992
1993 .BI nf_call_ip6tables " NF_CALL_IP6TABLES "
1994 - enable
1995 .RI ( NF_CALL_IP6TABLES " > 0) "
1996 or disable
1997 .RI ( NF_CALL_IP6TABLES " == 0) "
1998 ip6tables hooks on the bridge.
1999
2000 .BI nf_call_arptables " NF_CALL_ARPTABLES "
2001 - enable
2002 .RI ( NF_CALL_ARPTABLES " > 0) "
2003 or disable
2004 .RI ( NF_CALL_ARPTABLES " == 0) "
2005 arptables hooks on the bridge.
2006
2007 .BI mdb_offload_fail_notification " MDB_OFFLOAD_FAIL_NOTIFICATION "
2008 - turn mdb offload fail notification on
2009 .RI ( MDB_OFFLOAD_FAIL_NOTIFICATION " > 0) "
2010 or off
2011 .RI ( MDB_OFFLOAD_FAIL_NOTIFICATION " == 0). "
2012 Default is
2013 .BR 0 .
2014
2015 .in -8
2016
2017 .TP
2018 MACsec Type Support
2019 For a link of type
2020 .I MACsec
2021 the following additional arguments are supported:
2022
2023 .BI "ip link add link " DEVICE " name " NAME " type macsec"
2024 [ [
2025 .BI address " <lladdr>"
2026 ]
2027 .BI port " PORT"
2028 |
2029 .BI sci " SCI"
2030 ] [
2031 .BI cipher " CIPHER_SUITE"
2032 ] [
2033 .BR icvlen " { "
2034 .IR 8..16 " } ] ["
2035 .BR encrypt " {"
2036 .BR on " | " off " } ] [ "
2037 .BR send_sci " { " on " | " off " } ] ["
2038 .BR end_station " { " on " | " off " } ] ["
2039 .BR scb " { " on " | " off " } ] ["
2040 .BR protect " { " on " | " off " } ] ["
2041 .BR replay " { " on " | " off " }"
2042 .BR window " { "
2043 .IR 0..2^32-1 " } ] ["
2044 .BR validate " { " strict " | " check " | " disabled " } ] ["
2045 .BR encodingsa " { "
2046 .IR 0..3 " } ]"
2047
2048 .in +8
2049 .sp
2050 .BI address " <lladdr> "
2051 - sets the system identifier component of secure channel for this MACsec device.
2052
2053 .sp
2054 .BI port " PORT "
2055 - sets the port number component of secure channel for this MACsec
2056 device, in a range from 1 to 65535 inclusive. Numbers with a leading "
2057 0 " or " 0x " are interpreted as octal and hexadecimal, respectively.
2058
2059 .sp
2060 .BI sci " SCI "
2061 - sets the secure channel identifier for this MACsec device.
2062 .I SCI
2063 is a 64bit wide number in hexadecimal format.
2064
2065 .sp
2066 .BI cipher " CIPHER_SUITE "
2067 - defines the cipher suite to use.
2068
2069 .sp
2070 .BI icvlen " LENGTH "
2071 - sets the length of the Integrity Check Value (ICV).
2072
2073 .sp
2074 .BR "encrypt on " or " encrypt off"
2075 - switches between authenticated encryption, or authenticity mode only.
2076
2077 .sp
2078 .BR "send_sci on " or " send_sci off"
2079 - specifies whether the SCI is included in every packet,
2080 or only when it is necessary.
2081
2082 .sp
2083 .BR "end_station on " or " end_station off"
2084 - sets the End Station bit.
2085
2086 .sp
2087 .BR "scb on " or " scb off"
2088 - sets the Single Copy Broadcast bit.
2089
2090 .sp
2091 .BR "protect on " or " protect off"
2092 - enables MACsec protection on the device.
2093
2094 .sp
2095 .BR "replay on " or " replay off"
2096 - enables replay protection on the device.
2097
2098 .in +8
2099
2100 .sp
2101 .BI window " SIZE "
2102 - sets the size of the replay window.
2103
2104 .in -8
2105
2106 .sp
2107 .BR "validate strict " or " validate check " or " validate disabled"
2108 - sets the validation mode on the device.
2109
2110 .sp
2111 .BI encodingsa " AN "
2112 - sets the active secure association for transmission.
2113
2114 .in -8
2115
2116 .TP
2117 VRF Type Support
2118 For a link of type
2119 .I VRF
2120 the following additional arguments are supported:
2121
2122 .BI "ip link add " DEVICE " type vrf table " TABLE
2123
2124 .in +8
2125 .sp
2126 .BR table " table id associated with VRF device"
2127
2128 .in -8
2129
2130 .TP
2131 RMNET Type Support
2132 For a link of type
2133 .I RMNET
2134 the following additional arguments are supported:
2135
2136 .BI "ip link add link " DEVICE " name " NAME " type rmnet mux_id " MUXID
2137
2138 .in +8
2139 .sp
2140 .BI mux_id " MUXID "
2141 - specifies the mux identifier for the rmnet device, possible values 1-254.
2142
2143 .in -8
2144
2145 .TP
2146 XFRM Type Support
2147 For a link of type
2148 .I XFRM
2149 the following additional arguments are supported:
2150
2151 .BI "ip link add " DEVICE " type xfrm dev " PHYS_DEV " [ if_id " IF_ID " ]"
2152 .BR "[ external ]"
2153
2154 .in +8
2155 .sp
2156 .BI dev " PHYS_DEV "
2157 - specifies the underlying physical interface from which transform traffic is sent and received.
2158
2159 .sp
2160 .BI if_id " IF-ID "
2161 - specifies the hexadecimal lookup key used to send traffic to and from specific xfrm
2162 policies. Policies must be configured with the same key. If not set, the key defaults to
2163 0 and will match any policies which similarly do not have a lookup key configuration.
2164
2165 .sp
2166 .BI external
2167 - make this device externally controlled. This flag is mutually exclusive with the
2168 .BR dev " and " if_id
2169 options.
2170
2171 .in -8
2172
2173 .TP
2174 GTP Type Support
2175 For a link of type
2176 .I GTP
2177 the following additional arguments are supported:
2178
2179 .BI "ip link add " DEVICE " type gtp role " ROLE " hsize " HSIZE
2180
2181 .in +8
2182 .sp
2183 .BI role " ROLE "
2184 - specifies the role of the GTP device, either sgsn or ggsn
2185
2186 .sp
2187 .BI hsize " HSIZE "
2188 - specifies size of the hashtable which stores PDP contexts
2189
2190 .sp
2191 .BI restart_count " RESTART_COUNT "
2192 - GTP instance restart counter
2193
2194 .TP
2195 PFCP Type Support
2196 For a link of type
2197 .I PFCP
2198 no additional arguments are supported
2199
2200 .in -8
2201
2202 .SS ip link delete - delete virtual link
2203
2204 .TP
2205 .BI dev " DEVICE "
2206 specifies the virtual device to act operate on.
2207
2208 .TP
2209 .BI group " GROUP "
2210 specifies the group of virtual links to delete. Group 0 is not allowed to be
2211 deleted since it is the default group.
2212
2213 .TP
2214 .BI type " TYPE "
2215 specifies the type of the device.
2216
2217 .SS ip link set - change device attributes
2218
2219 .PP
2220 .B Warning:
2221 If multiple parameter changes are requested,
2222 .B ip
2223 aborts immediately after any of the changes have failed.
2224 This is the only case when
2225 .B ip
2226 can move the system to an unpredictable state. The solution
2227 is to avoid changing several parameters with one
2228 .B ip link set
2229 call.
2230 The modifier
2231 .B change
2232 is equivalent to
2233 .BR "set" .
2234
2235
2236 .TP
2237 .BI dev " DEVICE "
2238 .I DEVICE
2239 specifies network device to operate on. When configuring SR-IOV
2240 Virtual Function (VF) devices, this keyword should specify the
2241 associated Physical Function (PF) device.
2242
2243 .TP
2244 .BI group " GROUP "
2245 .I GROUP
2246 has a dual role: If both group and dev are present, then move the device to the
2247 specified group. If only a group is specified, then the command operates on
2248 all devices in that group.
2249
2250 .TP
2251 .BR up " and " down
2252 change the state of the device to
2253 .B UP
2254 or
2255 .BR "DOWN" .
2256
2257 .TP
2258 .BR "arp on " or " arp off"
2259 change the
2260 .B NOARP
2261 flag on the device.
2262
2263 .TP
2264 .BR "multicast on " or " multicast off"
2265 change the
2266 .B MULTICAST
2267 flag on the device.
2268
2269 .TP
2270 .BR "allmulticast on " or " allmulticast off"
2271 change the
2272 .B ALLMULTI
2273 flag on the device. When enabled, instructs network driver to retrieve all
2274 multicast packets from the network to the kernel for further processing.
2275
2276 .TP
2277 .BR "promisc on " or " promisc off"
2278 change the
2279 .B PROMISC
2280 flag on the device. When enabled, activates promiscuous operation of the
2281 network device.
2282
2283 .TP
2284 .BR "trailers on " or " trailers off"
2285 change the
2286 .B NOTRAILERS
2287 flag on the device,
2288 .B NOT
2289 used by the Linux and exists for BSD compatibility.
2290
2291 .TP
2292 .BR "protodown on " or " protodown off"
2293 change the
2294 .B PROTODOWN
2295 state on the device. Indicates that a protocol error has been detected
2296 on the port. Switch drivers can react to this error by doing a phys
2297 down on the switch port.
2298
2299 .TP
2300 .BR "protodown_reason PREASON on " or " off"
2301 set
2302 .B PROTODOWN
2303 reasons on the device. protodown reason bit names can be enumerated under
2304 /etc/iproute2/protodown_reasons.d/. possible reasons bits 0-31
2305
2306 .TP
2307 .BR "dynamic on " or " dynamic off"
2308 change the
2309 .B DYNAMIC
2310 flag on the device. Indicates that address can change when interface
2311 goes down (currently
2312 .B NOT
2313 used by the Linux).
2314
2315 .TP
2316 .BI name " NAME"
2317 change the name of the device. This operation is not
2318 recommended if the device is running or has some addresses
2319 already configured.
2320
2321 .TP
2322 .BI txqueuelen " NUMBER"
2323 .TP
2324 .BI txqlen " NUMBER"
2325 change the transmit queue length of the device.
2326
2327 .TP
2328 .BI mtu " NUMBER"
2329 change the
2330 .I MTU
2331 of the device.
2332
2333 .TP
2334 .BI address " LLADDRESS"
2335 change the station address of the interface.
2336
2337 .TP
2338 .BI broadcast " LLADDRESS"
2339 .TP
2340 .BI brd " LLADDRESS"
2341 .TP
2342 .BI peer " LLADDRESS"
2343 change the link layer broadcast address or the peer address when
2344 the interface is
2345 .IR "POINTOPOINT" .
2346
2347 .TP
2348 .B netns
2349 .RI "{ " PID " | " NETNSNAME " | " NETNSFILE " }"
2350 .br
2351 move the device to the network namespace associated with process
2352 .IR "PID " or
2353 the name
2354 .IR "NETNSNAME " or
2355 the file
2356 .IR "NETNSFILE".
2357
2358 Some devices are not allowed to change network namespace: loopback, bridge,
2359 wireless. These are network namespace local devices. In such case
2360 .B ip
2361 tool will return "Invalid argument" error. It is possible to find out
2362 if device is local to a single network namespace by checking
2363 .B netns-local
2364 flag in the output of the
2365 .BR ethtool ":"
2366
2367 .in +8
2368 .B ethtool -k
2369 .I DEVICE
2370 .in -8
2371
2372 To change network namespace for wireless devices the
2373 .B iw
2374 tool can be used. But it allows one to change network namespace only for
2375 physical devices and by process
2376 .IR PID .
2377
2378 .TP
2379 .BI alias " NAME"
2380 give the device a symbolic name for easy reference.
2381
2382 .TP
2383 .BI group " GROUP"
2384 specify the group the device belongs to.
2385 The available groups are listed in
2386 .BR /usr/share/iproute2/group " or " /etc/iproute2/group
2387 (has precedence if exists).
2388
2389 .TP
2390 .BI vf " NUM"
2391 specify a Virtual Function device to be configured. The associated PF device
2392 must be specified using the
2393 .B dev
2394 parameter.
2395
2396 .in +8
2397 .BI mac " LLADDRESS"
2398 - change the station address for the specified VF. The
2399 .B vf
2400 parameter must be specified.
2401
2402 .sp
2403 .BI vlan " VLANID"
2404 - change the assigned VLAN for the specified VF. When specified, all traffic
2405 sent from the VF will be tagged with the specified VLAN ID. Incoming traffic
2406 will be filtered for the specified VLAN ID, and will have all VLAN tags
2407 stripped before being passed to the VF. Setting this parameter to 0 disables
2408 VLAN tagging and filtering. The
2409 .B vf
2410 parameter must be specified.
2411
2412 .sp
2413 .BI qos " VLAN-QOS"
2414 - assign VLAN QOS (priority) bits for the VLAN tag. When specified, all VLAN
2415 tags transmitted by the VF will include the specified priority bits in the
2416 VLAN tag. If not specified, the value is assumed to be 0. Both the
2417 .B vf
2418 and
2419 .B vlan
2420 parameters must be specified. Setting both
2421 .B vlan
2422 and
2423 .B qos
2424 as 0 disables VLAN tagging and filtering for the VF.
2425
2426 .sp
2427 .BI proto " VLAN-PROTO"
2428 - assign VLAN PROTOCOL for the VLAN tag, either 802.1Q or 802.1ad.
2429 Setting to 802.1ad, all traffic sent from the VF will be tagged with
2430 VLAN S-Tag. Incoming traffic will have VLAN S-Tags stripped before
2431 being passed to the VF. Setting to 802.1ad also enables an option to
2432 concatenate another VLAN tag, so both S-TAG and C-TAG will be
2433 inserted/stripped for outgoing/incoming traffic, respectively. If not
2434 specified, the value is assumed to be 802.1Q. Both the
2435 .B vf
2436 and
2437 .B vlan
2438 parameters must be specified.
2439
2440 .sp
2441 .BI rate " TXRATE"
2442 -- change the allowed transmit bandwidth, in Mbps, for the specified VF.
2443 Setting this parameter to 0 disables rate limiting.
2444 .B vf
2445 parameter must be specified.
2446 Please use new API
2447 .B "max_tx_rate"
2448 option instead.
2449
2450 .sp
2451 .BI max_tx_rate " TXRATE"
2452 - change the allowed maximum transmit bandwidth, in Mbps, for the
2453 specified VF. Setting this parameter to 0 disables rate limiting.
2454 .B vf
2455 parameter must be specified.
2456
2457 .sp
2458 .BI min_tx_rate " TXRATE"
2459 - change the allowed minimum transmit bandwidth, in Mbps, for the specified VF.
2460 Minimum TXRATE should be always <= Maximum TXRATE.
2461 Setting this parameter to 0 disables rate limiting.
2462 .B vf
2463 parameter must be specified.
2464
2465 .sp
2466 .BI spoofchk " on|off"
2467 - turn packet spoof checking on or off for the specified VF.
2468 .sp
2469 .BI query_rss " on|off"
2470 - toggle the ability of querying the RSS configuration of a specific
2471 VF. VF RSS information like RSS hash key may be considered sensitive
2472 on some devices where this information is shared between VF and PF
2473 and thus its querying may be prohibited by default.
2474 .sp
2475 .BI state " auto|enable|disable"
2476 - set the virtual link state as seen by the specified VF. Setting to
2477 auto means a reflection of the PF link state, enable lets the VF to
2478 communicate with other VFs on this host even if the PF link state is
2479 down, disable causes the HW to drop any packets sent by the VF.
2480 .sp
2481 .BI trust " on|off"
2482 - trust the specified VF user. This enables that VF user can set a
2483 specific feature which may impact security and/or
2484 performance. (e.g. VF multicast promiscuous mode)
2485 .sp
2486 .BI node_guid " eui64"
2487 - configure node GUID for Infiniband VFs.
2488 .sp
2489 .BI port_guid " eui64"
2490 - configure port GUID for Infiniband VFs.
2491 .in -8
2492
2493 .TP
2494 .B xdp object "|" pinned "|" off
2495 set (or unset) a XDP ("eXpress Data Path") BPF program to run on every
2496 packet at driver level.
2497 .B ip link
2498 output will indicate a
2499 .B xdp
2500 flag for the networking device. If the driver does not have native XDP
2501 support, the kernel will fall back to a slower, driver-independent "generic"
2502 XDP variant. The
2503 .B ip link
2504 output will in that case indicate
2505 .B xdpgeneric
2506 instead of
2507 .B xdp
2508 only. If the driver does have native XDP support, but the program is
2509 loaded under
2510 .B xdpgeneric object "|" pinned
2511 then the kernel will use the generic XDP variant instead of the native one.
2512 .B xdpdrv
2513 has the opposite effect of requesting that the automatic fallback to the
2514 generic XDP variant be disabled and in case driver is not XDP-capable error
2515 should be returned.
2516 .B xdpdrv
2517 also disables hardware offloads.
2518 .B xdpoffload
2519 in ip link output indicates that the program has been offloaded to hardware
2520 and can also be used to request the "offload" mode, much like
2521 .B xdpgeneric
2522 it forces program to be installed specifically in HW/FW of the adapter.
2523
2524 .B off
2525 (or
2526 .B none
2527 )
2528 - Detaches any currently attached XDP/BPF program from the given device.
2529
2530 .BI object " FILE "
2531 - Attaches a XDP/BPF program to the given device. The
2532 .I FILE
2533 points to a BPF ELF file (f.e. generated by LLVM) that contains the BPF
2534 program code, map specifications, etc. If a XDP/BPF program is already
2535 attached to the given device, an error will be thrown. If no XDP/BPF
2536 program is currently attached, the device supports XDP and the program
2537 from the BPF ELF file passes the kernel verifier, then it will be attached
2538 to the device. If the option
2539 .I -force
2540 is passed to
2541 .B ip
2542 then any prior attached XDP/BPF program will be atomically overridden and
2543 no error will be thrown in this case. If no
2544 .B section
2545 option is passed, then the default section name ("prog") will be assumed,
2546 otherwise the provided section name will be used. If no
2547 .B verbose
2548 option is passed, then a verifier log will only be dumped on load error.
2549 See also
2550 .B EXAMPLES
2551 section for usage examples.
2552
2553 .BI section " NAME "
2554 - Specifies a section name that contains the BPF program code. If no section
2555 name is specified, the default one ("prog") will be used. This option is
2556 to be passed with the
2557 .B object
2558 option.
2559
2560 .BI program " NAME "
2561 - Specifies the BPF program name that need to be attached. When the program
2562 name is specified, the section name parameter will be ignored. This option
2563 only works when iproute2 build with
2564 .B libbpf
2565 support.
2566
2567 .BI verbose
2568 - Act in verbose mode. For example, even in case of success, this will
2569 print the verifier log in case a program was loaded from a BPF ELF file.
2570
2571 .BI pinned " FILE "
2572 - Attaches a XDP/BPF program to the given device. The
2573 .I FILE
2574 points to an already pinned BPF program in the BPF file system. The option
2575 .B section
2576 doesn't apply here, but otherwise semantics are the same as with the option
2577 .B object
2578 described already.
2579
2580 .TP
2581 .BI master " DEVICE"
2582 set master device of the device (enslave device).
2583
2584 .TP
2585 .BI nomaster
2586 unset master device of the device (release device).
2587
2588 .TP
2589 .BI addrgenmode " eui64|none|stable_secret|random"
2590 set the IPv6 address generation mode
2591
2592 .I eui64
2593 - use a Modified EUI-64 format interface identifier
2594
2595 .I none
2596 - disable automatic address generation
2597
2598 .I stable_secret
2599 - generate the interface identifier based on a preset
2600 /proc/sys/net/ipv6/conf/{default,DEVICE}/stable_secret
2601
2602 .I random
2603 - like stable_secret, but auto-generate a new random secret if none is set
2604
2605 .TP
2606 .BR "link-netnsid "
2607 set peer netnsid for a cross-netns interface
2608
2609 .TP
2610 .BI type " ETYPE TYPE_ARGS"
2611 Change type-specific settings. For a list of supported types and arguments refer
2612 to the description of
2613 .B "ip link add"
2614 above. In addition to that, it is possible to manipulate settings to slave
2615 devices:
2616
2617 .TP
2618 Bridge Slave Support
2619 For a link with master
2620 .B bridge
2621 the following additional arguments are supported:
2622
2623 .B "ip link set type bridge_slave"
2624 [
2625 .B fdb_flush
2626 ] [
2627 .BI state " STATE"
2628 ] [
2629 .BI priority " PRIO"
2630 ] [
2631 .BI cost " COST"
2632 ] [
2633 .BR guard " { " on " | " off " }"
2634 ] [
2635 .BR hairpin " { " on " | " off " }"
2636 ] [
2637 .BR fastleave " { " on " | " off " }"
2638 ] [
2639 .BR root_block " { " on " | " off " }"
2640 ] [
2641 .BR learning " { " on " | " off " }"
2642 ] [
2643 .BR flood " { " on " | " off " }"
2644 ] [
2645 .BR proxy_arp " { " on " | " off " }"
2646 ] [
2647 .BR proxy_arp_wifi " { " on " | " off " }"
2648 ] [
2649 .BI mcast_router " MULTICAST_ROUTER"
2650 ] [
2651 .BR mcast_fast_leave " { " on " | " off "}"
2652 ] [
2653 .BR bcast_flood " { " on " | " off " }"
2654 ] [
2655 .BR mcast_flood " { " on " | " off " }"
2656 ] [
2657 .BR mcast_to_unicast " { " on " | " off " }"
2658 ] [
2659 .BR group_fwd_mask " MASK"
2660 ] [
2661 .BR neigh_suppress " { " on " | " off " }"
2662 ] [
2663 .BR neigh_vlan_suppress " { " on " | " off " }"
2664 ] [
2665 .BR vlan_tunnel " { " on " | " off " }"
2666 ] [
2667 .BR isolated " { " on " | " off " }"
2668 ] [
2669 .BR locked " { " on " | " off " }"
2670 ] [
2671 .BR mab " { " on " | " off " }"
2672 ] [
2673 .BR backup_port " DEVICE"
2674 ] [
2675 .BR nobackup_port
2676 ] [
2677 .BR backup_nhid " NHID"
2678 ]
2679
2680 .in +8
2681 .sp
2682 .B fdb_flush
2683 - flush bridge slave's fdb dynamic entries.
2684
2685 .BI state " STATE"
2686 - Set port state.
2687 .I STATE
2688 is a number representing the following states:
2689 .BR 0 " (disabled),"
2690 .BR 1 " (listening),"
2691 .BR 2 " (learning),"
2692 .BR 3 " (forwarding),"
2693 .BR 4 " (blocking)."
2694
2695 .BI priority " PRIO"
2696 - set port priority (allowed values are between 0 and 63, inclusively).
2697
2698 .BI cost " COST"
2699 - set port cost (allowed values are between 1 and 65535, inclusively).
2700
2701 .BR guard " { " on " | " off " }"
2702 - block incoming BPDU packets on this port.
2703
2704 .BR hairpin " { " on " | " off " }"
2705 - enable hairpin mode on this port. This will allow incoming packets on this
2706 port to be reflected back.
2707
2708 .BR fastleave " { " on " | " off " }"
2709 - enable multicast fast leave on this port.
2710
2711 .BR root_block " { " on " | " off " }"
2712 - block this port from becoming the bridge's root port.
2713
2714 .BR learning " { " on " | " off " }"
2715 - allow MAC address learning on this port.
2716
2717 .BR flood " { " on " | " off " }"
2718 - open the flood gates on this port, i.e. forward all unicast frames to this
2719 port also. Requires
2720 .BR proxy_arp " and " proxy_arp_wifi
2721 to be turned off.
2722
2723 .BR proxy_arp " { " on " | " off " }"
2724 - enable proxy ARP on this port.
2725
2726 .BR proxy_arp_wifi " { " on " | " off " }"
2727 - enable proxy ARP on this port which meets extended requirements by IEEE
2728 802.11 and Hotspot 2.0 specifications.
2729
2730 .BI mcast_router " MULTICAST_ROUTER"
2731 - configure this port for having multicast routers attached. A port with a
2732 multicast router will receive all multicast traffic.
2733 .I MULTICAST_ROUTER
2734 may be either
2735 .B 0
2736 to disable multicast routers on this port,
2737 .B 1
2738 to let the system detect the presence of routers (this is the default),
2739 .B 2
2740 to permanently enable multicast traffic forwarding on this port or
2741 .B 3
2742 to enable multicast routers temporarily on this port, not depending on incoming
2743 queries.
2744
2745 .BR mcast_fast_leave " { " on " | " off " }"
2746 - this is a synonym to the
2747 .B fastleave
2748 option above.
2749
2750 .BR bcast_flood " { " on " | " off " }"
2751 - controls flooding of broadcast traffic on the given port. By default
2752 this flag is on.
2753
2754 .BR mcast_flood " { " on " | " off " }"
2755 - controls whether a given port will flood multicast traffic for which
2756 there is no MDB entry. By default this flag is on.
2757
2758 .BR mcast_to_unicast " { " on " | " off " }"
2759 - controls whether a given port will replicate packets using unicast
2760 instead of multicast. By default this flag is off.
2761
2762 .BI group_fwd_mask " MASK "
2763 - set the group forward mask. This is the bitmask that is applied to
2764 decide whether to forward incoming frames destined to link-local
2765 addresses, ie addresses of the form 01:80:C2:00:00:0X (defaults to
2766 0, ie the bridge does not forward any link-local frames coming on
2767 this port).
2768
2769 .BR neigh_suppress " { " on " | " off " }"
2770 - controls whether neigh discovery (arp and nd) proxy and suppression
2771 is enabled on the port. By default this flag is off.
2772
2773 .BR neigh_vlan_suppress " { " on " | " off " }"
2774 - controls whether per-VLAN neigh discovery (arp and nd) proxy and suppression
2775 is enabled on the port. When on, the \fBbridge link\fR option
2776 \fBneigh_suppress\fR has no effect and the per-VLAN state is set using the
2777 \fBbridge vlan\fR option \fBneigh_suppress\fR. By default this flag is off.
2778
2779 .BR vlan_tunnel " { " on " | " off " }"
2780 - controls whether vlan to tunnel mapping is enabled on the port. By
2781 default this flag is off.
2782
2783 .BR locked " { " on " | " off " }"
2784 - controls whether a port is locked or not. When locked, non-link-local frames
2785 received through the port are dropped unless an FDB entry with the MAC source
2786 address points to the port. The common use case is IEEE 802.1X where hosts can
2787 authenticate themselves by exchanging EAPOL frames with an authenticator. After
2788 authentication is complete, the user space control plane can install a matching
2789 FDB entry to allow traffic from the host to be forwarded by the bridge. When
2790 learning is enabled on a locked port, the
2791 .B no_linklocal_learn
2792 bridge option needs to be on to prevent the bridge from learning from received
2793 EAPOL frames. By default this flag is off.
2794
2795 .BR mab " { " on " | " off " }"
2796 - controls whether MAC Authentication Bypass (MAB) is enabled on the port or
2797 not. MAB can only be enabled on a locked port that has learning enabled. When
2798 enabled, FDB entries are learned from received traffic and have the "locked"
2799 FDB flag set. The flag can only be set by the kernel and it indicates that the
2800 FDB entry cannot be used to authenticate the corresponding host. User space can
2801 decide to authenticate the host by replacing the FDB entry and clearing the
2802 "locked" FDB flag. Locked FDB entries can roam to unlocked (authorized) ports
2803 in which case the "locked" flag is cleared. FDB entries cannot roam to locked
2804 ports regardless of MAB being enabled or not. Therefore, locked FDB entries are
2805 only created if an FDB entry with the given {MAC, VID} does not already exist.
2806 This behavior prevents unauthenticated hosts from disrupting traffic destined
2807 to already authenticated hosts. Locked FDB entries act like regular dynamic
2808 entries with respect to forwarding and aging. By default this flag is off.
2809
2810 .BI backup_port " DEVICE"
2811 - if the port loses carrier all traffic will be redirected to the
2812 configured backup port
2813
2814 .BR nobackup_port
2815 - removes the currently configured backup port
2816
2817 .BI backup_nhid " NHID"
2818 - the FDB nexthop object ID (see \fBip-nexthop\fR(8)) to attach to packets
2819 being redirected to a backup port that has VLAN tunnel mapping enabled (via the
2820 \fBvlan_tunnel\fR option). Setting a value of 0 (default) has the effect of not
2821 attaching any ID.
2822
2823 .in -8
2824
2825 .TP
2826 Bonding Slave Support
2827 For a link with master
2828 .B bond
2829 the following additional arguments are supported:
2830
2831 .B "ip link set type bond_slave"
2832 [
2833 .BI queue_id " ID"
2834 ] [
2835 .BI prio " PRIORITY"
2836 ]
2837
2838 .in +8
2839 .sp
2840 .BI queue_id " ID"
2841 - set the slave's queue ID (a 16bit unsigned value).
2842
2843 .sp
2844 .BI prio " PRIORITY"
2845 - set the slave's priority for active slave re-selection during failover
2846 (a 32bit signed value). This option only valid for active-backup(1),
2847 balance-tlb (5) and balance-alb (6) mode.
2848
2849 .in -8
2850
2851 .TP
2852 MACVLAN and MACVTAP Support
2853 Modify list of allowed macaddr for link in source mode.
2854
2855 .B "ip link set type { macvlan | macvap } "
2856 [
2857 .BI macaddr " " "" COMMAND " " MACADDR " ..."
2858 ]
2859
2860 Commands:
2861 .in +8
2862 .B add
2863 - add MACADDR to allowed list
2864 .sp
2865 .B set
2866 - replace allowed list
2867 .sp
2868 .B del
2869 - remove MACADDR from allowed list
2870 .sp
2871 .B flush
2872 - flush whole allowed list
2873 .sp
2874 .in -8
2875
2876 Update the broadcast/multicast queue length.
2877
2878 .B "ip link set type { macvlan | macvap } "
2879 [
2880 .BI bcqueuelen " LENGTH "
2881 ]
2882 [
2883 .BI bclim " LIMIT "
2884 ]
2885
2886 .in +8
2887 .BI bcqueuelen " LENGTH "
2888 - Set the length of the RX queue used to process broadcast and multicast packets.
2889 .IR LENGTH " must be a positive integer in the range [0-4294967295]."
2890 Setting a length of 0 will effectively drop all broadcast/multicast traffic.
2891 If not specified the macvlan driver default (1000) is used.
2892 Note that all macvlans that share the same underlying device are using the same
2893 .RB "queue. The parameter here is a " request ", the actual queue length used"
2894 will be the maximum length that any macvlan interface has requested.
2895 When listing device parameters both the bcqueuelen parameter
2896 as well as the actual used bcqueuelen are listed to better help
2897 the user understand the setting.
2898
2899 .BI bclim " LIMIT "
2900 - Set the threshold for broadcast queueing.
2901 .IR LIMIT " must be a 32-bit integer."
2902 Setting this to -1 disables broadcast queueing altogether. Otherwise
2903 a multicast address will be queued as broadcast if the number of devices
2904 using it is greater than the given value.
2905 .in -8
2906
2907 .TP
2908 DSA user port support
2909 For a link having the DSA user port type, the following additional arguments
2910 are supported:
2911
2912 .B "ip link set type dsa "
2913 [
2914 .BI conduit " DEVICE"
2915 ]
2916
2917 .in +8
2918 .sp
2919 .BI conduit " DEVICE"
2920 - change the DSA conduit (host network interface) responsible for handling the
2921 locally terminated traffic for the given DSA switch user port. For a
2922 description of which network interfaces are suitable for serving as conduit
2923 interfaces of this user port, please see
2924 https://docs.kernel.org/networking/dsa/configuration.html#affinity-of-user-ports-to-cpu-ports
2925 as well as what is supported by the driver in use.
2926
2927 .sp
2928 .BI master " DEVICE"
2929 - this is a synonym for "conduit".
2930
2931 .in -8
2932
2933 .SS ip link show - display device attributes
2934
2935 .TP
2936 .BI dev " NAME " (default)
2937 .I NAME
2938 specifies the network device to show.
2939
2940 .TP
2941 .BI group " GROUP "
2942 .I GROUP
2943 specifies what group of devices to show.
2944
2945 .TP
2946 .B up
2947 only display running interfaces.
2948
2949 .TP
2950 .B down
2951 only display not running interfaces.
2952
2953 .TP
2954 .BI master " DEVICE "
2955 .I DEVICE
2956 specifies the master device which enslaves devices to show.
2957
2958 .TP
2959 .BI vrf " NAME "
2960 .I NAME
2961 specifies the VRF which enslaves devices to show.
2962
2963 .TP
2964 .BI type " TYPE "
2965 .I TYPE
2966 specifies the type of devices to show.
2967
2968 Note that the type name is not checked against the list of supported types -
2969 instead it is sent as-is to the kernel. Later it is used to filter the returned
2970 interface list by comparing it with the relevant attribute in case the kernel
2971 didn't filter already. Therefore any string is accepted, but may lead to empty
2972 output.
2973
2974 .TP
2975 .B nomaster
2976 only show devices with no master
2977
2978 .TP
2979 .B novf
2980 only show devices with no VF info
2981
2982 .SS ip link xstats - display extended statistics
2983
2984 .TP
2985 .BI type " TYPE "
2986 .I TYPE
2987 specifies the type of devices to display extended statistics for.
2988
2989 .SS ip link afstats - display address-family specific statistics
2990
2991 .TP
2992 .BI dev " DEVICE "
2993 .I DEVICE
2994 specifies the device to display address-family statistics for.
2995
2996 .SS ip link help - display help
2997
2998 .PP
2999 .I "TYPE"
3000 specifies which help of link type to display.
3001
3002 .SS
3003 .I GROUP
3004 may be a number or a string from
3005 .BR /usr/share/iproute2/group " or " /etc/iproute2/group
3006 which can be manually filled and has precedence if exists.
3007
3008 .SH "EXAMPLES"
3009 .PP
3010 ip link show
3011 .RS 4
3012 Shows the state of all network interfaces on the system.
3013 .RE
3014 .PP
3015 ip link show type bridge
3016 .RS 4
3017 Shows the bridge devices.
3018 .RE
3019 .PP
3020 ip link show type vlan
3021 .RS 4
3022 Shows the vlan devices.
3023 .RE
3024 .PP
3025 ip link show master br0
3026 .RS 4
3027 Shows devices enslaved by br0
3028 .RE
3029 .PP
3030 ip link set dev ppp0 mtu 1400
3031 .RS 4
3032 Change the MTU the ppp0 device.
3033 .RE
3034 .PP
3035 ip link add link eth0 name eth0.10 type vlan id 10
3036 .RS 4
3037 Creates a new vlan device eth0.10 on device eth0.
3038 .RE
3039 .PP
3040 ip link delete dev eth0.10
3041 .RS 4
3042 Removes vlan device.
3043 .RE
3044
3045 ip link help gre
3046 .RS 4
3047 Display help for the gre link type.
3048 .RE
3049 .PP
3050 ip link add name tun1 type ipip remote 192.168.1.1
3051 local 192.168.1.2 ttl 225 encap gue encap-sport auto
3052 encap-dport 5555 encap-csum encap-remcsum
3053 .RS 4
3054 Creates an IPIP that is encapsulated with Generic UDP Encapsulation,
3055 and the outer UDP checksum and remote checksum offload are enabled.
3056 .RE
3057 .PP
3058 ip link set dev eth0 xdp obj prog.o
3059 .RS 4
3060 Attaches a XDP/BPF program to device eth0, where the program is
3061 located in prog.o, section "prog" (default section). In case a
3062 XDP/BPF program is already attached, throw an error.
3063 .RE
3064 .PP
3065 ip -force link set dev eth0 xdp obj prog.o sec foo
3066 .RS 4
3067 Attaches a XDP/BPF program to device eth0, where the program is
3068 located in prog.o, section "foo". In case a XDP/BPF program is
3069 already attached, it will be overridden by the new one.
3070 .RE
3071 .PP
3072 ip -force link set dev eth0 xdp pinned /sys/fs/bpf/foo
3073 .RS 4
3074 Attaches a XDP/BPF program to device eth0, where the program was
3075 previously pinned as an object node into BPF file system under
3076 name foo.
3077 .RE
3078 .PP
3079 ip link set dev eth0 xdp off
3080 .RS 4
3081 If a XDP/BPF program is attached on device eth0, detach it and
3082 effectively turn off XDP for device eth0.
3083 .RE
3084 .PP
3085 ip link add link wpan0 lowpan0 type lowpan
3086 .RS 4
3087 Creates a 6LoWPAN interface named lowpan0 on the underlying
3088 IEEE 802.15.4 device wpan0.
3089 .RE
3090 .PP
3091 ip link add dev ip6erspan11 type ip6erspan seq key 102
3092 local fc00:100::2 remote fc00:100::1
3093 erspan_ver 2 erspan_dir ingress erspan_hwid 17
3094 .RS 4
3095 Creates a IP6ERSPAN version 2 interface named ip6erspan00.
3096 .RE
3097 .PP
3098 ip link set dev swp0 type dsa conduit eth1
3099 .RS 4
3100 Changes the conduit interface of the swp0 user port to eth1.
3101 .RE
3102
3103 .SH SEE ALSO
3104 .br
3105 .BR ip (8),
3106 .BR ip-netns (8),
3107 .BR ethtool (8),
3108 .BR iptables (8)
3109
3110 .SH AUTHOR
3111 Original Manpage by Michail Litvak <[email protected]>