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