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