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