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