]> git.proxmox.com Git - mirror_iproute2.git/blob - man/man8/ip-link.8.in
Merge branch 'master' into net-next
[mirror_iproute2.git] / man / man8 / ip-link.8.in
1 .TH IP\-LINK 8 "13 Dec 2012" "iproute2" "Linux"
2 .SH "NAME"
3 ip-link \- network device configuration
4 .SH "SYNOPSIS"
5 .sp
6 .ad l
7 .in +8
8 .ti -8
9 .B ip link
10 .RI " { " COMMAND " | "
11 .BR help " }"
12 .sp
13
14 .ti -8
15 .BI "ip link add"
16 .RB "[ " link
17 .IR DEVICE " ]"
18 .RB "[ " name " ]"
19 .I NAME
20 .br
21 .RB "[ " txqueuelen
22 .IR PACKETS " ]"
23 .br
24 .RB "[ " address
25 .IR LLADDR " ]"
26 .RB "[ " broadcast
27 .IR LLADDR " ]"
28 .br
29 .RB "[ " mtu
30 .IR MTU " ]"
31 .RB "[ " index
32 .IR IDX " ]"
33 .br
34 .RB "[ " numtxqueues
35 .IR QUEUE_COUNT " ]"
36 .RB "[ " numrxqueues
37 .IR QUEUE_COUNT " ]"
38 .br
39 .BI type " TYPE"
40 .RI "[ " ARGS " ]"
41
42 .ti -8
43 .BR "ip link delete " {
44 .IR DEVICE " | "
45 .BI "group " GROUP
46 }
47 .BI type " TYPE"
48 .RI "[ " ARGS " ]"
49
50 .ti -8
51 .BR "ip link set " {
52 .IR DEVICE " | "
53 .BI "group " GROUP
54 }
55 .br
56 .RB "[ { " up " | " down " } ]"
57 .br
58 .RB "[ " type
59 .IR "ETYPE TYPE_ARGS" " ]"
60 .br
61 .RB "[ " arp " { " on " | " off " } ]"
62 .br
63 .RB "[ " dynamic " { " on " | " off " } ]"
64 .br
65 .RB "[ " multicast " { " on " | " off " } ]"
66 .br
67 .RB "[ " allmulticast " { " on " | " off " } ]"
68 .br
69 .RB "[ " promisc " { " on " | " off " } ]"
70 .br
71 .RB "[ " protodown " { " on " | " off " } ]"
72 .br
73 .RB "[ " trailers " { " on " | " off " } ]"
74 .br
75 .RB "[ " txqueuelen
76 .IR PACKETS " ]"
77 .br
78 .RB "[ " name
79 .IR NEWNAME " ]"
80 .br
81 .RB "[ " address
82 .IR LLADDR " ]"
83 .br
84 .RB "[ " broadcast
85 .IR LLADDR " ]"
86 .br
87 .RB "[ " mtu
88 .IR MTU " ]"
89 .br
90 .RB "[ " netns " {"
91 .IR PID " | " NETNSNAME " } ]"
92 .br
93 .RB "[ " link-netnsid
94 .IR ID " ]"
95 .br
96 .RB "[ " alias
97 .IR NAME " ]"
98 .br
99 .RB "[ " vf
100 .IR NUM " ["
101 .B mac
102 .IR LLADDR " ]"
103 .br
104 .in +9
105 .RI "[ " VFVLAN-LIST " ]"
106 .br
107 .RB "[ " rate
108 .IR TXRATE " ]"
109 .br
110 .RB "[ " max_tx_rate
111 .IR TXRATE " ]"
112 .br
113 .RB "[ " min_tx_rate
114 .IR TXRATE " ]"
115 .br
116 .RB "[ " spoofchk " { " on " | " off " } ]"
117 .br
118 .RB "[ " query_rss " { " on " | " off " } ]"
119 .br
120 .RB "[ " state " { " auto " | " enable " | " disable " } ]"
121 .br
122 .RB "[ " trust " { " on " | " off " } ]"
123 .br
124 .RB "[ " node_guid " eui64 ]"
125 .br
126 .RB "[ " port_guid " eui64 ] ]"
127 .br
128 .in -9
129 .RB "[ " xdp " { " off " | "
130 .br
131 .in +8
132 .BR object
133 .IR FILE
134 .RB "[ " section
135 .IR NAME " ]"
136 .RB "[ " verbose " ] |"
137 .br
138 .BR pinned
139 .IR FILE " } ]"
140 .br
141 .in -8
142 .RB "[ " master
143 .IR DEVICE " ]"
144 .br
145 .RB "[ " nomaster " ]"
146 .br
147 .RB "[ " vrf
148 .IR NAME " ]"
149 .br
150 .RB "[ " addrgenmode " { " eui64 " | " none " | " stable_secret " | " random " } ]"
151 .br
152 .RB "[ " macaddr " { " flush " | { " add " | " del " } "
153 .IR MACADDR " | set [ "
154 .IR MACADDR " [ "
155 .IR MACADDR " [ ... ] ] ] } ]"
156 .br
157
158 .ti -8
159 .B ip link show
160 .RI "[ " DEVICE " | "
161 .B group
162 .IR GROUP " ] ["
163 .BR up " ] ["
164 .B master
165 .IR DEVICE " ] ["
166 .B type
167 .IR ETYPE " ]"
168 .B vrf
169 .IR NAME " ]"
170
171 .ti -8
172 .B ip link xstats
173 .BI type " TYPE"
174 .RI "[ " ARGS " ]"
175
176 .ti -8
177 .B ip link help
178 .RI "[ " TYPE " ]"
179
180 .ti -8
181 .IR TYPE " := [ "
182 .BR bridge " | "
183 .BR bond " | "
184 .BR can " | "
185 .BR dummy " | "
186 .BR hsr " | "
187 .BR ifb " | "
188 .BR ipoib " |"
189 .BR macvlan " | "
190 .BR macvtap " | "
191 .BR vcan " | "
192 .BR veth " | "
193 .BR vlan " | "
194 .BR vxlan " |"
195 .BR ip6tnl " |"
196 .BR ipip " |"
197 .BR sit " |"
198 .BR gre " |"
199 .BR gretap " |"
200 .BR ip6gre " |"
201 .BR ip6gretap " |"
202 .BR vti " |"
203 .BR nlmon " |"
204 .BR ipvlan " |"
205 .BR lowpan " |"
206 .BR geneve " |"
207 .BR vrf " |"
208 .BR macsec " ]"
209
210 .ti -8
211 .IR ETYPE " := [ " TYPE " |"
212 .BR bridge_slave " | " bond_slave " ]"
213
214 .ti -8
215 .IR VFVLAN-LIST " := [ " VFVLAN-LIST " ] " VFVLAN
216
217 .ti -8
218 .IR VFVLAN " := "
219 .RB "[ " vlan
220 .IR VLANID " [ "
221 .B qos
222 .IR VLAN-QOS " ] ["
223 .B proto
224 .IR VLAN-PROTO " ] ]"
225
226 .SH "DESCRIPTION"
227 .SS ip link add - add virtual link
228
229 .TP
230 .BI link " DEVICE "
231 specifies the physical device to act operate on.
232
233 .I NAME
234 specifies the name of the new virtual device.
235
236 .I TYPE
237 specifies the type of the new device.
238 .sp
239 Link types:
240
241 .in +8
242 .B bridge
243 - Ethernet Bridge device
244 .sp
245 .B bond
246 - Bonding device
247 .B can
248 - Controller Area Network interface
249 .sp
250 .B dummy
251 - Dummy network interface
252 .sp
253 .B hsr
254 - High-availability Seamless Redundancy device
255 .sp
256 .B ifb
257 - Intermediate Functional Block device
258 .sp
259 .B ipoib
260 - IP over Infiniband device
261 .sp
262 .B macvlan
263 - Virtual interface base on link layer address (MAC)
264 .sp
265 .B macvtap
266 - Virtual interface based on link layer address (MAC) and TAP.
267 .sp
268 .B vcan
269 - Virtual Controller Area Network interface
270 .sp
271 .B veth
272 - Virtual ethernet interface
273 .sp
274 .BR vlan
275 - 802.1q tagged virtual LAN interface
276 .sp
277 .BR vxlan
278 - Virtual eXtended LAN
279 .sp
280 .BR ip6tnl
281 - Virtual tunnel interface IPv4|IPv6 over IPv6
282 .sp
283 .BR ipip
284 - Virtual tunnel interface IPv4 over IPv4
285 .sp
286 .BR sit
287 - Virtual tunnel interface IPv6 over IPv4
288 .sp
289 .BR gre
290 - Virtual tunnel interface GRE over IPv4
291 .sp
292 .BR gretap
293 - Virtual L2 tunnel interface GRE over IPv4
294 .sp
295 .BR ip6gre
296 - Virtual tunnel interface GRE over IPv6
297 .sp
298 .BR ip6gretap
299 - Virtual L2 tunnel interface GRE over IPv6
300 .sp
301 .BR vti
302 - Virtual tunnel interface
303 .sp
304 .BR nlmon
305 - Netlink monitoring device
306 .sp
307 .BR ipvlan
308 - Interface for L3 (IPv6/IPv4) based VLANs
309 .sp
310 .BR lowpan
311 - Interface for 6LoWPAN (IPv6) over IEEE 802.15.4 / Bluetooth
312 .sp
313 .BR geneve
314 - GEneric NEtwork Virtualization Encapsulation
315 .sp
316 .BR macsec
317 - Interface for IEEE 802.1AE MAC Security (MACsec)
318 .sp
319 .BR vrf
320 - Interface for L3 VRF domains
321 .in -8
322
323 .TP
324 .BI numtxqueues " QUEUE_COUNT "
325 specifies the number of transmit queues for new device.
326
327 .TP
328 .BI numrxqueues " QUEUE_COUNT "
329 specifies the number of receive queues for new device.
330
331 .TP
332 .BI index " IDX "
333 specifies the desired index of the new virtual device. The link creation fails, if the index is busy.
334
335 .TP
336 VLAN Type Support
337 For a link of type
338 .I VLAN
339 the following additional arguments are supported:
340
341 .BI "ip link add
342 .BI link " DEVICE "
343 .BI name " NAME "
344 .B "type vlan"
345 [
346 .BI protocol " VLAN_PROTO "
347 ]
348 .BI id " VLANID "
349 [
350 .BR reorder_hdr " { " on " | " off " } "
351 ]
352 [
353 .BR gvrp " { " on " | " off " } "
354 ]
355 [
356 .BR mvrp " { " on " | " off " } "
357 ]
358 [
359 .BR loose_binding " { " on " | " off " } "
360 ]
361 [
362 .BI ingress-qos-map " QOS-MAP "
363 ]
364 [
365 .BI egress-qos-map " QOS-MAP "
366 ]
367
368 .in +8
369 .sp
370 .BI protocol " VLAN_PROTO "
371 - either 802.1Q or 802.1ad.
372
373 .BI id " VLANID "
374 - specifies the VLAN Identifer to use. Note that numbers with a leading " 0 " or " 0x " are interpreted as octal or hexadeimal, respectively.
375
376 .BR reorder_hdr " { " on " | " off " } "
377 - specifies whether ethernet headers are reordered or not (default is
378 .BR on ")."
379
380 .in +4
381 If
382 .BR reorder_hdr " is " on
383 then VLAN header will be not inserted immediately but only before passing to the
384 physical device (if this device does not support VLAN offloading), the similar
385 on the RX direction - by default the packet will be untagged before being
386 received by VLAN device. Reordering allows to accelerate tagging on egress and
387 to hide VLAN header on ingress so the packet looks like regular Ethernet packet,
388 at the same time it might be confusing for packet capture as the VLAN header
389 does not exist within the packet.
390
391 VLAN offloading can be checked by
392 .BR ethtool "(8):"
393 .in +4
394 .sp
395 .B ethtool -k
396 <phy_dev> |
397 .RB grep " tx-vlan-offload"
398 .sp
399 .in -4
400 where <phy_dev> is the physical device to which VLAN device is bound.
401 .in -4
402
403 .BR gvrp " { " on " | " off " } "
404 - specifies whether this VLAN should be registered using GARP VLAN Registration Protocol.
405
406 .BR mvrp " { " on " | " off " } "
407 - specifies whether this VLAN should be registered using Multiple VLAN Registration Protocol.
408
409 .BR loose_binding " { " on " | " off " } "
410 - specifies whether the VLAN device state is bound to the physical device state.
411
412 .BI ingress-qos-map " QOS-MAP "
413 - defines a mapping of VLAN header prio field to the Linux internal packet
414 priority on incoming frames. The format is FROM:TO with multiple mappings
415 separated by spaces.
416
417 .BI egress-qos-map " QOS-MAP "
418 - defines a mapping of Linux internal packet priority to VLAN header prio field
419 but for outgoing frames. The format is the same as for ingress-qos-map.
420 .in +4
421
422 Linux packet priority can be set by
423 .BR iptables "(8)":
424 .in +4
425 .sp
426 .B iptables
427 -t mangle -A POSTROUTING [...] -j CLASSIFY --set-class 0:4
428 .sp
429 .in -4
430 and this "4" priority can be used in the egress qos mapping to set VLAN prio "5":
431 .sp
432 .in +4
433 .B ip
434 link set veth0.10 type vlan egress 4:5
435 .in -4
436 .in -4
437 .in -8
438
439 .TP
440 VXLAN Type Support
441 For a link of type
442 .I VXLAN
443 the following additional arguments are supported:
444
445 .BI "ip link add " DEVICE
446 .BI type " vxlan " id " VNI"
447 [
448 .BI dev " PHYS_DEV "
449 .RB " ] [ { " group " | " remote " } "
450 .I IPADDR
451 ] [
452 .B local
453 .RI "{ "IPADDR " | "any " } "
454 ] [
455 .BI ttl " TTL "
456 ] [
457 .BI tos " TOS "
458 ] [
459 .BI flowlabel " FLOWLABEL "
460 ] [
461 .BI dstport " PORT "
462 ] [
463 .BI srcport " MIN MAX "
464 ] [
465 .RB [ no ] learning
466 ] [
467 .RB [ no ] proxy
468 ] [
469 .RB [ no ] rsc
470 ] [
471 .RB [ no ] l2miss
472 ] [
473 .RB [ no ] l3miss
474 ] [
475 .RB [ no ] udpcsum
476 ] [
477 .RB [ no ] udp6zerocsumtx
478 ] [
479 .RB [ no ] udp6zerocsumrx
480 ] [
481 .BI ageing " SECONDS "
482 ] [
483 .BI maxaddress " NUMBER "
484 ] [
485 .RB [ no ] external
486 ] [
487 .B gbp
488 ] [
489 .B gpe
490 ]
491
492 .in +8
493 .sp
494 .BI id " VNI "
495 - specifies the VXLAN Network Identifer (or VXLAN Segment
496 Identifier) to use.
497
498 .BI dev " PHYS_DEV"
499 - specifies the physical device to use for tunnel endpoint communication.
500
501 .sp
502 .BI group " IPADDR"
503 - specifies the multicast IP address to join.
504 This parameter cannot be specified with the
505 .B remote
506 parameter.
507
508 .sp
509 .BI remote " IPADDR"
510 - specifies the unicast destination IP address to use in outgoing packets
511 when the destination link layer address is not known in the VXLAN device
512 forwarding database. This parameter cannot be specified with the
513 .B group
514 parameter.
515
516 .sp
517 .BI local " IPADDR"
518 - specifies the source IP address to use in outgoing packets.
519
520 .sp
521 .BI ttl " TTL"
522 - specifies the TTL value to use in outgoing packets.
523
524 .sp
525 .BI tos " TOS"
526 - specifies the TOS value to use in outgoing packets.
527
528 .sp
529 .BI flowlabel " FLOWLABEL"
530 - specifies the flow label to use in outgoing packets.
531
532 .sp
533 .BI dstport " PORT"
534 - specifies the UDP destination port to communicate to the remote VXLAN tunnel endpoint.
535
536 .sp
537 .BI srcport " MIN MAX"
538 - specifies the range of port numbers to use as UDP
539 source ports to communicate to the remote VXLAN tunnel endpoint.
540
541 .sp
542 .RB [ no ] learning
543 - specifies if unknown source link layer addresses and IP addresses
544 are entered into the VXLAN device forwarding database.
545
546 .sp
547 .RB [ no ] rsc
548 - specifies if route short circuit is turned on.
549
550 .sp
551 .RB [ no ] proxy
552 - specifies ARP proxy is turned on.
553
554 .sp
555 .RB [ no ] l2miss
556 - specifies if netlink LLADDR miss notifications are generated.
557
558 .sp
559 .RB [ no ] l3miss
560 - specifies if netlink IP ADDR miss notifications are generated.
561
562 .sp
563 .RB [ no ] udpcsum
564 - specifies if UDP checksum is calculated for transmitted packets over IPv4.
565
566 .sp
567 .RB [ no ] udp6zerocsumtx
568 - skip UDP checksum calculation for transmitted packets over IPv6.
569
570 .sp
571 .RB [ no ] udp6zerocsumrx
572 - allow incoming UDP packets over IPv6 with zero checksum field.
573
574 .sp
575 .BI ageing " SECONDS"
576 - specifies the lifetime in seconds of FDB entries learnt by the kernel.
577
578 .sp
579 .BI maxaddress " NUMBER"
580 - specifies the maximum number of FDB entries.
581
582 .sp
583 .RB [ no ] external
584 - specifies whether an external control plane
585 .RB "(e.g. " "ip route encap" )
586 or the internal FDB should be used.
587
588 .sp
589 .B gbp
590 - enables the Group Policy extension (VXLAN-GBP).
591
592 .in +4
593 Allows to transport group policy context across VXLAN network peers.
594 If enabled, includes the mark of a packet in the VXLAN header for outgoing
595 packets and fills the packet mark based on the information found in the
596 VXLAN header for incomming packets.
597
598 Format of upper 16 bits of packet mark (flags);
599
600 .in +2
601 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
602 .br
603 |-|-|-|-|-|-|-|-|-|D|-|-|A|-|-|-|
604 .br
605 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
606
607 .B D :=
608 Don't Learn bit. When set, this bit indicates that the egress
609 VTEP MUST NOT learn the source address of the encapsulated frame.
610
611 .B A :=
612 Indicates that the group policy has already been applied to
613 this packet. Policies MUST NOT be applied by devices when the A bit is set.
614 .in -2
615
616 Format of lower 16 bits of packet mark (policy ID):
617
618 .in +2
619 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
620 .br
621 | Group Policy ID |
622 .br
623 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
624 .in -2
625
626 Example:
627 iptables -A OUTPUT [...] -j MARK --set-mark 0x800FF
628
629 .in -4
630
631 .sp
632 .B gpe
633 - enables the Generic Protocol extension (VXLAN-GPE). Currently, this is
634 only supported together with the
635 .B external
636 keyword.
637
638 .in -8
639
640 .TP
641 GRE, IPIP, SIT Type Support
642 For a link of types
643 .I GRE/IPIP/SIT
644 the following additional arguments are supported:
645
646 .BI "ip link add " DEVICE
647 .BR type " { " gre " | " ipip " | " sit " }"
648 .BI " remote " ADDR " local " ADDR
649 [
650 .BR encap " { " fou " | " gue " | " none " }"
651 ] [
652 .BR encap-sport " { " \fIPORT " | " auto " }"
653 ] [
654 .BI "encap-dport " PORT
655 ] [
656 .RB [ no ] encap-csum
657 ] [
658 .RB [ no ] encap-remcsum
659 ]
660
661 .in +8
662 .sp
663 .BI remote " ADDR "
664 - specifies the remote address of the tunnel.
665
666 .sp
667 .BI local " ADDR "
668 - specifies the fixed local address for tunneled packets.
669 It must be an address on another interface on this host.
670
671 .sp
672 .BR encap " { " fou " | " gue " | " none " }"
673 - specifies type of secondary UDP encapsulation. "fou" indicates
674 Foo-Over-UDP, "gue" indicates Generic UDP Encapsulation.
675
676 .sp
677 .BR encap-sport " { " \fIPORT " | " auto " }"
678 - specifies the source port in UDP encapsulation.
679 .IR PORT
680 indicates the port by number, "auto"
681 indicates that the port number should be chosen automatically
682 (the kernel picks a flow based on the flow hash of the
683 encapsulated packet).
684
685 .sp
686 .RB [ no ] encap-csum
687 - specifies if UDP checksums are enabled in the secondary
688 encapsulation.
689
690 .sp
691 .RB [ no ] encap-remcsum
692 - specifies if Remote Checksum Offload is enabled. This is only
693 applicable for Generic UDP Encapsulation.
694
695 .in -8
696
697 .TP
698 IP6GRE/IP6GRETAP Type Support
699 For a link of type
700 .I IP6GRE/IP6GRETAP
701 the following additional arguments are supported:
702
703 .BI "ip link add " DEVICE
704 .BR type " { " ip6gre " | " ip6gretap " }"
705 .BI remote " ADDR " local " ADDR"
706 [
707 .RB [ i | o ] seq
708 ] [
709 .RB [ i | o ] key
710 .I KEY
711 ] [
712 .RB [ i | o ] csum
713 ] [
714 .BI hoplimit " TTL "
715 ] [
716 .BI encaplimit " ELIM "
717 ] [
718 .BI tclass " TCLASS "
719 ] [
720 .BI flowlabel " FLOWLABEL "
721 ] [
722 .BI "dscp inherit"
723 ] [
724 .BI dev " PHYS_DEV "
725 ]
726
727 .in +8
728 .sp
729 .BI remote " ADDR "
730 - specifies the remote IPv6 address of the tunnel.
731
732 .sp
733 .BI local " ADDR "
734 - specifies the fixed local IPv6 address for tunneled packets.
735 It must be an address on another interface on this host.
736
737 .sp
738 .RB [ i | o ] seq
739 - serialize packets.
740 The
741 .B oseq
742 flag enables sequencing of outgoing packets.
743 The
744 .B iseq
745 flag requires that all input packets are serialized.
746
747 .sp
748 .RB [ i | o ] key " \fIKEY"
749 - use keyed GRE with key
750 .IR KEY ". "KEY
751 is either a number or an IPv4 address-like dotted quad.
752 The
753 .B key
754 parameter specifies the same key to use in both directions.
755 The
756 .BR ikey " and " okey
757 parameters specify different keys for input and output.
758
759 .sp
760 .RB [ i | o ] csum
761 - generate/require checksums for tunneled packets.
762 The
763 .B ocsum
764 flag calculates checksums for outgoing packets.
765 The
766 .B icsum
767 flag requires that all input packets have the correct
768 checksum. The
769 .B csum
770 flag is equivalent to the combination
771 .BR "icsum ocsum" .
772
773 .sp
774 .BI hoplimit " TTL"
775 - specifies Hop Limit value to use in outgoing packets.
776
777 .sp
778 .BI encaplimit " ELIM"
779 - specifies a fixed encapsulation limit. Default is 4.
780
781 .sp
782 .BI flowlabel " FLOWLABEL"
783 - specifies a fixed flowlabel.
784
785 .sp
786 .BI tclass " TCLASS"
787 - specifies the traffic class field on
788 tunneled packets, which can be specified as either a two-digit
789 hex value (e.g. c0) or a predefined string (e.g. internet).
790 The value
791 .B inherit
792 causes the field to be copied from the original IP header. The
793 values
794 .BI "inherit/" STRING
795 or
796 .BI "inherit/" 00 ".." ff
797 will set the field to
798 .I STRING
799 or
800 .IR 00 ".." ff
801 when tunneling non-IP packets. The default value is 00.
802
803 .in -8
804
805 .TP
806 IPoIB Type Support
807 For a link of type
808 .I IPoIB
809 the following additional arguments are supported:
810
811 .BI "ip link add " DEVICE " name " NAME
812 .BR "type ipoib " [ " pkey \fIPKEY" " ] [ " mode " \fIMODE \fR]"
813
814 .in +8
815 .sp
816 .BI pkey " PKEY "
817 - specifies the IB P-Key to use.
818
819 .BI mode " MODE "
820 - specifies the mode (datagram or connected) to use.
821
822 .TP
823 GENEVE Type Support
824 For a link of type
825 .I GENEVE
826 the following additional arguments are supported:
827
828 .BI "ip link add " DEVICE
829 .BI type " geneve " id " VNI " remote " IPADDR"
830 [
831 .BI ttl " TTL "
832 ] [
833 .BI tos " TOS "
834 ] [
835 .BI flowlabel " FLOWLABEL "
836 ] [
837 .BI dstport " PORT"
838 ] [
839 .RB [ no ] external
840 ] [
841 .RB [ no ] udpcsum
842 ] [
843 .RB [ no ] udp6zerocsumtx
844 ] [
845 .RB [ no ] udp6zerocsumrx
846 ]
847
848 .in +8
849 .sp
850 .BI id " VNI "
851 - specifies the Virtual Network Identifer to use.
852
853 .sp
854 .BI remote " IPADDR"
855 - specifies the unicast destination IP address to use in outgoing packets.
856
857 .sp
858 .BI ttl " TTL"
859 - specifies the TTL value to use in outgoing packets.
860
861 .sp
862 .BI tos " TOS"
863 - specifies the TOS value to use in outgoing packets.
864
865 .sp
866 .BI flowlabel " FLOWLABEL"
867 - specifies the flow label to use in outgoing packets.
868
869 .sp
870 .BI dstport " PORT"
871 - select a destination port other than the default of 6081.
872
873 .sp
874 .RB [ no ] external
875 - make this tunnel externally controlled (or not, which is the default). This
876 flag is mutually exclusive with the
877 .BR id ,
878 .BR remote ,
879 .BR ttl ,
880 .BR tos " and " flowlabel
881 options.
882
883 .sp
884 .RB [ no ] udpcsum
885 - specifies if UDP checksum is calculated for transmitted packets over IPv4.
886
887 .sp
888 .RB [ no ] udp6zerocsumtx
889 - skip UDP checksum calculation for transmitted packets over IPv6.
890
891 .sp
892 .RB [ no ] udp6zerocsumrx
893 - allow incoming UDP packets over IPv6 with zero checksum field.
894
895 .in -8
896
897 .TP
898 MACVLAN and MACVTAP Type Support
899 For a link of type
900 .I MACVLAN
901 or
902 .I MACVTAP
903 the following additional arguments are supported:
904
905 .BI "ip link add link " DEVICE " name " NAME
906 .BR type " { " macvlan " | " macvtap " } "
907 .BR mode " { " private " | " vepa " | " bridge " | " passthru
908 .RB " [ " nopromisc " ] | " source " } "
909
910 .in +8
911 .sp
912 .BR type " { " macvlan " | " macvtap " } "
913 - specifies the link type to use.
914 .BR macvlan " creates just a virtual interface, while "
915 .BR macvtap " in addition creates a character device "
916 .BR /dev/tapX " to be used just like a " tuntap " device."
917
918 .B mode private
919 - Do not allow communication between
920 .B macvlan
921 instances on the same physical interface, even if the external switch supports
922 hairpin mode.
923
924 .B mode vepa
925 - Virtual Ethernet Port Aggregator mode. Data from one
926 .B macvlan
927 instance to the other on the same physical interface is transmitted over the
928 physical interface. Either the attached switch needs to support hairpin mode,
929 or there must be a TCP/IP router forwarding the packets in order to allow
930 communication. This is the default mode.
931
932 .B mode bridge
933 - In bridge mode, all endpoints are directly connected to each other,
934 communication is not redirected through the physical interface's peer.
935
936 .BR mode " " passthru " [ " nopromisc " ] "
937 - This mode gives more power to a single endpoint, usually in
938 .BR macvtap " mode. It is not allowed for more than one endpoint on the same "
939 physical interface. All traffic will be forwarded to this endpoint, allowing
940 virtio guests to change MAC address or set promiscuous mode in order to bridge
941 the interface or create vlan interfaces on top of it. By default, this mode
942 forces the underlying interface into promiscuous mode. Passing the
943 .BR nopromisc " flag prevents this, so the promisc flag may be controlled "
944 using standard tools.
945
946 .B mode source
947 - allows one to set a list of allowed mac address, which is used to match
948 against source mac address from received frames on underlying interface. This
949 allows creating mac based VLAN associations, instead of standard port or tag
950 based. The feature is useful to deploy 802.1x mac based behavior,
951 where drivers of underlying interfaces doesn't allows that.
952 .in -8
953
954 .TP
955 High-availability Seamless Redundancy (HSR) Support
956 For a link of type
957 .I HSR
958 the following additional arguments are supported:
959
960 .BI "ip link add link " DEVICE " name " NAME " type hsr"
961 .BI slave1 " SLAVE1-IF " slave2 " SLAVE2-IF "
962 .RB [ " supervision"
963 .IR ADDR-BYTE " ] ["
964 .BR version " { " 0 " | " 1 " } ]"
965
966 .in +8
967 .sp
968 .BR type " hsr "
969 - specifies the link type to use, here HSR.
970
971 .BI slave1 " SLAVE1-IF "
972 - Specifies the physical device used for the first of the two ring ports.
973
974 .BI slave2 " SLAVE2-IF "
975 - Specifies the physical device used for the second of the two ring ports.
976
977 .BI supervision " ADDR-BYTE"
978 - The last byte of the multicast address used for HSR supervision frames.
979 Default option is "0", possible values 0-255.
980
981 .BR version " { " 0 " | " 1 " }"
982 - Selects the protocol version of the interface. Default option is "0", which
983 corresponds to the 2010 version of the HSR standard. Option "1" activates the
984 2012 version.
985 .in -8
986
987 .TP
988 MACsec Type Support
989 For a link of type
990 .I MACsec
991 the following additional arguments are supported:
992
993 .BI "ip link add link " DEVICE " name " NAME " type macsec"
994 [ [
995 .BI address " <lladdr>"
996 ]
997 .BI port " PORT"
998 |
999 .BI sci " SCI"
1000 ] [
1001 .BI cipher " CIPHER_SUITE"
1002 ] [
1003 .BR icvlen " { "
1004 .IR 8..16 " } ] ["
1005 .BR encrypt " {"
1006 .BR on " | " off " } ] [ "
1007 .BR send_sci " { " on " | " off " } ] ["
1008 .BR end_station " { " on " | " off " } ] ["
1009 .BR scb " { " on " | " off " } ] ["
1010 .BR protect " { " on " | " off " } ] ["
1011 .BR replay " { " on " | " off " }"
1012 .BR window " { "
1013 .IR 0..2^32-1 " } ] ["
1014 .BR validate " { " strict " | " check " | " disabled " } ] ["
1015 .BR encodingsa " { "
1016 .IR 0..3 " } ]"
1017
1018 .in +8
1019 .sp
1020 .BI address " <lladdr> "
1021 - sets the system identifier component of secure channel for this MACsec device.
1022
1023 .sp
1024 .BI port " PORT "
1025 - sets the port number component of secure channel for this MACsec device, in a
1026 range from 1 to 65535 inclusive. Numbers with a leading " 0 " or " 0x " are
1027 interpreted as octal and hexadecimal, respectively.
1028
1029 .sp
1030 .BI sci " SCI "
1031 - sets the secure channel identifier for this MACsec device.
1032 .I SCI
1033 is a 64bit wide number in hexadecimal format.
1034
1035 .sp
1036 .BI cipher " CIPHER_SUITE "
1037 - defines the cipher suite to use.
1038
1039 .sp
1040 .BI icvlen " LENGTH "
1041 - sets the length of the Integrity Check Value (ICV).
1042
1043 .sp
1044 .BR "encrypt on " or " encrypt off"
1045 - switches between authenticated encryption, or authenticity mode only.
1046
1047 .sp
1048 .BR "send_sci on " or " send_sci off"
1049 - specifies whether the SCI is included in every packet, or only when it is necessary.
1050
1051 .sp
1052 .BR "end_station on " or " end_station off"
1053 - sets the End Station bit.
1054
1055 .sp
1056 .BR "scb on " or " scb off"
1057 - sets the Single Copy Broadcast bit.
1058
1059 .sp
1060 .BR "protect on " or " protect off"
1061 - enables MACsec protection on the device.
1062
1063 .sp
1064 .BR "replay on " or " replay off"
1065 - enables replay protection on the device.
1066
1067 .in +8
1068
1069 .sp
1070 .BI window " SIZE "
1071 - sets the size of the replay window.
1072
1073 .in -8
1074
1075 .sp
1076 .BR "validate strict " or " validate check " or " validate disabled"
1077 - sets the validation mode on the device.
1078
1079 .sp
1080 .BI encodingsa " AN "
1081 - sets the active secure association for transmission.
1082
1083 .in -8
1084
1085 .TP
1086 VRF Type Support
1087 For a link of type
1088 .I VRF
1089 the following additional arguments are supported:
1090
1091 .BI "ip link add " DEVICE " type vrf table " TABLE
1092
1093 .in +8
1094 .sp
1095 .BR table " table id associated with VRF device"
1096
1097 .in -8
1098
1099 .SS ip link delete - delete virtual link
1100
1101 .TP
1102 .BI dev " DEVICE "
1103 specifies the virtual device to act operate on.
1104
1105 .TP
1106 .BI group " GROUP "
1107 specifies the group of virtual links to delete. Group 0 is not allowed to be
1108 deleted since it is the default group.
1109
1110 .TP
1111 .BI type " TYPE "
1112 specifies the type of the device.
1113
1114 .SS ip link set - change device attributes
1115
1116 .PP
1117 .B Warning:
1118 If multiple parameter changes are requested,
1119 .B ip
1120 aborts immediately after any of the changes have failed.
1121 This is the only case when
1122 .B ip
1123 can move the system to an unpredictable state. The solution
1124 is to avoid changing several parameters with one
1125 .B ip link set
1126 call.
1127
1128 .TP
1129 .BI dev " DEVICE "
1130 .I DEVICE
1131 specifies network device to operate on. When configuring SR-IOV Virtual Function
1132 (VF) devices, this keyword should specify the associated Physical Function (PF)
1133 device.
1134
1135 .TP
1136 .BI group " GROUP "
1137 .I GROUP
1138 has a dual role: If both group and dev are present, then move the device to the
1139 specified group. If only a group is specified, then the command operates on
1140 all devices in that group.
1141
1142 .TP
1143 .BR up " and " down
1144 change the state of the device to
1145 .B UP
1146 or
1147 .BR "DOWN" .
1148
1149 .TP
1150 .BR "arp on " or " arp off"
1151 change the
1152 .B NOARP
1153 flag on the device.
1154
1155 .TP
1156 .BR "multicast on " or " multicast off"
1157 change the
1158 .B MULTICAST
1159 flag on the device.
1160
1161 .TP
1162 .BR "protodown on " or " protodown off"
1163 change the
1164 .B PROTODOWN
1165 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.
1166
1167 .TP
1168 .BR "dynamic on " or " dynamic off"
1169 change the
1170 .B DYNAMIC
1171 flag on the device. Indicates that address can change when interface goes down (currently
1172 .B NOT
1173 used by the Linux).
1174
1175 .TP
1176 .BI name " NAME"
1177 change the name of the device. This operation is not
1178 recommended if the device is running or has some addresses
1179 already configured.
1180
1181 .TP
1182 .BI txqueuelen " NUMBER"
1183 .TP
1184 .BI txqlen " NUMBER"
1185 change the transmit queue length of the device.
1186
1187 .TP
1188 .BI mtu " NUMBER"
1189 change the
1190 .I MTU
1191 of the device.
1192
1193 .TP
1194 .BI address " LLADDRESS"
1195 change the station address of the interface.
1196
1197 .TP
1198 .BI broadcast " LLADDRESS"
1199 .TP
1200 .BI brd " LLADDRESS"
1201 .TP
1202 .BI peer " LLADDRESS"
1203 change the link layer broadcast address or the peer address when
1204 the interface is
1205 .IR "POINTOPOINT" .
1206
1207 .TP
1208 .BI netns " NETNSNAME " \fR| " PID"
1209 move the device to the network namespace associated with name
1210 .IR "NETNSNAME " or
1211 .RI process " PID".
1212
1213 Some devices are not allowed to change network namespace: loopback, bridge,
1214 ppp, wireless. These are network namespace local devices. In such case
1215 .B ip
1216 tool will return "Invalid argument" error. It is possible to find out if device is local
1217 to a single network namespace by checking
1218 .B netns-local
1219 flag in the output of the
1220 .BR ethtool ":"
1221
1222 .in +8
1223 .B ethtool -k
1224 .I DEVICE
1225 .in -8
1226
1227 To change network namespace for wireless devices the
1228 .B iw
1229 tool can be used. But it allows to change network namespace only for physical devices and by process
1230 .IR PID .
1231
1232 .TP
1233 .BI alias " NAME"
1234 give the device a symbolic name for easy reference.
1235
1236 .TP
1237 .BI group " GROUP"
1238 specify the group the device belongs to.
1239 The available groups are listed in file
1240 .BR "@SYSCONFDIR@/group" .
1241
1242 .TP
1243 .BI vf " NUM"
1244 specify a Virtual Function device to be configured. The associated PF device
1245 must be specified using the
1246 .B dev
1247 parameter.
1248
1249 .in +8
1250 .BI mac " LLADDRESS"
1251 - change the station address for the specified VF. The
1252 .B vf
1253 parameter must be specified.
1254
1255 .sp
1256 .BI vlan " VLANID"
1257 - change the assigned VLAN for the specified VF. When specified, all traffic
1258 sent from the VF will be tagged with the specified VLAN ID. Incoming traffic
1259 will be filtered for the specified VLAN ID, and will have all VLAN tags
1260 stripped before being passed to the VF. Setting this parameter to 0 disables
1261 VLAN tagging and filtering. The
1262 .B vf
1263 parameter must be specified.
1264
1265 .sp
1266 .BI qos " VLAN-QOS"
1267 - assign VLAN QOS (priority) bits for the VLAN tag. When specified, all VLAN
1268 tags transmitted by the VF will include the specified priority bits in the
1269 VLAN tag. If not specified, the value is assumed to be 0. Both the
1270 .B vf
1271 and
1272 .B vlan
1273 parameters must be specified. Setting both
1274 .B vlan
1275 and
1276 .B qos
1277 as 0 disables VLAN tagging and filtering for the VF.
1278
1279 .sp
1280 .BI proto " VLAN-PROTO"
1281 - assign VLAN PROTOCOL for the VLAN tag, either 802.1Q or 802.1ad.
1282 Setting to 802.1ad, all traffic sent from the VF will be tagged with VLAN S-Tag.
1283 Incoming traffic will have VLAN S-Tags stripped before being passed to the VF.
1284 Setting to 802.1ad also enables an option to concatenate another VLAN tag, so both
1285 S-TAG and C-TAG will be inserted/stripped for outgoing/incoming traffic, respectively.
1286 If not specified, the value is assumed to be 802.1Q. Both the
1287 .B vf
1288 and
1289 .B vlan
1290 parameters must be specified.
1291
1292 .sp
1293 .BI rate " TXRATE"
1294 -- change the allowed transmit bandwidth, in Mbps, for the specified VF.
1295 Setting this parameter to 0 disables rate limiting.
1296 .B vf
1297 parameter must be specified.
1298 Please use new API
1299 .B "max_tx_rate"
1300 option instead.
1301
1302 .sp
1303 .BI max_tx_rate " TXRATE"
1304 - change the allowed maximum transmit bandwidth, in Mbps, for the specified VF.
1305 .B vf
1306 parameter must be specified.
1307
1308 .sp
1309 .BI min_tx_rate " TXRATE"
1310 - change the allowed minimum transmit bandwidth, in Mbps, for the specified VF.
1311 Minimum TXRATE should be always <= Maximum TXRATE.
1312 .B vf
1313 parameter must be specified.
1314
1315 .sp
1316 .BI spoofchk " on|off"
1317 - turn packet spoof checking on or off for the specified VF.
1318 .sp
1319 .BI query_rss " on|off"
1320 - 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.
1321 .sp
1322 .BI state " auto|enable|disable"
1323 - set the virtual link state as seen by the specified VF. Setting to auto means a
1324 reflection of the PF link state, enable lets the VF to communicate with other VFs on
1325 this host even if the PF link state is down, disable causes the HW to drop any packets
1326 sent by the VF.
1327 .sp
1328 .BI trust " on|off"
1329 - trust the specified VF user. This enables that VF user can set a specific feature
1330 which may impact security and/or performance. (e.g. VF multicast promiscuous mode)
1331 .sp
1332 .BI node_guid " eui64"
1333 - configure node GUID for the VF.
1334 .sp
1335 .BI port_guid " eui64"
1336 - configure port GUID for the VF.
1337 .in -8
1338
1339 .TP
1340 .B xdp object "|" pinned "|" off
1341 set (or unset) a XDP ("express data path") BPF program to run on every
1342 packet at driver level.
1343
1344 .B off
1345 (or
1346 .B none
1347 )
1348 - Detaches any currently attached XDP/BPF program from the given device.
1349
1350 .BI object " FILE "
1351 - Attaches a XDP/BPF program to the given device. The
1352 .I FILE
1353 points to a BPF ELF file (f.e. generated by LLVM) that contains the BPF
1354 program code, map specifications, etc. If a XDP/BPF program is already
1355 attached to the given device, an error will be thrown. If no XDP/BPF
1356 program is currently attached, the device supports XDP and the program
1357 from the BPF ELF file passes the kernel verifier, then it will be attached
1358 to the device. If the option
1359 .I -force
1360 is passed to
1361 .B ip
1362 then any prior attached XDP/BPF program will be atomically overridden and
1363 no error will be thrown in this case. If no
1364 .B section
1365 option is passed, then the default section name ("prog") will be assumed,
1366 otherwise the provided section name will be used. If no
1367 .B verbose
1368 option is passed, then a verifier log will only be dumped on load error.
1369 See also
1370 .B EXAMPLES
1371 section for usage examples.
1372
1373 .BI section " NAME "
1374 - Specifies a section name that contains the BPF program code. If no section
1375 name is specified, the default one ("prog") will be used. This option is
1376 to be passed with the
1377 .B object
1378 option.
1379
1380 .BI verbose
1381 - Act in verbose mode. For example, even in case of success, this will
1382 print the verifier log in case a program was loaded from a BPF ELF file.
1383
1384 .BI pinned " FILE "
1385 - Attaches a XDP/BPF program to the given device. The
1386 .I FILE
1387 points to an already pinned BPF program in the BPF file system. The option
1388 .B section
1389 doesn't apply here, but otherwise semantics are the same as with the option
1390 .B object
1391 described already.
1392
1393 .TP
1394 .BI master " DEVICE"
1395 set master device of the device (enslave device).
1396
1397 .TP
1398 .BI nomaster
1399 unset master device of the device (release device).
1400
1401 .TP
1402 .BI addrgenmode " eui64|none|stable_secret|random"
1403 set the IPv6 address generation mode
1404
1405 .I eui64
1406 - use a Modified EUI-64 format interface identifier
1407
1408 .I none
1409 - disable automatic address generation
1410
1411 .I stable_secret
1412 - generate the interface identifier based on a preset /proc/sys/net/ipv6/conf/{default,DEVICE}/stable_secret
1413
1414 .I random
1415 - like stable_secret, but auto-generate a new random secret if none is set
1416
1417 .TP
1418 .BR "link-netnsid "
1419 set peer netnsid for a cross-netns interface
1420
1421 .TP
1422 .BI type " ETYPE TYPE_ARGS"
1423 Change type-specific settings. For a list of supported types and arguments refer
1424 to the description of
1425 .B "ip link add"
1426 above. In addition to that, it is possible to manipulate settings to slave
1427 devices:
1428
1429 .TP
1430 Bridge Slave Support
1431 For a link with master
1432 .B bridge
1433 the following additional arguments are supported:
1434
1435 .B "ip link set type bridge_slave"
1436 [
1437 .B fdb_flush
1438 ] [
1439 .BI state " STATE"
1440 ] [
1441 .BI priority " PRIO"
1442 ] [
1443 .BI cost " COST"
1444 ] [
1445 .BR guard " { " on " | " off " }"
1446 ] [
1447 .BR hairpin " { " on " | " off " }"
1448 ] [
1449 .BR fastleave " { " on " | " off " }"
1450 ] [
1451 .BR root_block " { " on " | " off " }"
1452 ] [
1453 .BR learning " { " on " | " off " }"
1454 ] [
1455 .BR flood " { " on " | " off " }"
1456 ] [
1457 .BR proxy_arp " { " on " | " off " }"
1458 ] [
1459 .BR proxy_arp_wifi " { " on " | " off " }"
1460 ] [
1461 .BI mcast_router " MULTICAST_ROUTER"
1462 ] [
1463 .BR mcast_fast_leave " { " on " | " off "}"
1464 ] [
1465 .BR mcast_flood " { " on " | " off " } ]"
1466
1467 .in +8
1468 .sp
1469 .B fdb_flush
1470 - flush bridge slave's fdb dynamic entries.
1471
1472 .BI state " STATE"
1473 - Set port state.
1474 .I STATE
1475 is a number representing the following states:
1476 .BR 0 " (disabled),"
1477 .BR 1 " (listening),"
1478 .BR 2 " (learning),"
1479 .BR 3 " (forwarding),"
1480 .BR 4 " (blocking)."
1481
1482 .BI priority " PRIO"
1483 - set port priority (a 16bit unsigned value).
1484
1485 .BI cost " COST"
1486 - set port cost (a 32bit unsigned value).
1487
1488 .BR guard " { " on " | " off " }"
1489 - block incoming BPDU packets on this port.
1490
1491 .BR hairpin " { " on " | " off " }"
1492 - enable hairpin mode on this port. This will allow incoming packets on this
1493 port to be reflected back.
1494
1495 .BR fastleave " { " on " | " off " }"
1496 - enable multicast fast leave on this port.
1497
1498 .BR root_block " { " on " | " off " }"
1499 - block this port from becoming the bridge's root port.
1500
1501 .BR learning " { " on " | " off " }"
1502 - allow MAC address learning on this port.
1503
1504 .BR flood " { " on " | " off " }"
1505 - open the flood gates on this port, i.e. forward all unicast frames to this
1506 port also. Requires
1507 .BR proxy_arp " and " proxy_arp_wifi
1508 to be turned off.
1509
1510 .BR proxy_arp " { " on " | " off " }"
1511 - enable proxy ARP on this port.
1512
1513 .BR proxy_arp_wifi " { " on " | " off " }"
1514 - enable proxy ARP on this port which meets extended requirements by IEEE
1515 802.11 and Hotspot 2.0 specifications.
1516
1517 .BI mcast_router " MULTICAST_ROUTER"
1518 - configure this port for having multicast routers attached. A port with a
1519 multicast router will receive all multicast traffic.
1520 .I MULTICAST_ROUTER
1521 may be either
1522 .B 0
1523 to disable multicast routers on this port,
1524 .B 1
1525 to let the system detect the presence of of routers (this is the default),
1526 .B 2
1527 to permanently enable multicast traffic forwarding on this port or
1528 .B 3
1529 to enable multicast routers temporarily on this port, not depending on incoming
1530 queries.
1531
1532 .BR mcast_fast_leave " { " on " | " off " }"
1533 - this is a synonym to the
1534 .B fastleave
1535 option above.
1536
1537 .BR mcast_flood " { " on " | " off " }"
1538 - controls whether a given port will be flooded with multicast traffic for which there is no MDB entry.
1539
1540 .in -8
1541
1542 .TP
1543 Bonding Slave Support
1544 For a link with master
1545 .B bond
1546 the following additional arguments are supported:
1547
1548 .B "ip link set type bond_slave"
1549 [
1550 .BI queue_id " ID"
1551 ]
1552
1553 .in +8
1554 .sp
1555 .BI queue_id " ID"
1556 - set the slave's queue ID (a 16bit unsigned value).
1557
1558 .in -8
1559
1560 .TP
1561 MACVLAN and MACVTAP Support
1562 Modify list of allowed macaddr for link in source mode.
1563
1564 .B "ip link set type { macvlan | macvap } "
1565 [
1566 .BI macaddr " " "" COMMAND " " MACADDR " ..."
1567 ]
1568
1569 Commands:
1570 .in +8
1571 .B add
1572 - add MACADDR to allowed list
1573 .sp
1574 .B set
1575 - replace allowed list
1576 .sp
1577 .B del
1578 - remove MACADDR from allowed list
1579 .sp
1580 .B flush
1581 - flush whole allowed list
1582 .sp
1583 .in -8
1584
1585
1586 .SS ip link show - display device attributes
1587
1588 .TP
1589 .BI dev " NAME " (default)
1590 .I NAME
1591 specifies the network device to show.
1592 If this argument is omitted all devices in the default group are listed.
1593
1594 .TP
1595 .BI group " GROUP "
1596 .I GROUP
1597 specifies what group of devices to show.
1598
1599 .TP
1600 .B up
1601 only display running interfaces.
1602
1603 .TP
1604 .BI master " DEVICE "
1605 .I DEVICE
1606 specifies the master device which enslaves devices to show.
1607
1608 .TP
1609 .BI vrf " NAME "
1610 .I NAME
1611 speficies the VRF which enslaves devices to show.
1612
1613 .TP
1614 .BI type " TYPE "
1615 .I TYPE
1616 specifies the type of devices to show.
1617
1618 Note that the type name is not checked against the list of supported types -
1619 instead it is sent as-is to the kernel. Later it is used to filter the returned
1620 interface list by comparing it with the relevant attribute in case the kernel
1621 didn't filter already. Therefore any string is accepted, but may lead to empty
1622 output.
1623
1624 .SS ip link xstats - display extended statistics
1625
1626 .TP
1627 .BI type " TYPE "
1628 .I TYPE
1629 specifies the type of devices to display extended statistics for.
1630
1631 .SS ip link help - display help
1632
1633 .PP
1634 .I "TYPE"
1635 specifies which help of link type to dislpay.
1636
1637 .SS
1638 .I GROUP
1639 may be a number or a string from the file
1640 .B @SYSCONFDIR@/group
1641 which can be manually filled.
1642
1643 .SH "EXAMPLES"
1644 .PP
1645 ip link show
1646 .RS 4
1647 Shows the state of all network interfaces on the system.
1648 .RE
1649 .PP
1650 ip link show type bridge
1651 .RS 4
1652 Shows the bridge devices.
1653 .RE
1654 .PP
1655 ip link show type vlan
1656 .RS 4
1657 Shows the vlan devices.
1658 .RE
1659 .PP
1660 ip link show master br0
1661 .RS 4
1662 Shows devices enslaved by br0
1663 .RE
1664 .PP
1665 ip link set dev ppp0 mtu 1400
1666 .RS 4
1667 Change the MTU the ppp0 device.
1668 .RE
1669 .PP
1670 ip link add link eth0 name eth0.10 type vlan id 10
1671 .RS 4
1672 Creates a new vlan device eth0.10 on device eth0.
1673 .RE
1674 .PP
1675 ip link delete dev eth0.10
1676 .RS 4
1677 Removes vlan device.
1678 .RE
1679
1680 ip link help gre
1681 .RS 4
1682 Display help for the gre link type.
1683 .RE
1684 .PP
1685 ip link add name tun1 type ipip remote 192.168.1.1
1686 local 192.168.1.2 ttl 225 encap gue encap-sport auto
1687 encap-dport 5555 encap-csum encap-remcsum
1688 .RS 4
1689 Creates an IPIP that is encapsulated with Generic UDP Encapsulation,
1690 and the outer UDP checksum and remote checksum offload are enabled.
1691 .RE
1692 .PP
1693 ip link set dev eth0 xdp obj prog.o
1694 .RS 4
1695 Attaches a XDP/BPF program to device eth0, where the program is
1696 located in prog.o, section "prog" (default section). In case a
1697 XDP/BPF program is already attached, throw an error.
1698 .RE
1699 .PP
1700 ip -force link set dev eth0 xdp obj prog.o sec foo
1701 .RS 4
1702 Attaches a XDP/BPF program to device eth0, where the program is
1703 located in prog.o, section "foo". In case a XDP/BPF program is
1704 already attached, it will be overridden by the new one.
1705 .RE
1706 .PP
1707 ip -force link set dev eth0 xdp pinned /sys/fs/bpf/foo
1708 .RS 4
1709 Attaches a XDP/BPF program to device eth0, where the program was
1710 previously pinned as an object node into BPF file system under
1711 name foo.
1712 .RE
1713 .PP
1714 ip link set dev eth0 xdp off
1715 .RS 4
1716 If a XDP/BPF program is attached on device eth0, detach it and
1717 effectively turn off XDP for device eth0.
1718 .RE
1719 .PP
1720 ip link add link wpan0 lowpan0 type lowpan
1721 .RS 4
1722 Creates a 6LoWPAN interface named lowpan0 on the underlying
1723 IEEE 802.15.4 device wpan0.
1724 .RE
1725
1726 .SH SEE ALSO
1727 .br
1728 .BR ip (8),
1729 .BR ip-netns (8),
1730 .BR ethtool (8),
1731 .BR iptables (8)
1732
1733 .SH AUTHOR
1734 Original Manpage by Michail Litvak <mci@owl.openwall.com>