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