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