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