]> git.proxmox.com Git - mirror_iproute2.git/blame - man/man8/ip-link.8.in
tc: print skbedit action when dumping actions.
[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
c7272ca7
DB
129.RB "[ " xdp " { " off " | "
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] [
52a59869 663.RB [ no ] encap-remcsum
1ab0f02f 664]
90f1df71
TH
665
666.in +8
667.sp
668.BI remote " ADDR "
669- specifies the remote address of the tunnel.
670
671.sp
672.BI local " ADDR "
673- specifies the fixed local address for tunneled packets.
674It must be an address on another interface on this host.
675
676.sp
52a59869 677.BR encap " { " fou " | " gue " | " none " }"
90f1df71
TH
678- specifies type of secondary UDP encapsulation. "fou" indicates
679Foo-Over-UDP, "gue" indicates Generic UDP Encapsulation.
680
681.sp
52a59869 682.BR encap-sport " { " \fIPORT " | " auto " }"
90f1df71
TH
683- specifies the source port in UDP encapsulation.
684.IR PORT
685indicates the port by number, "auto"
686indicates that the port number should be chosen automatically
687(the kernel picks a flow based on the flow hash of the
688encapsulated packet).
689
690.sp
52a59869 691.RB [ no ] encap-csum
90f1df71
TH
692- specifies if UDP checksums are enabled in the secondary
693encapsulation.
694
695.sp
52a59869 696.RB [ no ] encap-remcsum
90f1df71
TH
697- specifies if Remote Checksum Offload is enabled. This is only
698applicable for Generic UDP Encapsulation.
699
700.in -8
701
9abde37c 702.TP
703IP6GRE/IP6GRETAP Type Support
63f60e3a 704For a link of type
9abde37c 705.I IP6GRE/IP6GRETAP
706the following additional arguments are supported:
707
708.BI "ip link add " DEVICE
52a59869
PS
709.BR type " { " ip6gre " | " ip6gretap " }"
710.BI remote " ADDR " local " ADDR"
1ab0f02f 711[
52a59869 712.RB [ i | o ] seq
1ab0f02f 713] [
52a59869
PS
714.RB [ i | o ] key
715.I KEY
1ab0f02f 716] [
52a59869 717.RB [ i | o ] csum
1ab0f02f 718] [
9abde37c 719.BI hoplimit " TTL "
1ab0f02f 720] [
9abde37c 721.BI encaplimit " ELIM "
1ab0f02f 722] [
9abde37c 723.BI tclass " TCLASS "
1ab0f02f 724] [
9abde37c 725.BI flowlabel " FLOWLABEL "
1ab0f02f 726] [
9abde37c 727.BI "dscp inherit"
1ab0f02f 728] [
9abde37c 729.BI dev " PHYS_DEV "
1ab0f02f 730]
9abde37c 731
732.in +8
733.sp
734.BI remote " ADDR "
735- specifies the remote IPv6 address of the tunnel.
736
737.sp
738.BI local " ADDR "
739- specifies the fixed local IPv6 address for tunneled packets.
90f1df71 740It must be an address on another interface on this host.
9abde37c 741
742.sp
52a59869 743.RB [ i | o ] seq
9abde37c 744- serialize packets.
745The
746.B oseq
747flag enables sequencing of outgoing packets.
748The
749.B iseq
750flag requires that all input packets are serialized.
751
752.sp
52a59869 753.RB [ i | o ] key " \fIKEY"
9abde37c 754- use keyed GRE with key
755.IR KEY ". "KEY
756is either a number or an IPv4 address-like dotted quad.
757The
758.B key
759parameter specifies the same key to use in both directions.
760The
761.BR ikey " and " okey
762parameters specify different keys for input and output.
763
764.sp
52a59869 765.RB [ i | o ] csum
9abde37c 766- generate/require checksums for tunneled packets.
767The
768.B ocsum
769flag calculates checksums for outgoing packets.
770The
771.B icsum
772flag requires that all input packets have the correct
a89d5329 773checksum. The
9abde37c 774.B csum
775flag is equivalent to the combination
776.BR "icsum ocsum" .
777
778.sp
779.BI hoplimit " TTL"
780- specifies Hop Limit value to use in outgoing packets.
781
782.sp
783.BI encaplimit " ELIM"
a89d5329 784- specifies a fixed encapsulation limit. Default is 4.
9abde37c 785
786.sp
787.BI flowlabel " FLOWLABEL"
63f60e3a 788- specifies a fixed flowlabel.
9abde37c 789
790.sp
791.BI tclass " TCLASS"
792- specifies the traffic class field on
793tunneled packets, which can be specified as either a two-digit
794hex value (e.g. c0) or a predefined string (e.g. internet).
795The value
796.B inherit
797causes the field to be copied from the original IP header. The
798values
799.BI "inherit/" STRING
800or
801.BI "inherit/" 00 ".." ff
802will set the field to
803.I STRING
804or
805.IR 00 ".." ff
806when tunneling non-IP packets. The default value is 00.
807
808.in -8
809
8ca8fac7
OG
810.TP
811IPoIB Type Support
812For a link of type
813.I IPoIB
814the following additional arguments are supported:
815
816.BI "ip link add " DEVICE " name " NAME
52a59869 817.BR "type ipoib " [ " pkey \fIPKEY" " ] [ " mode " \fIMODE \fR]"
8ca8fac7
OG
818
819.in +8
820.sp
821.BI pkey " PKEY "
822- specifies the IB P-Key to use.
823
824.BI mode " MODE "
825- specifies the mode (datagram or connected) to use.
826
c1a1d8bc
JL
827.TP
828GENEVE Type Support
829For a link of type
830.I GENEVE
831the following additional arguments are supported:
832
833.BI "ip link add " DEVICE
52a59869 834.BI type " geneve " id " VNI " remote " IPADDR"
1ab0f02f 835[
f4c05c2e 836.BI ttl " TTL "
1ab0f02f 837] [
f4739b2e 838.BI tos " TOS "
29bb2373
DB
839] [
840.BI flowlabel " FLOWLABEL "
7e33b093
PS
841] [
842.BI dstport " PORT"
843] [
844.RB [ no ] external
845] [
846.RB [ no ] udpcsum
847] [
848.RB [ no ] udp6zerocsumtx
849] [
850.RB [ no ] udp6zerocsumrx
1ab0f02f 851]
c1a1d8bc
JL
852
853.in +8
854.sp
855.BI id " VNI "
856- specifies the Virtual Network Identifer to use.
857
858.sp
859.BI remote " IPADDR"
860- specifies the unicast destination IP address to use in outgoing packets.
861
f4c05c2e
JL
862.sp
863.BI ttl " TTL"
864- specifies the TTL value to use in outgoing packets.
865
f4739b2e
JL
866.sp
867.BI tos " TOS"
868- specifies the TOS value to use in outgoing packets.
869
29bb2373
DB
870.sp
871.BI flowlabel " FLOWLABEL"
872- specifies the flow label to use in outgoing packets.
873
7e33b093
PS
874.sp
875.BI dstport " PORT"
876- select a destination port other than the default of 6081.
877
878.sp
879.RB [ no ] external
880- make this tunnel externally controlled (or not, which is the default). This
881flag is mutually exclusive with the
882.BR id ,
883.BR remote ,
884.BR ttl ,
885.BR tos " and " flowlabel
886options.
887
888.sp
889.RB [ no ] udpcsum
890- specifies if UDP checksum is calculated for transmitted packets over IPv4.
891
892.sp
893.RB [ no ] udp6zerocsumtx
894- skip UDP checksum calculation for transmitted packets over IPv6.
895
896.sp
897.RB [ no ] udp6zerocsumrx
898- allow incoming UDP packets over IPv6 with zero checksum field.
899
c1a1d8bc
JL
900.in -8
901
a60223bc
PS
902.TP
903MACVLAN and MACVTAP Type Support
904For a link of type
905.I MACVLAN
906or
907.I MACVTAP
908the following additional arguments are supported:
909
910.BI "ip link add link " DEVICE " name " NAME
911.BR type " { " macvlan " | " macvtap " } "
912.BR mode " { " private " | " vepa " | " bridge " | " passthru
aa1b44ca 913.RB " [ " nopromisc " ] | " source " } "
a60223bc
PS
914
915.in +8
916.sp
917.BR type " { " macvlan " | " macvtap " } "
918- specifies the link type to use.
919.BR macvlan " creates just a virtual interface, while "
920.BR macvtap " in addition creates a character device "
921.BR /dev/tapX " to be used just like a " tuntap " device."
922
923.B mode private
924- Do not allow communication between
925.B macvlan
926instances on the same physical interface, even if the external switch supports
927hairpin mode.
928
929.B mode vepa
930- Virtual Ethernet Port Aggregator mode. Data from one
931.B macvlan
932instance to the other on the same physical interface is transmitted over the
933physical interface. Either the attached switch needs to support hairpin mode,
934or there must be a TCP/IP router forwarding the packets in order to allow
935communication. This is the default mode.
936
937.B mode bridge
938- In bridge mode, all endpoints are directly connected to each other,
939communication is not redirected through the physical interface's peer.
940
941.BR mode " " passthru " [ " nopromisc " ] "
942- This mode gives more power to a single endpoint, usually in
943.BR macvtap " mode. It is not allowed for more than one endpoint on the same "
944physical interface. All traffic will be forwarded to this endpoint, allowing
945virtio guests to change MAC address or set promiscuous mode in order to bridge
946the interface or create vlan interfaces on top of it. By default, this mode
947forces the underlying interface into promiscuous mode. Passing the
948.BR nopromisc " flag prevents this, so the promisc flag may be controlled "
949using standard tools.
aa1b44ca 950
951.B mode source
952- allows one to set a list of allowed mac address, which is used to match
953against source mac address from received frames on underlying interface. This
954allows creating mac based VLAN associations, instead of standard port or tag
955based. The feature is useful to deploy 802.1x mac based behavior,
956where drivers of underlying interfaces doesn't allows that.
a60223bc
PS
957.in -8
958
9b3c971a
PH
959.TP
960High-availability Seamless Redundancy (HSR) Support
961For a link of type
962.I HSR
963the following additional arguments are supported:
964
52a59869 965.BI "ip link add link " DEVICE " name " NAME " type hsr"
9b3c971a 966.BI slave1 " SLAVE1-IF " slave2 " SLAVE2-IF "
52a59869
PS
967.RB [ " supervision"
968.IR ADDR-BYTE " ] ["
969.BR version " { " 0 " | " 1 " } ]"
9b3c971a
PH
970
971.in +8
972.sp
973.BR type " hsr "
974- specifies the link type to use, here HSR.
975
976.BI slave1 " SLAVE1-IF "
977- Specifies the physical device used for the first of the two ring ports.
978
979.BI slave2 " SLAVE2-IF "
980- Specifies the physical device used for the second of the two ring ports.
981
52a59869 982.BI supervision " ADDR-BYTE"
9b3c971a
PH
983- The last byte of the multicast address used for HSR supervision frames.
984Default option is "0", possible values 0-255.
985
52a59869 986.BR version " { " 0 " | " 1 " }"
9b3c971a
PH
987- Selects the protocol version of the interface. Default option is "0", which
988corresponds to the 2010 version of the HSR standard. Option "1" activates the
9892012 version.
990.in -8
991
b26fc590
SD
992.TP
993MACsec Type Support
994For a link of type
995.I MACsec
996the following additional arguments are supported:
997
998.BI "ip link add link " DEVICE " name " NAME " type macsec"
5898bd66
DC
999[ [
1000.BI address " <lladdr>"
1001]
b26fc590
SD
1002.BI port " PORT"
1003|
1004.BI sci " SCI"
1005] [
1006.BI cipher " CIPHER_SUITE"
1007] [
89bb6e67
DC
1008.BR icvlen " { "
1009.IR 8..16 " } ] ["
b26fc590
SD
1010.BR encrypt " {"
1011.BR on " | " off " } ] [ "
1012.BR send_sci " { " on " | " off " } ] ["
c0ab80a4 1013.BR end_station " { " on " | " off " } ] ["
b26fc590
SD
1014.BR scb " { " on " | " off " } ] ["
1015.BR protect " { " on " | " off " } ] ["
1016.BR replay " { " on " | " off " }"
1017.BR window " { "
1018.IR 0..2^32-1 " } ] ["
1019.BR validate " { " strict " | " check " | " disabled " } ] ["
c0ab80a4 1020.BR encodingsa " { "
b26fc590
SD
1021.IR 0..3 " } ]"
1022
1023.in +8
1024.sp
5898bd66
DC
1025.BI address " <lladdr> "
1026- sets the system identifier component of secure channel for this MACsec device.
1027
1028.sp
1029.BI port " PORT "
1030- sets the port number component of secure channel for this MACsec device, in a
1031range from 1 to 65535 inclusive. Numbers with a leading " 0 " or " 0x " are
1032interpreted as octal and hexadecimal, respectively.
b26fc590
SD
1033
1034.sp
1035.BI sci " SCI "
0330f49e
DC
1036- sets the secure channel identifier for this MACsec device.
1037.I SCI
1038is a 64bit wide number in hexadecimal format.
b26fc590
SD
1039
1040.sp
1041.BI cipher " CIPHER_SUITE "
1042- defines the cipher suite to use.
1043
89bb6e67
DC
1044.sp
1045.BI icvlen " LENGTH "
1046- sets the length of the Integrity Check Value (ICV).
1047
b26fc590
SD
1048.sp
1049.BR "encrypt on " or " encrypt off"
1050- switches between authenticated encryption, or authenticity mode only.
1051
1052.sp
1053.BR "send_sci on " or " send_sci off"
1054- specifies whether the SCI is included in every packet, or only when it is necessary.
1055
1056.sp
c0ab80a4 1057.BR "end_station on " or " end_station off"
b26fc590
SD
1058- sets the End Station bit.
1059
1060.sp
1061.BR "scb on " or " scb off"
1062- sets the Single Copy Broadcast bit.
1063
1064.sp
1065.BR "protect on " or " protect off"
1066- enables MACsec protection on the device.
1067
1068.sp
1069.BR "replay on " or " replay off"
1070- enables replay protection on the device.
1071
1072.in +8
1073
1074.sp
1075.BI window " SIZE "
1076- sets the size of the replay window.
1077
1078.in -8
1079
1080.sp
1081.BR "validate strict " or " validate check " or " validate disabled"
1082- sets the validation mode on the device.
1083
1084.sp
c0ab80a4 1085.BI encodingsa " AN "
b26fc590
SD
1086- sets the active secure association for transmission.
1087
1088.in -8
1089
2a6f9cfa
DA
1090.TP
1091VRF Type Support
1092For a link of type
1093.I VRF
1094the following additional arguments are supported:
1095
1096.BI "ip link add " DEVICE " type vrf table " TABLE
1097
1098.in +8
1099.sp
1100.BR table " table id associated with VRF device"
1101
1102.in -8
1103
761a1e60 1104.SS ip link delete - delete virtual link
761a1e60
CT
1105
1106.TP
1107.BI dev " DEVICE "
7f74cf6d
VK
1108specifies the virtual device to act operate on.
1109
1110.TP
1111.BI group " GROUP "
1112specifies the group of virtual links to delete. Group 0 is not allowed to be
1113deleted since it is the default group.
1114
1115.TP
1116.BI type " TYPE "
1117specifies the type of the device.
761a1e60
CT
1118
1119.SS ip link set - change device attributes
1120
f9e9f928
PS
1121.PP
1122.B Warning:
1123If multiple parameter changes are requested,
1124.B ip
1125aborts immediately after any of the changes have failed.
1126This is the only case when
1127.B ip
1128can move the system to an unpredictable state. The solution
1129is to avoid changing several parameters with one
1130.B ip link set
1131call.
1132
761a1e60
CT
1133.TP
1134.BI dev " DEVICE "
1135.I DEVICE
6274b0b7 1136specifies network device to operate on. When configuring SR-IOV Virtual Function
761a1e60
CT
1137(VF) devices, this keyword should specify the associated Physical Function (PF)
1138device.
1139
1140.TP
1141.BI group " GROUP "
1142.I GROUP
1143has a dual role: If both group and dev are present, then move the device to the
a89d5329 1144specified group. If only a group is specified, then the command operates on
761a1e60
CT
1145all devices in that group.
1146
1147.TP
1148.BR up " and " down
1149change the state of the device to
1150.B UP
1151or
1152.BR "DOWN" .
1153
1154.TP
1155.BR "arp on " or " arp off"
1156change the
1157.B NOARP
1158flag on the device.
1159
1160.TP
1161.BR "multicast on " or " multicast off"
1162change the
1163.B MULTICAST
1164flag on the device.
1165
18864827
AK
1166.TP
1167.BR "protodown on " or " protodown off"
1168change the
1169.B PROTODOWN
1170state 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.
1171
761a1e60
CT
1172.TP
1173.BR "dynamic on " or " dynamic off"
1174change the
1175.B DYNAMIC
34c8a95c
VK
1176flag on the device. Indicates that address can change when interface goes down (currently
1177.B NOT
1178used by the Linux).
761a1e60
CT
1179
1180.TP
1181.BI name " NAME"
a89d5329 1182change the name of the device. This operation is not
761a1e60
CT
1183recommended if the device is running or has some addresses
1184already configured.
1185
1186.TP
1187.BI txqueuelen " NUMBER"
1188.TP
1189.BI txqlen " NUMBER"
1190change the transmit queue length of the device.
1191
1192.TP
1193.BI mtu " NUMBER"
1194change the
1195.I MTU
1196of the device.
1197
1198.TP
1199.BI address " LLADDRESS"
1200change the station address of the interface.
1201
1202.TP
1203.BI broadcast " LLADDRESS"
1204.TP
1205.BI brd " LLADDRESS"
1206.TP
1207.BI peer " LLADDRESS"
1208change the link layer broadcast address or the peer address when
1209the interface is
1210.IR "POINTOPOINT" .
1211
1212.TP
36324eba 1213.BI netns " NETNSNAME " \fR| " PID"
761a1e60 1214move the device to the network namespace associated with name
36324eba
VK
1215.IR "NETNSNAME " or
1216.RI process " PID".
1217
1218Some devices are not allowed to change network namespace: loopback, bridge,
1219ppp, wireless. These are network namespace local devices. In such case
1220.B ip
1221tool will return "Invalid argument" error. It is possible to find out if device is local
1222to a single network namespace by checking
1223.B netns-local
1224flag in the output of the
1225.BR ethtool ":"
1226
1227.in +8
1228.B ethtool -k
1229.I DEVICE
1230.in -8
1231
1232To change network namespace for wireless devices the
1233.B iw
1234tool can be used. But it allows to change network namespace only for physical devices and by process
1235.IR PID .
761a1e60
CT
1236
1237.TP
1238.BI alias " NAME"
1239give the device a symbolic name for easy reference.
1240
503aa4e2
1241.TP
1242.BI group " GROUP"
1243specify the group the device belongs to.
1244The available groups are listed in file
1245.BR "@SYSCONFDIR@/group" .
1246
761a1e60
CT
1247.TP
1248.BI vf " NUM"
1249specify a Virtual Function device to be configured. The associated PF device
1250must be specified using the
1251.B dev
1252parameter.
1253
1254.in +8
1255.BI mac " LLADDRESS"
1256- change the station address for the specified VF. The
1257.B vf
1258parameter must be specified.
1259
1260.sp
1261.BI vlan " VLANID"
1262- change the assigned VLAN for the specified VF. When specified, all traffic
1263sent from the VF will be tagged with the specified VLAN ID. Incoming traffic
1264will be filtered for the specified VLAN ID, and will have all VLAN tags
1265stripped before being passed to the VF. Setting this parameter to 0 disables
1266VLAN tagging and filtering. The
1267.B vf
1268parameter must be specified.
1269
1270.sp
1271.BI qos " VLAN-QOS"
1272- assign VLAN QOS (priority) bits for the VLAN tag. When specified, all VLAN
1273tags transmitted by the VF will include the specified priority bits in the
1274VLAN tag. If not specified, the value is assumed to be 0. Both the
1275.B vf
1276and
1277.B vlan
1278parameters must be specified. Setting both
1279.B vlan
1280and
1281.B qos
1282as 0 disables VLAN tagging and filtering for the VF.
1283
56e9f0ab
MS
1284.sp
1285.BI proto " VLAN-PROTO"
1286- assign VLAN PROTOCOL for the VLAN tag, either 802.1Q or 802.1ad.
1287Setting to 802.1ad, all traffic sent from the VF will be tagged with VLAN S-Tag.
1288Incoming traffic will have VLAN S-Tags stripped before being passed to the VF.
1289Setting to 802.1ad also enables an option to concatenate another VLAN tag, so both
1290S-TAG and C-TAG will be inserted/stripped for outgoing/incoming traffic, respectively.
1291If not specified, the value is assumed to be 802.1Q. Both the
1292.B vf
1293and
1294.B vlan
1295parameters must be specified.
1296
761a1e60
CT
1297.sp
1298.BI rate " TXRATE"
f89a2a05
SC
1299-- change the allowed transmit bandwidth, in Mbps, for the specified VF.
1300Setting this parameter to 0 disables rate limiting.
1301.B vf
1302parameter must be specified.
1303Please use new API
1304.B "max_tx_rate"
1305option instead.
1306
1307.sp
1308.BI max_tx_rate " TXRATE"
1309- change the allowed maximum transmit bandwidth, in Mbps, for the specified VF.
1310.B vf
1311parameter must be specified.
1312
1313.sp
1314.BI min_tx_rate " TXRATE"
1315- change the allowed minimum transmit bandwidth, in Mbps, for the specified VF.
1316Minimum TXRATE should be always <= Maximum TXRATE.
761a1e60
CT
1317.B vf
1318parameter must be specified.
1319
1320.sp
1321.BI spoofchk " on|off"
1322- turn packet spoof checking on or off for the specified VF.
63f60e3a 1323.sp
8e45e44b
PS
1324.BI query_rss " on|off"
1325- 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.
1326.sp
63f60e3a
OG
1327.BI state " auto|enable|disable"
1328- set the virtual link state as seen by the specified VF. Setting to auto means a
1329reflection of the PF link state, enable lets the VF to communicate with other VFs on
1330this host even if the PF link state is down, disable causes the HW to drop any packets
1331sent by the VF.
b6d77d9e
HS
1332.sp
1333.BI trust " on|off"
1334- trust the specified VF user. This enables that VF user can set a specific feature
1335which may impact security and/or performance. (e.g. VF multicast promiscuous mode)
d91fb3f4
EC
1336.sp
1337.BI node_guid " eui64"
1338- configure node GUID for the VF.
1339.sp
1340.BI port_guid " eui64"
1341- configure port GUID for the VF.
761a1e60
CT
1342.in -8
1343
c7272ca7
DB
1344.TP
1345.B xdp object "|" pinned "|" off
1346set (or unset) a XDP ("express data path") BPF program to run on every
1347packet at driver level.
1348
1349.B off
1350(or
1351.B none
1352)
1353- Detaches any currently attached XDP/BPF program from the given device.
1354
1355.BI object " FILE "
1356- Attaches a XDP/BPF program to the given device. The
1357.I FILE
1358points to a BPF ELF file (f.e. generated by LLVM) that contains the BPF
1359program code, map specifications, etc. If a XDP/BPF program is already
1360attached to the given device, an error will be thrown. If no XDP/BPF
1361program is currently attached, the device supports XDP and the program
1362from the BPF ELF file passes the kernel verifier, then it will be attached
1363to the device. If the option
1364.I -force
1365is passed to
1366.B ip
1367then any prior attached XDP/BPF program will be atomically overridden and
1368no error will be thrown in this case. If no
1369.B section
1370option is passed, then the default section name ("prog") will be assumed,
1371otherwise the provided section name will be used. If no
1372.B verbose
1373option is passed, then a verifier log will only be dumped on load error.
1374See also
1375.B EXAMPLES
1376section for usage examples.
1377
1378.BI section " NAME "
1379- Specifies a section name that contains the BPF program code. If no section
1380name is specified, the default one ("prog") will be used. This option is
1381to be passed with the
1382.B object
1383option.
1384
1385.BI verbose
1386- Act in verbose mode. For example, even in case of success, this will
1387print the verifier log in case a program was loaded from a BPF ELF file.
1388
1389.BI pinned " FILE "
1390- Attaches a XDP/BPF program to the given device. The
1391.I FILE
1392points to an already pinned BPF program in the BPF file system. The option
1393.B section
1394doesn't apply here, but otherwise semantics are the same as with the option
1395.B object
1396described already.
1397
761a1e60
CT
1398.TP
1399.BI master " DEVICE"
1400set master device of the device (enslave device).
1401
1402.TP
1403.BI nomaster
1404unset master device of the device (release device).
1405
503aa4e2 1406.TP
8f0777a8
BM
1407.BI addrgenmode " eui64|none|stable_secret|random"
1408set the IPv6 address generation mode
1409
1410.I eui64
1411- use a Modified EUI-64 format interface identifier
1412
1413.I none
1414- disable automatic address generation
1415
1416.I stable_secret
1417- generate the interface identifier based on a preset /proc/sys/net/ipv6/conf/{default,DEVICE}/stable_secret
1418
1419.I random
1420- like stable_secret, but auto-generate a new random secret if none is set
503aa4e2
1421
1422.TP
1423.BR "link-netnsid "
1424set peer netnsid for a cross-netns interface
1425
3dd4b893
PS
1426.TP
1427.BI type " ETYPE TYPE_ARGS"
1428Change type-specific settings. For a list of supported types and arguments refer
1429to the description of
1430.B "ip link add"
1431above. In addition to that, it is possible to manipulate settings to slave
1432devices:
1433
1434.TP
1435Bridge Slave Support
1436For a link with master
1437.B bridge
1438the following additional arguments are supported:
1439
1440.B "ip link set type bridge_slave"
1441[
e83435fc
HL
1442.B fdb_flush
1443] [
3dd4b893
PS
1444.BI state " STATE"
1445] [
1446.BI priority " PRIO"
1447] [
1448.BI cost " COST"
1449] [
1450.BR guard " { " on " | " off " }"
1451] [
1452.BR hairpin " { " on " | " off " }"
1453] [
1454.BR fastleave " { " on " | " off " }"
1455] [
1456.BR root_block " { " on " | " off " }"
1457] [
1458.BR learning " { " on " | " off " }"
1459] [
1460.BR flood " { " on " | " off " }"
1461] [
1462.BR proxy_arp " { " on " | " off " }"
1463] [
1464.BR proxy_arp_wifi " { " on " | " off " }"
1465] [
1466.BI mcast_router " MULTICAST_ROUTER"
1467] [
9208b4e7
NA
1468.BR mcast_fast_leave " { " on " | " off "}"
1469] [
1470.BR mcast_flood " { " on " | " off " } ]"
3dd4b893
PS
1471
1472.in +8
1473.sp
e83435fc
HL
1474.B fdb_flush
1475- flush bridge slave's fdb dynamic entries.
1476
3dd4b893
PS
1477.BI state " STATE"
1478- Set port state.
1479.I STATE
1480is a number representing the following states:
1481.BR 0 " (disabled),"
1482.BR 1 " (listening),"
1483.BR 2 " (learning),"
1484.BR 3 " (forwarding),"
1485.BR 4 " (blocking)."
1486
1487.BI priority " PRIO"
1488- set port priority (a 16bit unsigned value).
1489
1490.BI cost " COST"
1491- set port cost (a 32bit unsigned value).
1492
1493.BR guard " { " on " | " off " }"
1494- block incoming BPDU packets on this port.
1495
1496.BR hairpin " { " on " | " off " }"
1497- enable hairpin mode on this port. This will allow incoming packets on this
1498port to be reflected back.
1499
1500.BR fastleave " { " on " | " off " }"
1501- enable multicast fast leave on this port.
1502
1503.BR root_block " { " on " | " off " }"
1504- block this port from becoming the bridge's root port.
1505
1506.BR learning " { " on " | " off " }"
1507- allow MAC address learning on this port.
1508
1509.BR flood " { " on " | " off " }"
1510- open the flood gates on this port, i.e. forward all unicast frames to this
1511port also. Requires
1512.BR proxy_arp " and " proxy_arp_wifi
1513to be turned off.
1514
1515.BR proxy_arp " { " on " | " off " }"
1516- enable proxy ARP on this port.
1517
1518.BR proxy_arp_wifi " { " on " | " off " }"
1519- enable proxy ARP on this port which meets extended requirements by IEEE
1520802.11 and Hotspot 2.0 specifications.
1521
1522.BI mcast_router " MULTICAST_ROUTER"
1523- configure this port for having multicast routers attached. A port with a
1524multicast router will receive all multicast traffic.
1525.I MULTICAST_ROUTER
1526may be either
1527.B 0
1528to disable multicast routers on this port,
1529.B 1
1530to let the system detect the presence of of routers (this is the default),
1531.B 2
1532to permanently enable multicast traffic forwarding on this port or
1533.B 3
1534to enable multicast routers temporarily on this port, not depending on incoming
1535queries.
1536
1537.BR mcast_fast_leave " { " on " | " off " }"
1538- this is a synonym to the
1539.B fastleave
1540option above.
1541
9208b4e7
NA
1542.BR mcast_flood " { " on " | " off " }"
1543- controls whether a given port will be flooded with multicast traffic for which there is no MDB entry.
1544
3dd4b893
PS
1545.in -8
1546
1547.TP
1548Bonding Slave Support
1549For a link with master
1550.B bond
1551the following additional arguments are supported:
1552
1553.B "ip link set type bond_slave"
1554[
1555.BI queue_id " ID"
1556]
1557
1558.in +8
1559.sp
1560.BI queue_id " ID"
1561- set the slave's queue ID (a 16bit unsigned value).
1562
1563.in -8
1564
aa1b44ca 1565.TP
1566MACVLAN and MACVTAP Support
1567Modify list of allowed macaddr for link in source mode.
1568
1569.B "ip link set type { macvlan | macvap } "
1570[
1571.BI macaddr " " "" COMMAND " " MACADDR " ..."
1572]
1573
1574Commands:
1575.in +8
1576.B add
1577- add MACADDR to allowed list
1578.sp
1579.B set
1580- replace allowed list
1581.sp
1582.B del
1583- remove MACADDR from allowed list
1584.sp
1585.B flush
1586- flush whole allowed list
1587.sp
1588.in -8
1589
1590
761a1e60
CT
1591.SS ip link show - display device attributes
1592
1593.TP
1594.BI dev " NAME " (default)
1595.I NAME
1596specifies the network device to show.
1597If this argument is omitted all devices in the default group are listed.
1598
1599.TP
1600.BI group " GROUP "
1601.I GROUP
1602specifies what group of devices to show.
1603
1604.TP
1605.B up
1606only display running interfaces.
1607
1b944148
VK
1608.TP
1609.BI master " DEVICE "
1610.I DEVICE
1611specifies the master device which enslaves devices to show.
1612
104444c2
DA
1613.TP
1614.BI vrf " NAME "
1615.I NAME
1616speficies the VRF which enslaves devices to show.
1617
712249d8
VK
1618.TP
1619.BI type " TYPE "
1620.I TYPE
1621specifies the type of devices to show.
1622
3462c116
PS
1623Note that the type name is not checked against the list of supported types -
1624instead it is sent as-is to the kernel. Later it is used to filter the returned
1625interface list by comparing it with the relevant attribute in case the kernel
1626didn't filter already. Therefore any string is accepted, but may lead to empty
1627output.
1628
94f1a22a
NA
1629.SS ip link xstats - display extended statistics
1630
1631.TP
1632.BI type " TYPE "
1633.I TYPE
1634specifies the type of devices to display extended statistics for.
1635
837552b4
RS
1636.SS ip link afstats - display address-family specific statistics
1637
1638.TP
1639.BI dev " DEVICE "
1640.I DEVICE
1641specifies the device to display address-family statistics for.
1642
1f299e92 1643.SS ip link help - display help
1644
1645.PP
1646.I "TYPE"
1647specifies which help of link type to dislpay.
1648
032b4f4d
VK
1649.SS
1650.I GROUP
1651may be a number or a string from the file
699589f6 1652.B @SYSCONFDIR@/group
032b4f4d
VK
1653which can be manually filled.
1654
761a1e60
CT
1655.SH "EXAMPLES"
1656.PP
1657ip link show
1658.RS 4
1659Shows the state of all network interfaces on the system.
1660.RE
1661.PP
712249d8
VK
1662ip link show type bridge
1663.RS 4
1664Shows the bridge devices.
1665.RE
1666.PP
1667ip link show type vlan
1668.RS 4
1669Shows the vlan devices.
1670.RE
1671.PP
417b2180
VK
1672ip link show master br0
1673.RS 4
1674Shows devices enslaved by br0
1675.RE
1676.PP
761a1e60
CT
1677ip link set dev ppp0 mtu 1400
1678.RS 4
1679Change the MTU the ppp0 device.
1680.RE
1681.PP
1682ip link add link eth0 name eth0.10 type vlan id 10
1683.RS 4
1684Creates a new vlan device eth0.10 on device eth0.
1685.RE
1686.PP
1687ip link delete dev eth0.10
1688.RS 4
1689Removes vlan device.
1690.RE
1691
1f299e92 1692ip link help gre
1693.RS 4
1694Display help for the gre link type.
90f1df71
TH
1695.RE
1696.PP
1697ip link add name tun1 type ipip remote 192.168.1.1
1698local 192.168.1.2 ttl 225 encap gue encap-sport auto
1699encap-dport 5555 encap-csum encap-remcsum
1700.RS 4
1701Creates an IPIP that is encapsulated with Generic UDP Encapsulation,
1702and the outer UDP checksum and remote checksum offload are enabled.
c7272ca7
DB
1703.RE
1704.PP
1705ip link set dev eth0 xdp obj prog.o
1706.RS 4
1707Attaches a XDP/BPF program to device eth0, where the program is
1708located in prog.o, section "prog" (default section). In case a
1709XDP/BPF program is already attached, throw an error.
1710.RE
1711.PP
1712ip -force link set dev eth0 xdp obj prog.o sec foo
1713.RS 4
1714Attaches a XDP/BPF program to device eth0, where the program is
1715located in prog.o, section "foo". In case a XDP/BPF program is
1716already attached, it will be overridden by the new one.
1717.RE
1718.PP
1719ip -force link set dev eth0 xdp pinned /sys/fs/bpf/foo
1720.RS 4
1721Attaches a XDP/BPF program to device eth0, where the program was
1722previously pinned as an object node into BPF file system under
1723name foo.
1724.RE
1725.PP
1726ip link set dev eth0 xdp off
1727.RS 4
1728If a XDP/BPF program is attached on device eth0, detach it and
1729effectively turn off XDP for device eth0.
2c0feda8
LB
1730.RE
1731.PP
1732ip link add link wpan0 lowpan0 type lowpan
1733.RS 4
1734Creates a 6LoWPAN interface named lowpan0 on the underlying
1735IEEE 802.15.4 device wpan0.
1f299e92 1736.RE
1737
761a1e60
CT
1738.SH SEE ALSO
1739.br
d5910297 1740.BR ip (8),
e612883c 1741.BR ip-netns (8),
ab872442
VK
1742.BR ethtool (8),
1743.BR iptables (8)
761a1e60
CT
1744
1745.SH AUTHOR
1746Original Manpage by Michail Litvak <mci@owl.openwall.com>