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