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