]> git.proxmox.com Git - mirror_iproute2.git/blob - man/man8/ip-link.8.in
ip-link: fix man page warnings
[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
10 .RI "[ " OPTIONS " ]"
11 .B link
12 .RI " { " COMMAND " | "
13 .BR help " }"
14 .sp
15
16 .ti -8
17 .IR OPTIONS " := { "
18 \fB\-V\fR[\fIersion\fR] |
19 \fB\-h\fR[\fIuman-readable\fR] |
20 \fB\-s\fR[\fItatistics\fR] |
21 \fB\-r\fR[\fIesolve\fR] |
22 \fB\-f\fR[\fIamily\fR] {
23 .BR inet " | " inet6 " | " ipx " | " dnet " | " link " } | "
24 \fB\-o\fR[\fIneline\fR] |
25 \fB\-br\fR[\fIief\fR] }
26
27 .ti -8
28 .BI "ip link add"
29 .RB "[ " link
30 .IR DEVICE " ]"
31 .RB "[ " name " ]"
32 .I NAME
33 .br
34 .RB "[ " txqueuelen
35 .IR PACKETS " ]"
36 .br
37 .RB "[ " address
38 .IR LLADDR " ]"
39 .RB "[ " broadcast
40 .IR LLADDR " ]"
41 .br
42 .RB "[ " mtu
43 .IR MTU " ]"
44 .RB "[ " index
45 .IR IDX " ]"
46 .br
47 .RB "[ " numtxqueues
48 .IR QUEUE_COUNT " ]"
49 .RB "[ " numrxqueues
50 .IR QUEUE_COUNT " ]"
51 .br
52 .BR type " TYPE"
53 .RI "[ " ARGS " ]"
54
55 .ti -8
56 .IR TYPE " := [ "
57 .BR bridge " | "
58 .BR bond " | "
59 .BR can " | "
60 .BR dummy " | "
61 .BR hsr " | "
62 .BR ifb " | "
63 .BR ipoib " |"
64 .BR macvlan " | "
65 .BR macvtap " | "
66 .BR vcan " | "
67 .BR veth " | "
68 .BR vlan " | "
69 .BR vxlan " |"
70 .BR ip6tnl " |"
71 .BR ipip " |"
72 .BR sit " |"
73 .BR gre " |"
74 .BR gretap " |"
75 .BR ip6gre " |"
76 .BR ip6gretap " |"
77 .BR vti " |"
78 .BR nlmon " |"
79 .BR ipvlan " |"
80 .BR lowpan " |"
81 .BR geneve " ]"
82
83 .ti -8
84 .BR "ip link delete " {
85 .IR DEVICE " | "
86 .BI "group " GROUP
87 }
88 .BI type " TYPE"
89 .RI "[ " ARGS " ]"
90
91 .ti -8
92 .BR "ip link set " {
93 .IR DEVICE " | "
94 .BI "group " GROUP
95 .RB "} { " up " | " down " | " arp " { " on " | " off " } |"
96 .br
97 .BR promisc " { " on " | " off " } |"
98 .br
99 .BR allmulticast " { " on " | " off " } |"
100 .br
101 .BR dynamic " { " on " | " off " } |"
102 .br
103 .BR multicast " { " on " | " off " } |"
104 .br
105 .BR protodown " { " on " | " off " } |"
106 .br
107 .B txqueuelen
108 .IR PACKETS " |"
109 .br
110 .B name
111 .IR NEWNAME " |"
112 .br
113 .B address
114 .IR LLADDR " |"
115 .B broadcast
116 .IR LLADDR " |"
117 .br
118 .B mtu
119 .IR MTU " |"
120 .br
121 .B netns
122 .IR PID " |"
123 .br
124 .B netns
125 .IR NETNSNAME " |"
126 .br
127 .B alias
128 .IR NAME " |"
129 .br
130 .B vf
131 .IR NUM " ["
132 .B mac
133 .IR LLADDR " ] ["
134 .B vlan
135 .IR VLANID " [ "
136 .B qos
137 .IR VLAN-QOS " ] ] ["
138 .B rate
139 .IR TXRATE " ] ["
140 .B max_tx_rate
141 .IR TXRATE " ] ["
142 .B min_tx_rate
143 .IR TXRATE " ] ["
144 .B spoofchk { on | off } ] [
145 .B state { auto | enable | disable}
146 ] |
147 .br
148 .B master
149 .IR DEVICE " |"
150 .br
151 .B nomaster " |"
152 .br
153 .B addrgenmode { eui64 | none | stable_secret | random }
154 .br
155 .B link-netnsid ID
156 .BR " }"
157
158
159 .ti -8
160 .B ip link show
161 .RI "[ " DEVICE " | "
162 .B group
163 .IR GROUP " | "
164 .BR up " | "
165 .B master
166 .IR DEVICE " | "
167 .B type
168 .IR TYPE " ]"
169
170 .ti -8
171 .B ip link help
172 .RI "[ " TYPE " ]"
173
174 .SH "DESCRIPTION"
175 .SS ip link add - add virtual link
176
177 .TP
178 .BI link " DEVICE "
179 specifies the physical device to act operate on.
180
181 .I NAME
182 specifies the name of the new virtual device.
183
184 .I TYPE
185 specifies the type of the new device.
186 .sp
187 Link types:
188
189 .in +8
190 .B bridge
191 - Ethernet Bridge device
192 .sp
193 .B bond
194 - Bonding device
195 .B can
196 - Controller Area Network interface
197 .sp
198 .B dummy
199 - Dummy network interface
200 .sp
201 .B hsr
202 - High-availability Seamless Redundancy device
203 .sp
204 .B ifb
205 - Intermediate Functional Block device
206 .sp
207 .B ipoib
208 - IP over Infiniband device
209 .sp
210 .B macvlan
211 - Virtual interface base on link layer address (MAC)
212 .sp
213 .B macvtap
214 - Virtual interface based on link layer address (MAC) and TAP.
215 .sp
216 .B vcan
217 - Virtual Controller Area Network interface
218 .sp
219 .B veth
220 - Virtual ethernet interface
221 .sp
222 .BR vlan
223 - 802.1q tagged virtual LAN interface
224 .sp
225 .BR vxlan
226 - Virtual eXtended LAN
227 .sp
228 .BR ip6tnl
229 - Virtual tunnel interface IPv4|IPv6 over IPv6
230 .sp
231 .BR ipip
232 - Virtual tunnel interface IPv4 over IPv4
233 .sp
234 .BR sit
235 - Virtual tunnel interface IPv6 over IPv4
236 .sp
237 .BR gre
238 - Virtual tunnel interface GRE over IPv4
239 .sp
240 .BR gretap
241 - Virtual L2 tunnel interface GRE over IPv4
242 .sp
243 .BR ip6gre
244 - Virtual tunnel interface GRE over IPv6
245 .sp
246 .BR ip6gretap
247 - Virtual L2 tunnel interface GRE over IPv6
248 .sp
249 .BR vti
250 - Virtual tunnel interface
251 .sp
252 .BR nlmon
253 - Netlink monitoring device
254 .sp
255 .BR ipvlan
256 - Interface for L3 (IPv6/IPv4) based VLANs
257 .sp
258 .BR lowpan
259 - Interface for 6LoWPAN (IPv6) over IEEE 802.15.4 / Bluetooth
260 .sp
261 .BR geneve
262 - GEneric NEtwork Virtualization Encapsulation
263 .in -8
264
265 .TP
266 .BI numtxqueues " QUEUE_COUNT "
267 specifies the number of transmit queues for new device.
268
269 .TP
270 .BI numrxqueues " QUEUE_COUNT "
271 specifies the number of receive queues for new device.
272
273 .TP
274 .BI index " IDX "
275 specifies the desired index of the new virtual device. The link creation fails, if the index is busy.
276
277 .TP
278 VLAN Type Support
279 For a link of type
280 .I VLAN
281 the following additional arguments are supported:
282
283 .BI "ip link add
284 .BI link " DEVICE "
285 .BI name " NAME "
286 .BI type " vlan "
287 [
288 .BI protocol " VLAN_PROTO "
289 ]
290 .BI id " VLANID "
291 [
292 .BR reorder_hdr " { " on " | " off " } "
293 ]
294 [
295 .BR gvrp " { " on " | " off " } "
296 ]
297 [
298 .BR mvrp " { " on " | " off " } "
299 ]
300 [
301 .BR loose_binding " { " on " | " off " } "
302 ]
303 [
304 .BI ingress-qos-map " QOS-MAP "
305 ]
306 [
307 .BI egress-qos-map " QOS-MAP "
308 ]
309
310 .in +8
311 .sp
312 .BI protocol " VLAN_PROTO "
313 - either 802.1Q or 802.1ad.
314
315 .BI id " VLANID "
316 - specifies the VLAN Identifer to use. Note that numbers with a leading " 0 " or " 0x " are interpreted as octal or hexadeimal, respectively.
317
318 .BR reorder_hdr " { " on " | " off " } "
319 - specifies whether ethernet headers are reordered or not (default is
320 .BR on ")."
321
322 .in +4
323 If
324 .BR reorder_hdr " is " on
325 then VLAN header will be not inserted immediately but only before passing to the
326 physical device (if this device does not support VLAN offloading), the similar
327 on the RX direction - by default the packet will be untagged before being
328 received by VLAN device. Reordering allows to accelerate tagging on egress and
329 to hide VLAN header on ingress so the packet looks like regular Ethernet packet,
330 at the same time it might be confusing for packet capture as the VLAN header
331 does not exist within the packet.
332
333 VLAN offloading can be checked by
334 .BR ethtool "(8):"
335 .in +4
336 .sp
337 .B ethtool -k
338 <phy_dev> |
339 .RB grep " tx-vlan-offload"
340 .sp
341 .in -4
342 where <phy_dev> is the physical device to which VLAN device is bound.
343 .in -4
344
345 .BR gvrp " { " on " | " off " } "
346 - specifies whether this VLAN should be registered using GARP VLAN Registration Protocol.
347
348 .BR mvrp " { " on " | " off " } "
349 - specifies whether this VLAN should be registered using Multiple VLAN Registration Protocol.
350
351 .BR loose_binding " { " on " | " off " } "
352 - specifies whether the VLAN device state is bound to the physical device state.
353
354 .BI ingress-qos-map " QOS-MAP "
355 - defines a mapping of VLAN header prio field to the Linux internal packet
356 priority on incoming frames. The format is FROM:TO with multiple mappings
357 separated by spaces.
358
359 .BI egress-qos-map " QOS-MAP "
360 - defines a mapping of Linux internal packet priority to VLAN header prio field
361 but for outgoing frames. The format is the same as for ingress-qos-map.
362 .in +4
363
364 Linux packet priority can be set by
365 .BR iptables "(8)":
366 .in +4
367 .sp
368 .B iptables
369 -t mangle -A POSTROUTING [...] -j CLASSIFY --set-class 0:4
370 .sp
371 .in -4
372 and this "4" priority can be used in the egress qos mapping to set VLAN prio "5":
373 .sp
374 .in +4
375 .B ip
376 link set veth0.10 type vlan egress 4:5
377 .in -4
378 .in -4
379 .in -8
380
381 .TP
382 VXLAN Type Support
383 For a link of type
384 .I VXLAN
385 the following additional arguments are supported:
386
387 .BI "ip link add " DEVICE
388 .BI type " vxlan " id " ID"
389 [
390 .BI dev " PHYS_DEV "
391 .RB " ] [ { " group " | " remote " } "
392 .I IPADDR
393 ] [
394 .B local
395 .RI "{ "IPADDR " | "any " } "
396 ] [
397 .BI ttl " TTL "
398 ] [
399 .BI tos " TOS "
400 ] [
401 .BI dstport " PORT "
402 ] [
403 .BI srcport " MIN MAX "
404 ] [
405 .I "[no]learning "
406 ] [
407 .I "[no]proxy "
408 ] [
409 .I "[no]rsc "
410 ] [
411 .I "[no]l2miss "
412 ] [
413 .I "[no]l3miss "
414 ] [
415 .I "[no]udpcsum "
416 ] [
417 .I "[no]udp6zerocsumtx "
418 ] [
419 .I "[no]udp6zerocsumrx "
420 ] [
421 .BI ageing " SECONDS "
422 ] [
423 .BI maxaddress " NUMBER "
424 ] [
425 .B gbp
426 ]
427
428 .in +8
429 .sp
430 .BI id " VNI "
431 - specifies the VXLAN Network Identifer (or VXLAN Segment
432 Identifier) to use.
433
434 .BI dev " PHYS_DEV"
435 - specifies the physical device to use for tunnel endpoint communication.
436
437 .sp
438 .BI group " IPADDR"
439 - specifies the multicast IP address to join.
440 This parameter cannot be specified with the
441 .B remote
442 parameter.
443
444 .sp
445 .BI remote " IPADDR"
446 - specifies the unicast destination IP address to use in outgoing packets
447 when the destination link layer address is not known in the VXLAN device
448 forwarding database. This parameter cannot be specified with the
449 .B group
450 parameter.
451
452 .sp
453 .BI local " IPADDR"
454 - specifies the source IP address to use in outgoing packets.
455
456 .sp
457 .BI ttl " TTL"
458 - specifies the TTL value to use in outgoing packets.
459
460 .sp
461 .BI tos " TOS"
462 - specifies the TOS value to use in outgoing packets.
463
464 .sp
465 .BI dstport " PORT"
466 - specifies the UDP destination port to communicate to the remote VXLAN tunnel endpoint.
467
468 .sp
469 .BI srcport " MIN MAX"
470 - specifies the range of port numbers to use as UDP
471 source ports to communicate to the remote VXLAN tunnel endpoint.
472
473 .sp
474 .I [no]learning
475 - specifies if unknown source link layer addresses and IP addresses
476 are entered into the VXLAN device forwarding database.
477
478 .sp
479 .I [no]rsc
480 - specifies if route short circuit is turned on.
481
482 .sp
483 .I [no]proxy
484 - specifies ARP proxy is turned on.
485
486 .sp
487 .I [no]l2miss
488 - specifies if netlink LLADDR miss notifications are generated.
489
490 .sp
491 .I [no]l3miss
492 - specifies if netlink IP ADDR miss notifications are generated.
493
494 .sp
495 .I [no]udpcsum
496 - specifies if UDP checksum is filled in
497
498 .sp
499 .I [no]udp6zerocsumtx
500 - specifies if UDP checksum is filled in
501
502 .sp
503 .I [no]udp6zerocsumrx
504 - specifies if UDP checksum is received
505
506 .sp
507 .BI ageing " SECONDS"
508 - specifies the lifetime in seconds of FDB entries learnt by the kernel.
509
510 .sp
511 .BI maxaddress " NUMBER"
512 - specifies the maximum number of FDB entries.
513
514 .sp
515 .B gbp
516 - enables the Group Policy extension (VXLAN-GBP).
517
518 .in +4
519 Allows to transport group policy context across VXLAN network peers.
520 If enabled, includes the mark of a packet in the VXLAN header for outgoing
521 packets and fills the packet mark based on the information found in the
522 VXLAN header for incomming packets.
523
524 Format of upper 16 bits of packet mark (flags);
525
526 .in +2
527 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
528 .br
529 |-|-|-|-|-|-|-|-|-|D|-|-|A|-|-|-|
530 .br
531 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
532
533 .B D :=
534 Don't Learn bit. When set, this bit indicates that the egress
535 VTEP MUST NOT learn the source address of the encapsulated frame.
536
537 .B A :=
538 Indicates that the group policy has already been applied to
539 this packet. Policies MUST NOT be applied by devices when the A bit is set.
540 .in -2
541
542 Format of lower 16 bits of packet mark (policy ID):
543
544 .in +2
545 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
546 .br
547 | Group Policy ID |
548 .br
549 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
550 .in -2
551
552 Example:
553 iptables -A OUTPUT [...] -j MARK --set-mark 0x800FF
554
555 .in -4
556
557 .in -8
558
559 .TP
560 GRE, IPIP, SIT Type Support
561 For a link of types
562 .I GRE/IPIP/SIT
563 the following additional arguments are supported:
564
565 .BI "ip link add " DEVICE
566 .BR type " { gre | ipip | sit } "
567 .BI " remote " ADDR " local " ADDR
568 [
569 .BR encap " { fou | gue | none } "
570 ] [
571 .BI "encap-sport { " PORT " | auto } "
572 ] [
573 .BI "encap-dport " PORT
574 ] [
575 .I " [no]encap-csum "
576 ] [
577 .I " [no]encap-remcsum "
578 ]
579
580 .in +8
581 .sp
582 .BI remote " ADDR "
583 - specifies the remote address of the tunnel.
584
585 .sp
586 .BI local " ADDR "
587 - specifies the fixed local address for tunneled packets.
588 It must be an address on another interface on this host.
589
590 .sp
591 .BR encap " { fou | gue | none } "
592 - specifies type of secondary UDP encapsulation. "fou" indicates
593 Foo-Over-UDP, "gue" indicates Generic UDP Encapsulation.
594
595 .sp
596 .BI "encap-sport { " PORT " | auto } "
597 - specifies the source port in UDP encapsulation.
598 .IR PORT
599 indicates the port by number, "auto"
600 indicates that the port number should be chosen automatically
601 (the kernel picks a flow based on the flow hash of the
602 encapsulated packet).
603
604 .sp
605 .I [no]encap-csum
606 - specifies if UDP checksums are enabled in the secondary
607 encapsulation.
608
609 .sp
610 .I [no]encap-remcsum
611 - specifies if Remote Checksum Offload is enabled. This is only
612 applicable for Generic UDP Encapsulation.
613
614 .in -8
615
616 .TP
617 IP6GRE/IP6GRETAP Type Support
618 For a link of type
619 .I IP6GRE/IP6GRETAP
620 the following additional arguments are supported:
621
622 .BI "ip link add " DEVICE
623 .BI type " { ip6gre | ip6gretap } " remote " ADDR " local " ADDR
624 [
625 .I "[i|o]seq]"
626 ] [
627 .I "[i|o]key" KEY
628 ] [
629 .I " [i|o]csum "
630 ] [
631 .BI hoplimit " TTL "
632 ] [
633 .BI encaplimit " ELIM "
634 ] [
635 .BI tclass " TCLASS "
636 ] [
637 .BI flowlabel " FLOWLABEL "
638 ] [
639 .BI "dscp inherit"
640 ] [
641 .BI dev " PHYS_DEV "
642 ]
643
644 .in +8
645 .sp
646 .BI remote " ADDR "
647 - specifies the remote IPv6 address of the tunnel.
648
649 .sp
650 .BI local " ADDR "
651 - specifies the fixed local IPv6 address for tunneled packets.
652 It must be an address on another interface on this host.
653
654 .sp
655 .BI [i|o]seq
656 - serialize packets.
657 The
658 .B oseq
659 flag enables sequencing of outgoing packets.
660 The
661 .B iseq
662 flag requires that all input packets are serialized.
663
664 .sp
665 .BI [i|o]key " KEY"
666 - use keyed GRE with key
667 .IR KEY ". "KEY
668 is either a number or an IPv4 address-like dotted quad.
669 The
670 .B key
671 parameter specifies the same key to use in both directions.
672 The
673 .BR ikey " and " okey
674 parameters specify different keys for input and output.
675
676 .sp
677 .BI [i|o]csum
678 - generate/require checksums for tunneled packets.
679 The
680 .B ocsum
681 flag calculates checksums for outgoing packets.
682 The
683 .B icsum
684 flag requires that all input packets have the correct
685 checksum. The
686 .B csum
687 flag is equivalent to the combination
688 .BR "icsum ocsum" .
689
690 .sp
691 .BI hoplimit " TTL"
692 - specifies Hop Limit value to use in outgoing packets.
693
694 .sp
695 .BI encaplimit " ELIM"
696 - specifies a fixed encapsulation limit. Default is 4.
697
698 .sp
699 .BI flowlabel " FLOWLABEL"
700 - specifies a fixed flowlabel.
701
702 .sp
703 .BI tclass " TCLASS"
704 - specifies the traffic class field on
705 tunneled packets, which can be specified as either a two-digit
706 hex value (e.g. c0) or a predefined string (e.g. internet).
707 The value
708 .B inherit
709 causes the field to be copied from the original IP header. The
710 values
711 .BI "inherit/" STRING
712 or
713 .BI "inherit/" 00 ".." ff
714 will set the field to
715 .I STRING
716 or
717 .IR 00 ".." ff
718 when tunneling non-IP packets. The default value is 00.
719
720 .in -8
721
722 .TP
723 IPoIB Type Support
724 For a link of type
725 .I IPoIB
726 the following additional arguments are supported:
727
728 .BI "ip link add " DEVICE " name " NAME
729 .BI type " ipoib [ " pkey " PKEY ] [" mode " MODE " ]
730
731 .in +8
732 .sp
733 .BI pkey " PKEY "
734 - specifies the IB P-Key to use.
735
736 .BI mode " MODE "
737 - specifies the mode (datagram or connected) to use.
738
739 .TP
740 GENEVE Type Support
741 For a link of type
742 .I GENEVE
743 the following additional arguments are supported:
744
745 .BI "ip link add " DEVICE
746 .BI type " geneve " id " ID " remote " IPADDR"
747 [
748 .BI ttl " TTL "
749 ] [
750 .BI tos " TOS "
751 ]
752
753 .in +8
754 .sp
755 .BI id " VNI "
756 - specifies the Virtual Network Identifer to use.
757
758 .sp
759 .BI remote " IPADDR"
760 - specifies the unicast destination IP address to use in outgoing packets.
761
762 .sp
763 .BI ttl " TTL"
764 - specifies the TTL value to use in outgoing packets.
765
766 .sp
767 .BI tos " TOS"
768 - specifies the TOS value to use in outgoing packets.
769
770 .in -8
771
772 .TP
773 MACVLAN and MACVTAP Type Support
774 For a link of type
775 .I MACVLAN
776 or
777 .I MACVTAP
778 the following additional arguments are supported:
779
780 .BI "ip link add link " DEVICE " name " NAME
781 .BR type " { " macvlan " | " macvtap " } "
782 .BR mode " { " private " | " vepa " | " bridge " | " passthru
783 .BR " [ " nopromisc " ] } "
784
785 .in +8
786 .sp
787 .BR type " { " macvlan " | " macvtap " } "
788 - specifies the link type to use.
789 .BR macvlan " creates just a virtual interface, while "
790 .BR macvtap " in addition creates a character device "
791 .BR /dev/tapX " to be used just like a " tuntap " device."
792
793 .B mode private
794 - Do not allow communication between
795 .B macvlan
796 instances on the same physical interface, even if the external switch supports
797 hairpin mode.
798
799 .B mode vepa
800 - Virtual Ethernet Port Aggregator mode. Data from one
801 .B macvlan
802 instance to the other on the same physical interface is transmitted over the
803 physical interface. Either the attached switch needs to support hairpin mode,
804 or there must be a TCP/IP router forwarding the packets in order to allow
805 communication. This is the default mode.
806
807 .B mode bridge
808 - In bridge mode, all endpoints are directly connected to each other,
809 communication is not redirected through the physical interface's peer.
810
811 .BR mode " " passthru " [ " nopromisc " ] "
812 - This mode gives more power to a single endpoint, usually in
813 .BR macvtap " mode. It is not allowed for more than one endpoint on the same "
814 physical interface. All traffic will be forwarded to this endpoint, allowing
815 virtio guests to change MAC address or set promiscuous mode in order to bridge
816 the interface or create vlan interfaces on top of it. By default, this mode
817 forces the underlying interface into promiscuous mode. Passing the
818 .BR nopromisc " flag prevents this, so the promisc flag may be controlled "
819 using standard tools.
820 .in -8
821
822 .SS ip link delete - delete virtual link
823
824 .TP
825 .BI dev " DEVICE "
826 specifies the virtual device to act operate on.
827
828 .TP
829 .BI group " GROUP "
830 specifies the group of virtual links to delete. Group 0 is not allowed to be
831 deleted since it is the default group.
832
833 .TP
834 .BI type " TYPE "
835 specifies the type of the device.
836
837 .SS ip link set - change device attributes
838
839 .TP
840 .BI dev " DEVICE "
841 .I DEVICE
842 specifies network device to operate on. When configuring SR-IOV Virtual Function
843 (VF) devices, this keyword should specify the associated Physical Function (PF)
844 device.
845
846 .TP
847 .BI group " GROUP "
848 .I GROUP
849 has a dual role: If both group and dev are present, then move the device to the
850 specified group. If only a group is specified, then the command operates on
851 all devices in that group.
852
853 .TP
854 .BR up " and " down
855 change the state of the device to
856 .B UP
857 or
858 .BR "DOWN" .
859
860 .TP
861 .BR "arp on " or " arp off"
862 change the
863 .B NOARP
864 flag on the device.
865
866 .TP
867 .BR "multicast on " or " multicast off"
868 change the
869 .B MULTICAST
870 flag on the device.
871
872 .TP
873 .BR "protodown on " or " protodown off"
874 change the
875 .B PROTODOWN
876 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.
877
878 .TP
879 .BR "dynamic on " or " dynamic off"
880 change the
881 .B DYNAMIC
882 flag on the device. Indicates that address can change when interface goes down (currently
883 .B NOT
884 used by the Linux).
885
886 .TP
887 .BI name " NAME"
888 change the name of the device. This operation is not
889 recommended if the device is running or has some addresses
890 already configured.
891
892 .TP
893 .BI txqueuelen " NUMBER"
894 .TP
895 .BI txqlen " NUMBER"
896 change the transmit queue length of the device.
897
898 .TP
899 .BI mtu " NUMBER"
900 change the
901 .I MTU
902 of the device.
903
904 .TP
905 .BI address " LLADDRESS"
906 change the station address of the interface.
907
908 .TP
909 .BI broadcast " LLADDRESS"
910 .TP
911 .BI brd " LLADDRESS"
912 .TP
913 .BI peer " LLADDRESS"
914 change the link layer broadcast address or the peer address when
915 the interface is
916 .IR "POINTOPOINT" .
917
918 .TP
919 .BI netns " NETNSNAME " \fR| " PID"
920 move the device to the network namespace associated with name
921 .IR "NETNSNAME " or
922 .RI process " PID".
923
924 Some devices are not allowed to change network namespace: loopback, bridge,
925 ppp, wireless. These are network namespace local devices. In such case
926 .B ip
927 tool will return "Invalid argument" error. It is possible to find out if device is local
928 to a single network namespace by checking
929 .B netns-local
930 flag in the output of the
931 .BR ethtool ":"
932
933 .in +8
934 .B ethtool -k
935 .I DEVICE
936 .in -8
937
938 To change network namespace for wireless devices the
939 .B iw
940 tool can be used. But it allows to change network namespace only for physical devices and by process
941 .IR PID .
942
943 .TP
944 .BI alias " NAME"
945 give the device a symbolic name for easy reference.
946
947 .TP
948 .BI group " GROUP"
949 specify the group the device belongs to.
950 The available groups are listed in file
951 .BR "@SYSCONFDIR@/group" .
952
953 .TP
954 .BI vf " NUM"
955 specify a Virtual Function device to be configured. The associated PF device
956 must be specified using the
957 .B dev
958 parameter.
959
960 .in +8
961 .BI mac " LLADDRESS"
962 - change the station address for the specified VF. The
963 .B vf
964 parameter must be specified.
965
966 .sp
967 .BI vlan " VLANID"
968 - change the assigned VLAN for the specified VF. When specified, all traffic
969 sent from the VF will be tagged with the specified VLAN ID. Incoming traffic
970 will be filtered for the specified VLAN ID, and will have all VLAN tags
971 stripped before being passed to the VF. Setting this parameter to 0 disables
972 VLAN tagging and filtering. The
973 .B vf
974 parameter must be specified.
975
976 .sp
977 .BI qos " VLAN-QOS"
978 - assign VLAN QOS (priority) bits for the VLAN tag. When specified, all VLAN
979 tags transmitted by the VF will include the specified priority bits in the
980 VLAN tag. If not specified, the value is assumed to be 0. Both the
981 .B vf
982 and
983 .B vlan
984 parameters must be specified. Setting both
985 .B vlan
986 and
987 .B qos
988 as 0 disables VLAN tagging and filtering for the VF.
989
990 .sp
991 .BI rate " TXRATE"
992 -- change the allowed transmit bandwidth, in Mbps, for the specified VF.
993 Setting this parameter to 0 disables rate limiting.
994 .B vf
995 parameter must be specified.
996 Please use new API
997 .B "max_tx_rate"
998 option instead.
999
1000 .sp
1001 .BI max_tx_rate " TXRATE"
1002 - change the allowed maximum transmit bandwidth, in Mbps, for the specified VF.
1003 .B vf
1004 parameter must be specified.
1005
1006 .sp
1007 .BI min_tx_rate " TXRATE"
1008 - change the allowed minimum transmit bandwidth, in Mbps, for the specified VF.
1009 Minimum TXRATE should be always <= Maximum TXRATE.
1010 .B vf
1011 parameter must be specified.
1012
1013 .sp
1014 .BI spoofchk " on|off"
1015 - turn packet spoof checking on or off for the specified VF.
1016 .sp
1017 .BI state " auto|enable|disable"
1018 - set the virtual link state as seen by the specified VF. Setting to auto means a
1019 reflection of the PF link state, enable lets the VF to communicate with other VFs on
1020 this host even if the PF link state is down, disable causes the HW to drop any packets
1021 sent by the VF.
1022 .in -8
1023
1024 .TP
1025 .BI master " DEVICE"
1026 set master device of the device (enslave device).
1027
1028 .TP
1029 .BI nomaster
1030 unset master device of the device (release device).
1031
1032 .TP
1033 .BI addrgenmode " eui64|none|stable_secret|random"
1034 set the IPv6 address generation mode
1035
1036 .I eui64
1037 - use a Modified EUI-64 format interface identifier
1038
1039 .I none
1040 - disable automatic address generation
1041
1042 .I stable_secret
1043 - generate the interface identifier based on a preset /proc/sys/net/ipv6/conf/{default,DEVICE}/stable_secret
1044
1045 .I random
1046 - like stable_secret, but auto-generate a new random secret if none is set
1047
1048 .TP
1049 .BR "link-netnsid "
1050 set peer netnsid for a cross-netns interface
1051
1052 .PP
1053 .B Warning:
1054 If multiple parameter changes are requested,
1055 .B ip
1056 aborts immediately after any of the changes have failed.
1057 This is the only case when
1058 .B ip
1059 can move the system to an unpredictable state. The solution
1060 is to avoid changing several parameters with one
1061 .B ip link set
1062 call.
1063
1064 .SS ip link show - display device attributes
1065
1066 .TP
1067 .BI dev " NAME " (default)
1068 .I NAME
1069 specifies the network device to show.
1070 If this argument is omitted all devices in the default group are listed.
1071
1072 .TP
1073 .BI group " GROUP "
1074 .I GROUP
1075 specifies what group of devices to show.
1076
1077 .TP
1078 .B up
1079 only display running interfaces.
1080
1081 .TP
1082 .BI master " DEVICE "
1083 .I DEVICE
1084 specifies the master device which enslaves devices to show.
1085
1086 .TP
1087 .BI type " TYPE "
1088 .I TYPE
1089 specifies the type of devices to show.
1090
1091 .TP
1092 The show command has additional formatting options:
1093
1094 .RS
1095 .TP
1096 .BR "\-s" , " \-stats", " \-statistics"
1097 output more statistics about packet usage.
1098
1099 .TP
1100 .BR "\-d", " \-details"
1101 output more detailed information.
1102
1103 .TP
1104 .BR "\-h", " \-human", " \-human-readable"
1105 output statistics with human readable values number followed by suffix
1106
1107 .TP
1108 .BR "\-iec"
1109 print human readable rates in IEC units (ie. 1K = 1024).
1110 .RE
1111
1112 .SS ip link help - display help
1113
1114 .PP
1115 .I "TYPE"
1116 specifies which help of link type to dislpay.
1117
1118 .SS
1119 .I GROUP
1120 may be a number or a string from the file
1121 .B @SYSCONFDIR@/group
1122 which can be manually filled.
1123
1124 .SH "EXAMPLES"
1125 .PP
1126 ip link show
1127 .RS 4
1128 Shows the state of all network interfaces on the system.
1129 .RE
1130 .PP
1131 ip link show type bridge
1132 .RS 4
1133 Shows the bridge devices.
1134 .RE
1135 .PP
1136 ip link show type vlan
1137 .RS 4
1138 Shows the vlan devices.
1139 .RE
1140 .PP
1141 ip link show master br0
1142 .RS 4
1143 Shows devices enslaved by br0
1144 .RE
1145 .PP
1146 ip link set dev ppp0 mtu 1400
1147 .RS 4
1148 Change the MTU the ppp0 device.
1149 .RE
1150 .PP
1151 ip link add link eth0 name eth0.10 type vlan id 10
1152 .RS 4
1153 Creates a new vlan device eth0.10 on device eth0.
1154 .RE
1155 .PP
1156 ip link delete dev eth0.10
1157 .RS 4
1158 Removes vlan device.
1159 .RE
1160
1161 ip link help gre
1162 .RS 4
1163 Display help for the gre link type.
1164 .RE
1165 .PP
1166 ip link add name tun1 type ipip remote 192.168.1.1
1167 local 192.168.1.2 ttl 225 encap gue encap-sport auto
1168 encap-dport 5555 encap-csum encap-remcsum
1169 .RS 4
1170 Creates an IPIP that is encapsulated with Generic UDP Encapsulation,
1171 and the outer UDP checksum and remote checksum offload are enabled.
1172
1173 .RE
1174 .PP
1175 ip link add link wpan0 lowpan0 type lowpan
1176 .RS 4
1177 Creates a 6LoWPAN interface named lowpan0 on the underlying
1178 IEEE 802.15.4 device wpan0.
1179 .RE
1180
1181 .SH SEE ALSO
1182 .br
1183 .BR ip (8),
1184 .BR ip-netns (8),
1185 .BR ethtool (8),
1186 .BR iptables (8)
1187
1188 .SH AUTHOR
1189 Original Manpage by Michail Litvak <mci@owl.openwall.com>