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