Debian Codegraph @

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