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