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