]> git.proxmox.com Git - mirror_iproute2.git/blame - man/man8/ip-link.8.in
Merge branch 'master' into net-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
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
129.RB "[ " master
130.IR DEVICE " ]"
131.br
132.RB "[ " nomaster " ]"
133.br
104444c2
DA
134.RB "[ " vrf
135.IR NAME " ]"
136.br
ca611d64 137.RB "[ " addrgenmode " { " eui64 " | " none " | " stable_secret " | " random " } ]"
aa1b44ca 138.br
139.RB "[ " macaddr " { " flush " | { " add " | " del " } "
140.IR MACADDR " | set [ "
141.IR MACADDR " [ "
142.IR MACADDR " [ ... ] ] ] } ]"
143.br
761a1e60
CT
144
145.ti -8
146.B ip link show
147.RI "[ " DEVICE " | "
148.B group
ca611d64
PS
149.IR GROUP " ] ["
150.BR up " ] ["
1b944148 151.B master
ca611d64 152.IR DEVICE " ] ["
712249d8 153.B type
657426c5 154.IR ETYPE " ]"
104444c2
DA
155.B vrf
156.IR NAME " ]"
761a1e60 157
1f299e92 158.ti -8
159.B ip link help
160.RI "[ " TYPE " ]"
161
657426c5
PS
162.ti -8
163.IR TYPE " := [ "
164.BR bridge " | "
165.BR bond " | "
166.BR can " | "
167.BR dummy " | "
168.BR hsr " | "
169.BR ifb " | "
170.BR ipoib " |"
171.BR macvlan " | "
172.BR macvtap " | "
173.BR vcan " | "
174.BR veth " | "
175.BR vlan " | "
176.BR vxlan " |"
177.BR ip6tnl " |"
178.BR ipip " |"
179.BR sit " |"
180.BR gre " |"
181.BR gretap " |"
182.BR ip6gre " |"
183.BR ip6gretap " |"
184.BR vti " |"
185.BR nlmon " |"
186.BR ipvlan " |"
187.BR lowpan " |"
188.BR geneve " |"
fd4df5b2
DC
189.BR vrf " |"
190.BR macsec " ]"
657426c5
PS
191
192.ti -8
193.IR ETYPE " := [ " TYPE " |"
194.BR bridge_slave " | " bond_slave " ]"
195
56e9f0ab
MS
196.ti -8
197.IR VFVLAN-LIST " := [ " VFVLAN-LIST " ] " VFVLAN
198
199.ti -8
200.IR VFVLAN " := "
201.RB "[ " vlan
202.IR VLANID " [ "
203.B qos
204.IR VLAN-QOS " ] ["
205.B proto
206.IR VLAN-PROTO " ] ]"
207
761a1e60
CT
208.SH "DESCRIPTION"
209.SS ip link add - add virtual link
210
211.TP
212.BI link " DEVICE "
213specifies the physical device to act operate on.
214
215.I NAME
216specifies the name of the new virtual device.
217
218.I TYPE
219specifies the type of the new device.
220.sp
221Link types:
222
223.in +8
f1a6f4e9
SH
224.B bridge
225- Ethernet Bridge device
761a1e60 226.sp
cc26a890
JP
227.B bond
228- Bonding device
503aa4e2
229.B can
230- Controller Area Network interface
cc26a890 231.sp
761a1e60
CT
232.B dummy
233- Dummy network interface
234.sp
2f937359 235.B hsr
236- High-availability Seamless Redundancy device
237.sp
761a1e60
CT
238.B ifb
239- Intermediate Functional Block device
240.sp
f1a6f4e9
SH
241.B ipoib
242- IP over Infiniband device
243.sp
761a1e60 244.B macvlan
f1a6f4e9 245- Virtual interface base on link layer address (MAC)
761a1e60 246.sp
e4c35682
RR
247.B macvtap
248- Virtual interface based on link layer address (MAC) and TAP.
249.sp
f1a6f4e9 250.B vcan
2b70fe15 251- Virtual Controller Area Network interface
761a1e60 252.sp
f1a6f4e9
SH
253.B veth
254- Virtual ethernet interface
de038993 255.sp
f1a6f4e9
SH
256.BR vlan
257- 802.1q tagged virtual LAN interface
258.sp
259.BR vxlan
260- Virtual eXtended LAN
77987911
ND
261.sp
262.BR ip6tnl
263- Virtual tunnel interface IPv4|IPv6 over IPv6
264.sp
265.BR ipip
266- Virtual tunnel interface IPv4 over IPv4
267.sp
268.BR sit
269- Virtual tunnel interface IPv6 over IPv4
9abde37c 270.sp
271.BR gre
272- Virtual tunnel interface GRE over IPv4
273.sp
274.BR gretap
d36d9d41 275- Virtual L2 tunnel interface GRE over IPv4
9abde37c 276.sp
277.BR ip6gre
d36d9d41 278- Virtual tunnel interface GRE over IPv6
9abde37c 279.sp
280.BR ip6gretap
d36d9d41 281- Virtual L2 tunnel interface GRE over IPv6
b6d6b5a1
VK
282.sp
283.BR vti
284- Virtual tunnel interface
285.sp
286.BR nlmon
287- Netlink monitoring device
288.sp
289.BR ipvlan
290- Interface for L3 (IPv6/IPv4) based VLANs
2c0feda8
LB
291.sp
292.BR lowpan
293- Interface for 6LoWPAN (IPv6) over IEEE 802.15.4 / Bluetooth
c1a1d8bc
JL
294.sp
295.BR geneve
296- GEneric NEtwork Virtualization Encapsulation
b26fc590
SD
297.sp
298.BR macsec
299- Interface for IEEE 802.1AE MAC Security (MACsec)
2a6f9cfa
DA
300.sp
301.BR vrf
302- Interface for L3 VRF domains
761a1e60
CT
303.in -8
304
d992f3e6
JP
305.TP
306.BI numtxqueues " QUEUE_COUNT "
307specifies the number of transmit queues for new device.
308
309.TP
310.BI numrxqueues " QUEUE_COUNT "
311specifies the number of receive queues for new device.
312
4de8d885
PE
313.TP
314.BI index " IDX "
315specifies the desired index of the new virtual device. The link creation fails, if the index is busy.
316
503aa4e2
317.TP
318VLAN Type Support
319For a link of type
320.I VLAN
321the following additional arguments are supported:
322
323.BI "ip link add
324.BI link " DEVICE "
325.BI name " NAME "
52a59869 326.B "type vlan"
1ab0f02f 327[
503aa4e2 328.BI protocol " VLAN_PROTO "
1ab0f02f 329]
503aa4e2 330.BI id " VLANID "
1ab0f02f 331[
503aa4e2 332.BR reorder_hdr " { " on " | " off " } "
1ab0f02f
TF
333]
334[
503aa4e2 335.BR gvrp " { " on " | " off " } "
1ab0f02f
TF
336]
337[
503aa4e2 338.BR mvrp " { " on " | " off " } "
1ab0f02f
TF
339]
340[
503aa4e2 341.BR loose_binding " { " on " | " off " } "
1ab0f02f
TF
342]
343[
503aa4e2 344.BI ingress-qos-map " QOS-MAP "
1ab0f02f
TF
345]
346[
503aa4e2 347.BI egress-qos-map " QOS-MAP "
1ab0f02f 348]
503aa4e2
349
350.in +8
351.sp
352.BI protocol " VLAN_PROTO "
353- either 802.1Q or 802.1ad.
354
355.BI id " VLANID "
356- specifies the VLAN Identifer to use. Note that numbers with a leading " 0 " or " 0x " are interpreted as octal or hexadeimal, respectively.
357
358.BR reorder_hdr " { " on " | " off " } "
e612883c
VK
359- specifies whether ethernet headers are reordered or not (default is
360.BR on ")."
361
362.in +4
363If
364.BR reorder_hdr " is " on
365then VLAN header will be not inserted immediately but only before passing to the
366physical device (if this device does not support VLAN offloading), the similar
367on the RX direction - by default the packet will be untagged before being
368received by VLAN device. Reordering allows to accelerate tagging on egress and
369to hide VLAN header on ingress so the packet looks like regular Ethernet packet,
79c7078e 370at the same time it might be confusing for packet capture as the VLAN header
e612883c
VK
371does not exist within the packet.
372
373VLAN offloading can be checked by
374.BR ethtool "(8):"
375.in +4
376.sp
377.B ethtool -k
378<phy_dev> |
379.RB grep " tx-vlan-offload"
380.sp
381.in -4
382where <phy_dev> is the physical device to which VLAN device is bound.
383.in -4
503aa4e2
384
385.BR gvrp " { " on " | " off " } "
386- specifies whether this VLAN should be registered using GARP VLAN Registration Protocol.
387
388.BR mvrp " { " on " | " off " } "
389- specifies whether this VLAN should be registered using Multiple VLAN Registration Protocol.
390
391.BR loose_binding " { " on " | " off " } "
392- specifies whether the VLAN device state is bound to the physical device state.
393
394.BI ingress-qos-map " QOS-MAP "
ab872442
VK
395- defines a mapping of VLAN header prio field to the Linux internal packet
396priority on incoming frames. The format is FROM:TO with multiple mappings
397separated by spaces.
503aa4e2
398
399.BI egress-qos-map " QOS-MAP "
ab872442
VK
400- defines a mapping of Linux internal packet priority to VLAN header prio field
401but for outgoing frames. The format is the same as for ingress-qos-map.
402.in +4
403
404Linux packet priority can be set by
405.BR iptables "(8)":
406.in +4
407.sp
408.B iptables
409-t mangle -A POSTROUTING [...] -j CLASSIFY --set-class 0:4
410.sp
411.in -4
412and this "4" priority can be used in the egress qos mapping to set VLAN prio "5":
413.sp
414.in +4
415.B ip
416link set veth0.10 type vlan egress 4:5
417.in -4
418.in -4
503aa4e2
419.in -8
420
2816a568
TR
421.TP
422VXLAN Type Support
63f60e3a 423For a link of type
2816a568
TR
424.I VXLAN
425the following additional arguments are supported:
426
427.BI "ip link add " DEVICE
52a59869 428.BI type " vxlan " id " VNI"
1ab0f02f 429[
2816a568 430.BI dev " PHYS_DEV "
7cfa3802
AW
431.RB " ] [ { " group " | " remote " } "
432.I IPADDR
1ab0f02f 433] [
5cd64c97
TF
434.B local
435.RI "{ "IPADDR " | "any " } "
1ab0f02f 436] [
2816a568 437.BI ttl " TTL "
1ab0f02f 438] [
2816a568 439.BI tos " TOS "
1ab0f02f 440] [
f8eb79a6
DB
441.BI flowlabel " FLOWLABEL "
442] [
503aa4e2 443.BI dstport " PORT "
1ab0f02f 444] [
503aa4e2 445.BI srcport " MIN MAX "
1ab0f02f 446] [
52a59869 447.RB [ no ] learning
1ab0f02f 448] [
52a59869 449.RB [ no ] proxy
1ab0f02f 450] [
52a59869 451.RB [ no ] rsc
1ab0f02f 452] [
52a59869 453.RB [ no ] l2miss
1ab0f02f 454] [
52a59869 455.RB [ no ] l3miss
1ab0f02f 456] [
52a59869 457.RB [ no ] udpcsum
1ab0f02f 458] [
52a59869 459.RB [ no ] udp6zerocsumtx
1ab0f02f 460] [
52a59869 461.RB [ no ] udp6zerocsumrx
1ab0f02f 462] [
c2fbc57e 463.BI ageing " SECONDS "
1ab0f02f 464] [
c2fbc57e 465.BI maxaddress " NUMBER "
1ab0f02f 466] [
52a59869 467.RB [ no ] external
42d17a61 468] [
2eb90dc7 469.B gbp
346410bd
JB
470] [
471.B gpe
1ab0f02f 472]
2816a568
TR
473
474.in +8
475.sp
476.BI id " VNI "
477- specifies the VXLAN Network Identifer (or VXLAN Segment
478Identifier) to use.
479
480.BI dev " PHYS_DEV"
481- specifies the physical device to use for tunnel endpoint communication.
482
483.sp
484.BI group " IPADDR"
485- specifies the multicast IP address to join.
7cfa3802
AW
486This parameter cannot be specified with the
487.B remote
488parameter.
489
490.sp
491.BI remote " IPADDR"
492- specifies the unicast destination IP address to use in outgoing packets
493when the destination link layer address is not known in the VXLAN device
a89d5329 494forwarding database. This parameter cannot be specified with the
7cfa3802
AW
495.B group
496parameter.
2816a568
TR
497
498.sp
499.BI local " IPADDR"
500- specifies the source IP address to use in outgoing packets.
501
502.sp
503.BI ttl " TTL"
504- specifies the TTL value to use in outgoing packets.
505
506.sp
507.BI tos " TOS"
508- specifies the TOS value to use in outgoing packets.
509
f8eb79a6
DB
510.sp
511.BI flowlabel " FLOWLABEL"
512- specifies the flow label to use in outgoing packets.
513
2816a568 514.sp
503aa4e2
515.BI dstport " PORT"
516- specifies the UDP destination port to communicate to the remote VXLAN tunnel endpoint.
517
518.sp
519.BI srcport " MIN MAX"
2816a568
TR
520- specifies the range of port numbers to use as UDP
521source ports to communicate to the remote VXLAN tunnel endpoint.
522
523.sp
52a59869 524.RB [ no ] learning
2816a568
TR
525- specifies if unknown source link layer addresses and IP addresses
526are entered into the VXLAN device forwarding database.
527
528.sp
52a59869 529.RB [ no ] rsc
2816a568
TR
530- specifies if route short circuit is turned on.
531
532.sp
52a59869 533.RB [ no ] proxy
2816a568
TR
534- specifies ARP proxy is turned on.
535
536.sp
52a59869 537.RB [ no ] l2miss
2816a568
TR
538- specifies if netlink LLADDR miss notifications are generated.
539
540.sp
52a59869 541.RB [ no ] l3miss
2816a568
TR
542- specifies if netlink IP ADDR miss notifications are generated.
543
503aa4e2 544.sp
52a59869 545.RB [ no ] udpcsum
4853ee52 546- specifies if UDP checksum is calculated for transmitted packets over IPv4.
503aa4e2
547
548.sp
52a59869 549.RB [ no ] udp6zerocsumtx
4853ee52 550- skip UDP checksum calculation for transmitted packets over IPv6.
503aa4e2
551
552.sp
52a59869 553.RB [ no ] udp6zerocsumrx
4853ee52 554- allow incoming UDP packets over IPv6 with zero checksum field.
503aa4e2 555
c2fbc57e
ND
556.sp
557.BI ageing " SECONDS"
558- specifies the lifetime in seconds of FDB entries learnt by the kernel.
559
560.sp
561.BI maxaddress " NUMBER"
562- specifies the maximum number of FDB entries.
563
42d17a61 564.sp
52a59869 565.RB [ no ] external
42d17a61
JB
566- specifies whether an external control plane
567.RB "(e.g. " "ip route encap" )
568or the internal FDB should be used.
569
2eb90dc7
TG
570.sp
571.B gbp
572- enables the Group Policy extension (VXLAN-GBP).
573
574.in +4
575Allows to transport group policy context across VXLAN network peers.
576If enabled, includes the mark of a packet in the VXLAN header for outgoing
577packets and fills the packet mark based on the information found in the
578VXLAN header for incomming packets.
579
580Format of upper 16 bits of packet mark (flags);
581
582.in +2
583+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
584.br
585|-|-|-|-|-|-|-|-|-|D|-|-|A|-|-|-|
586.br
587+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
588
589.B D :=
590Don't Learn bit. When set, this bit indicates that the egress
591VTEP MUST NOT learn the source address of the encapsulated frame.
592
593.B A :=
594Indicates that the group policy has already been applied to
595this packet. Policies MUST NOT be applied by devices when the A bit is set.
596.in -2
597
598Format of lower 16 bits of packet mark (policy ID):
599
600.in +2
601+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
602.br
603| Group Policy ID |
604.br
605+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
606.in -2
607
608Example:
609 iptables -A OUTPUT [...] -j MARK --set-mark 0x800FF
610
611.in -4
612
346410bd
JB
613.sp
614.B gpe
615- enables the Generic Protocol extension (VXLAN-GPE). Currently, this is
616only supported together with the
617.B external
618keyword.
619
2816a568
TR
620.in -8
621
90f1df71
TH
622.TP
623GRE, IPIP, SIT Type Support
624For a link of types
625.I GRE/IPIP/SIT
626the following additional arguments are supported:
627
628.BI "ip link add " DEVICE
52a59869 629.BR type " { " gre " | " ipip " | " sit " }"
90f1df71 630.BI " remote " ADDR " local " ADDR
1ab0f02f 631[
52a59869 632.BR encap " { " fou " | " gue " | " none " }"
1ab0f02f 633] [
52a59869 634.BR encap-sport " { " \fIPORT " | " auto " }"
1ab0f02f 635] [
90f1df71 636.BI "encap-dport " PORT
1ab0f02f 637] [
52a59869 638.RB [ no ] encap-csum
1ab0f02f 639] [
52a59869 640.RB [ no ] encap-remcsum
1ab0f02f 641]
90f1df71
TH
642
643.in +8
644.sp
645.BI remote " ADDR "
646- specifies the remote address of the tunnel.
647
648.sp
649.BI local " ADDR "
650- specifies the fixed local address for tunneled packets.
651It must be an address on another interface on this host.
652
653.sp
52a59869 654.BR encap " { " fou " | " gue " | " none " }"
90f1df71
TH
655- specifies type of secondary UDP encapsulation. "fou" indicates
656Foo-Over-UDP, "gue" indicates Generic UDP Encapsulation.
657
658.sp
52a59869 659.BR encap-sport " { " \fIPORT " | " auto " }"
90f1df71
TH
660- specifies the source port in UDP encapsulation.
661.IR PORT
662indicates the port by number, "auto"
663indicates that the port number should be chosen automatically
664(the kernel picks a flow based on the flow hash of the
665encapsulated packet).
666
667.sp
52a59869 668.RB [ no ] encap-csum
90f1df71
TH
669- specifies if UDP checksums are enabled in the secondary
670encapsulation.
671
672.sp
52a59869 673.RB [ no ] encap-remcsum
90f1df71
TH
674- specifies if Remote Checksum Offload is enabled. This is only
675applicable for Generic UDP Encapsulation.
676
677.in -8
678
9abde37c 679.TP
680IP6GRE/IP6GRETAP Type Support
63f60e3a 681For a link of type
9abde37c 682.I IP6GRE/IP6GRETAP
683the following additional arguments are supported:
684
685.BI "ip link add " DEVICE
52a59869
PS
686.BR type " { " ip6gre " | " ip6gretap " }"
687.BI remote " ADDR " local " ADDR"
1ab0f02f 688[
52a59869 689.RB [ i | o ] seq
1ab0f02f 690] [
52a59869
PS
691.RB [ i | o ] key
692.I KEY
1ab0f02f 693] [
52a59869 694.RB [ i | o ] csum
1ab0f02f 695] [
9abde37c 696.BI hoplimit " TTL "
1ab0f02f 697] [
9abde37c 698.BI encaplimit " ELIM "
1ab0f02f 699] [
9abde37c 700.BI tclass " TCLASS "
1ab0f02f 701] [
9abde37c 702.BI flowlabel " FLOWLABEL "
1ab0f02f 703] [
9abde37c 704.BI "dscp inherit"
1ab0f02f 705] [
9abde37c 706.BI dev " PHYS_DEV "
1ab0f02f 707]
9abde37c 708
709.in +8
710.sp
711.BI remote " ADDR "
712- specifies the remote IPv6 address of the tunnel.
713
714.sp
715.BI local " ADDR "
716- specifies the fixed local IPv6 address for tunneled packets.
90f1df71 717It must be an address on another interface on this host.
9abde37c 718
719.sp
52a59869 720.RB [ i | o ] seq
9abde37c 721- serialize packets.
722The
723.B oseq
724flag enables sequencing of outgoing packets.
725The
726.B iseq
727flag requires that all input packets are serialized.
728
729.sp
52a59869 730.RB [ i | o ] key " \fIKEY"
9abde37c 731- use keyed GRE with key
732.IR KEY ". "KEY
733is either a number or an IPv4 address-like dotted quad.
734The
735.B key
736parameter specifies the same key to use in both directions.
737The
738.BR ikey " and " okey
739parameters specify different keys for input and output.
740
741.sp
52a59869 742.RB [ i | o ] csum
9abde37c 743- generate/require checksums for tunneled packets.
744The
745.B ocsum
746flag calculates checksums for outgoing packets.
747The
748.B icsum
749flag requires that all input packets have the correct
a89d5329 750checksum. The
9abde37c 751.B csum
752flag is equivalent to the combination
753.BR "icsum ocsum" .
754
755.sp
756.BI hoplimit " TTL"
757- specifies Hop Limit value to use in outgoing packets.
758
759.sp
760.BI encaplimit " ELIM"
a89d5329 761- specifies a fixed encapsulation limit. Default is 4.
9abde37c 762
763.sp
764.BI flowlabel " FLOWLABEL"
63f60e3a 765- specifies a fixed flowlabel.
9abde37c 766
767.sp
768.BI tclass " TCLASS"
769- specifies the traffic class field on
770tunneled packets, which can be specified as either a two-digit
771hex value (e.g. c0) or a predefined string (e.g. internet).
772The value
773.B inherit
774causes the field to be copied from the original IP header. The
775values
776.BI "inherit/" STRING
777or
778.BI "inherit/" 00 ".." ff
779will set the field to
780.I STRING
781or
782.IR 00 ".." ff
783when tunneling non-IP packets. The default value is 00.
784
785.in -8
786
8ca8fac7
OG
787.TP
788IPoIB Type Support
789For a link of type
790.I IPoIB
791the following additional arguments are supported:
792
793.BI "ip link add " DEVICE " name " NAME
52a59869 794.BR "type ipoib " [ " pkey \fIPKEY" " ] [ " mode " \fIMODE \fR]"
8ca8fac7
OG
795
796.in +8
797.sp
798.BI pkey " PKEY "
799- specifies the IB P-Key to use.
800
801.BI mode " MODE "
802- specifies the mode (datagram or connected) to use.
803
c1a1d8bc
JL
804.TP
805GENEVE Type Support
806For a link of type
807.I GENEVE
808the following additional arguments are supported:
809
810.BI "ip link add " DEVICE
52a59869 811.BI type " geneve " id " VNI " remote " IPADDR"
1ab0f02f 812[
f4c05c2e 813.BI ttl " TTL "
1ab0f02f 814] [
f4739b2e 815.BI tos " TOS "
29bb2373
DB
816] [
817.BI flowlabel " FLOWLABEL "
7e33b093
PS
818] [
819.BI dstport " PORT"
820] [
821.RB [ no ] external
822] [
823.RB [ no ] udpcsum
824] [
825.RB [ no ] udp6zerocsumtx
826] [
827.RB [ no ] udp6zerocsumrx
1ab0f02f 828]
c1a1d8bc
JL
829
830.in +8
831.sp
832.BI id " VNI "
833- specifies the Virtual Network Identifer to use.
834
835.sp
836.BI remote " IPADDR"
837- specifies the unicast destination IP address to use in outgoing packets.
838
f4c05c2e
JL
839.sp
840.BI ttl " TTL"
841- specifies the TTL value to use in outgoing packets.
842
f4739b2e
JL
843.sp
844.BI tos " TOS"
845- specifies the TOS value to use in outgoing packets.
846
29bb2373
DB
847.sp
848.BI flowlabel " FLOWLABEL"
849- specifies the flow label to use in outgoing packets.
850
7e33b093
PS
851.sp
852.BI dstport " PORT"
853- select a destination port other than the default of 6081.
854
855.sp
856.RB [ no ] external
857- make this tunnel externally controlled (or not, which is the default). This
858flag is mutually exclusive with the
859.BR id ,
860.BR remote ,
861.BR ttl ,
862.BR tos " and " flowlabel
863options.
864
865.sp
866.RB [ no ] udpcsum
867- specifies if UDP checksum is calculated for transmitted packets over IPv4.
868
869.sp
870.RB [ no ] udp6zerocsumtx
871- skip UDP checksum calculation for transmitted packets over IPv6.
872
873.sp
874.RB [ no ] udp6zerocsumrx
875- allow incoming UDP packets over IPv6 with zero checksum field.
876
c1a1d8bc
JL
877.in -8
878
a60223bc
PS
879.TP
880MACVLAN and MACVTAP Type Support
881For a link of type
882.I MACVLAN
883or
884.I MACVTAP
885the following additional arguments are supported:
886
887.BI "ip link add link " DEVICE " name " NAME
888.BR type " { " macvlan " | " macvtap " } "
889.BR mode " { " private " | " vepa " | " bridge " | " passthru
aa1b44ca 890.RB " [ " nopromisc " ] | " source " } "
a60223bc
PS
891
892.in +8
893.sp
894.BR type " { " macvlan " | " macvtap " } "
895- specifies the link type to use.
896.BR macvlan " creates just a virtual interface, while "
897.BR macvtap " in addition creates a character device "
898.BR /dev/tapX " to be used just like a " tuntap " device."
899
900.B mode private
901- Do not allow communication between
902.B macvlan
903instances on the same physical interface, even if the external switch supports
904hairpin mode.
905
906.B mode vepa
907- Virtual Ethernet Port Aggregator mode. Data from one
908.B macvlan
909instance to the other on the same physical interface is transmitted over the
910physical interface. Either the attached switch needs to support hairpin mode,
911or there must be a TCP/IP router forwarding the packets in order to allow
912communication. This is the default mode.
913
914.B mode bridge
915- In bridge mode, all endpoints are directly connected to each other,
916communication is not redirected through the physical interface's peer.
917
918.BR mode " " passthru " [ " nopromisc " ] "
919- This mode gives more power to a single endpoint, usually in
920.BR macvtap " mode. It is not allowed for more than one endpoint on the same "
921physical interface. All traffic will be forwarded to this endpoint, allowing
922virtio guests to change MAC address or set promiscuous mode in order to bridge
923the interface or create vlan interfaces on top of it. By default, this mode
924forces the underlying interface into promiscuous mode. Passing the
925.BR nopromisc " flag prevents this, so the promisc flag may be controlled "
926using standard tools.
aa1b44ca 927
928.B mode source
929- allows one to set a list of allowed mac address, which is used to match
930against source mac address from received frames on underlying interface. This
931allows creating mac based VLAN associations, instead of standard port or tag
932based. The feature is useful to deploy 802.1x mac based behavior,
933where drivers of underlying interfaces doesn't allows that.
a60223bc
PS
934.in -8
935
9b3c971a
PH
936.TP
937High-availability Seamless Redundancy (HSR) Support
938For a link of type
939.I HSR
940the following additional arguments are supported:
941
52a59869 942.BI "ip link add link " DEVICE " name " NAME " type hsr"
9b3c971a 943.BI slave1 " SLAVE1-IF " slave2 " SLAVE2-IF "
52a59869
PS
944.RB [ " supervision"
945.IR ADDR-BYTE " ] ["
946.BR version " { " 0 " | " 1 " } ]"
9b3c971a
PH
947
948.in +8
949.sp
950.BR type " hsr "
951- specifies the link type to use, here HSR.
952
953.BI slave1 " SLAVE1-IF "
954- Specifies the physical device used for the first of the two ring ports.
955
956.BI slave2 " SLAVE2-IF "
957- Specifies the physical device used for the second of the two ring ports.
958
52a59869 959.BI supervision " ADDR-BYTE"
9b3c971a
PH
960- The last byte of the multicast address used for HSR supervision frames.
961Default option is "0", possible values 0-255.
962
52a59869 963.BR version " { " 0 " | " 1 " }"
9b3c971a
PH
964- Selects the protocol version of the interface. Default option is "0", which
965corresponds to the 2010 version of the HSR standard. Option "1" activates the
9662012 version.
967.in -8
968
b26fc590
SD
969.TP
970MACsec Type Support
971For a link of type
972.I MACsec
973the following additional arguments are supported:
974
975.BI "ip link add link " DEVICE " name " NAME " type macsec"
5898bd66
DC
976[ [
977.BI address " <lladdr>"
978]
b26fc590
SD
979.BI port " PORT"
980|
981.BI sci " SCI"
982] [
983.BI cipher " CIPHER_SUITE"
984] [
89bb6e67
DC
985.BR icvlen " { "
986.IR 8..16 " } ] ["
b26fc590
SD
987.BR encrypt " {"
988.BR on " | " off " } ] [ "
989.BR send_sci " { " on " | " off " } ] ["
c0ab80a4 990.BR end_station " { " on " | " off " } ] ["
b26fc590
SD
991.BR scb " { " on " | " off " } ] ["
992.BR protect " { " on " | " off " } ] ["
993.BR replay " { " on " | " off " }"
994.BR window " { "
995.IR 0..2^32-1 " } ] ["
996.BR validate " { " strict " | " check " | " disabled " } ] ["
c0ab80a4 997.BR encodingsa " { "
b26fc590
SD
998.IR 0..3 " } ]"
999
1000.in +8
1001.sp
5898bd66
DC
1002.BI address " <lladdr> "
1003- sets the system identifier component of secure channel for this MACsec device.
1004
1005.sp
1006.BI port " PORT "
1007- sets the port number component of secure channel for this MACsec device, in a
1008range from 1 to 65535 inclusive. Numbers with a leading " 0 " or " 0x " are
1009interpreted as octal and hexadecimal, respectively.
b26fc590
SD
1010
1011.sp
1012.BI sci " SCI "
0330f49e
DC
1013- sets the secure channel identifier for this MACsec device.
1014.I SCI
1015is a 64bit wide number in hexadecimal format.
b26fc590
SD
1016
1017.sp
1018.BI cipher " CIPHER_SUITE "
1019- defines the cipher suite to use.
1020
89bb6e67
DC
1021.sp
1022.BI icvlen " LENGTH "
1023- sets the length of the Integrity Check Value (ICV).
1024
b26fc590
SD
1025.sp
1026.BR "encrypt on " or " encrypt off"
1027- switches between authenticated encryption, or authenticity mode only.
1028
1029.sp
1030.BR "send_sci on " or " send_sci off"
1031- specifies whether the SCI is included in every packet, or only when it is necessary.
1032
1033.sp
c0ab80a4 1034.BR "end_station on " or " end_station off"
b26fc590
SD
1035- sets the End Station bit.
1036
1037.sp
1038.BR "scb on " or " scb off"
1039- sets the Single Copy Broadcast bit.
1040
1041.sp
1042.BR "protect on " or " protect off"
1043- enables MACsec protection on the device.
1044
1045.sp
1046.BR "replay on " or " replay off"
1047- enables replay protection on the device.
1048
1049.in +8
1050
1051.sp
1052.BI window " SIZE "
1053- sets the size of the replay window.
1054
1055.in -8
1056
1057.sp
1058.BR "validate strict " or " validate check " or " validate disabled"
1059- sets the validation mode on the device.
1060
1061.sp
c0ab80a4 1062.BI encodingsa " AN "
b26fc590
SD
1063- sets the active secure association for transmission.
1064
1065.in -8
1066
2a6f9cfa
DA
1067.TP
1068VRF Type Support
1069For a link of type
1070.I VRF
1071the following additional arguments are supported:
1072
1073.BI "ip link add " DEVICE " type vrf table " TABLE
1074
1075.in +8
1076.sp
1077.BR table " table id associated with VRF device"
1078
1079.in -8
1080
761a1e60 1081.SS ip link delete - delete virtual link
761a1e60
CT
1082
1083.TP
1084.BI dev " DEVICE "
7f74cf6d
VK
1085specifies the virtual device to act operate on.
1086
1087.TP
1088.BI group " GROUP "
1089specifies the group of virtual links to delete. Group 0 is not allowed to be
1090deleted since it is the default group.
1091
1092.TP
1093.BI type " TYPE "
1094specifies the type of the device.
761a1e60
CT
1095
1096.SS ip link set - change device attributes
1097
f9e9f928
PS
1098.PP
1099.B Warning:
1100If multiple parameter changes are requested,
1101.B ip
1102aborts immediately after any of the changes have failed.
1103This is the only case when
1104.B ip
1105can move the system to an unpredictable state. The solution
1106is to avoid changing several parameters with one
1107.B ip link set
1108call.
1109
761a1e60
CT
1110.TP
1111.BI dev " DEVICE "
1112.I DEVICE
6274b0b7 1113specifies network device to operate on. When configuring SR-IOV Virtual Function
761a1e60
CT
1114(VF) devices, this keyword should specify the associated Physical Function (PF)
1115device.
1116
1117.TP
1118.BI group " GROUP "
1119.I GROUP
1120has a dual role: If both group and dev are present, then move the device to the
a89d5329 1121specified group. If only a group is specified, then the command operates on
761a1e60
CT
1122all devices in that group.
1123
1124.TP
1125.BR up " and " down
1126change the state of the device to
1127.B UP
1128or
1129.BR "DOWN" .
1130
1131.TP
1132.BR "arp on " or " arp off"
1133change the
1134.B NOARP
1135flag on the device.
1136
1137.TP
1138.BR "multicast on " or " multicast off"
1139change the
1140.B MULTICAST
1141flag on the device.
1142
18864827
AK
1143.TP
1144.BR "protodown on " or " protodown off"
1145change the
1146.B PROTODOWN
1147state 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.
1148
761a1e60
CT
1149.TP
1150.BR "dynamic on " or " dynamic off"
1151change the
1152.B DYNAMIC
34c8a95c
VK
1153flag on the device. Indicates that address can change when interface goes down (currently
1154.B NOT
1155used by the Linux).
761a1e60
CT
1156
1157.TP
1158.BI name " NAME"
a89d5329 1159change the name of the device. This operation is not
761a1e60
CT
1160recommended if the device is running or has some addresses
1161already configured.
1162
1163.TP
1164.BI txqueuelen " NUMBER"
1165.TP
1166.BI txqlen " NUMBER"
1167change the transmit queue length of the device.
1168
1169.TP
1170.BI mtu " NUMBER"
1171change the
1172.I MTU
1173of the device.
1174
1175.TP
1176.BI address " LLADDRESS"
1177change the station address of the interface.
1178
1179.TP
1180.BI broadcast " LLADDRESS"
1181.TP
1182.BI brd " LLADDRESS"
1183.TP
1184.BI peer " LLADDRESS"
1185change the link layer broadcast address or the peer address when
1186the interface is
1187.IR "POINTOPOINT" .
1188
1189.TP
36324eba 1190.BI netns " NETNSNAME " \fR| " PID"
761a1e60 1191move the device to the network namespace associated with name
36324eba
VK
1192.IR "NETNSNAME " or
1193.RI process " PID".
1194
1195Some devices are not allowed to change network namespace: loopback, bridge,
1196ppp, wireless. These are network namespace local devices. In such case
1197.B ip
1198tool will return "Invalid argument" error. It is possible to find out if device is local
1199to a single network namespace by checking
1200.B netns-local
1201flag in the output of the
1202.BR ethtool ":"
1203
1204.in +8
1205.B ethtool -k
1206.I DEVICE
1207.in -8
1208
1209To change network namespace for wireless devices the
1210.B iw
1211tool can be used. But it allows to change network namespace only for physical devices and by process
1212.IR PID .
761a1e60
CT
1213
1214.TP
1215.BI alias " NAME"
1216give the device a symbolic name for easy reference.
1217
503aa4e2
1218.TP
1219.BI group " GROUP"
1220specify the group the device belongs to.
1221The available groups are listed in file
1222.BR "@SYSCONFDIR@/group" .
1223
761a1e60
CT
1224.TP
1225.BI vf " NUM"
1226specify a Virtual Function device to be configured. The associated PF device
1227must be specified using the
1228.B dev
1229parameter.
1230
1231.in +8
1232.BI mac " LLADDRESS"
1233- change the station address for the specified VF. The
1234.B vf
1235parameter must be specified.
1236
1237.sp
1238.BI vlan " VLANID"
1239- change the assigned VLAN for the specified VF. When specified, all traffic
1240sent from the VF will be tagged with the specified VLAN ID. Incoming traffic
1241will be filtered for the specified VLAN ID, and will have all VLAN tags
1242stripped before being passed to the VF. Setting this parameter to 0 disables
1243VLAN tagging and filtering. The
1244.B vf
1245parameter must be specified.
1246
1247.sp
1248.BI qos " VLAN-QOS"
1249- assign VLAN QOS (priority) bits for the VLAN tag. When specified, all VLAN
1250tags transmitted by the VF will include the specified priority bits in the
1251VLAN tag. If not specified, the value is assumed to be 0. Both the
1252.B vf
1253and
1254.B vlan
1255parameters must be specified. Setting both
1256.B vlan
1257and
1258.B qos
1259as 0 disables VLAN tagging and filtering for the VF.
1260
56e9f0ab
MS
1261.sp
1262.BI proto " VLAN-PROTO"
1263- assign VLAN PROTOCOL for the VLAN tag, either 802.1Q or 802.1ad.
1264Setting to 802.1ad, all traffic sent from the VF will be tagged with VLAN S-Tag.
1265Incoming traffic will have VLAN S-Tags stripped before being passed to the VF.
1266Setting to 802.1ad also enables an option to concatenate another VLAN tag, so both
1267S-TAG and C-TAG will be inserted/stripped for outgoing/incoming traffic, respectively.
1268If not specified, the value is assumed to be 802.1Q. Both the
1269.B vf
1270and
1271.B vlan
1272parameters must be specified.
1273
761a1e60
CT
1274.sp
1275.BI rate " TXRATE"
f89a2a05
SC
1276-- change the allowed transmit bandwidth, in Mbps, for the specified VF.
1277Setting this parameter to 0 disables rate limiting.
1278.B vf
1279parameter must be specified.
1280Please use new API
1281.B "max_tx_rate"
1282option instead.
1283
1284.sp
1285.BI max_tx_rate " TXRATE"
1286- change the allowed maximum transmit bandwidth, in Mbps, for the specified VF.
1287.B vf
1288parameter must be specified.
1289
1290.sp
1291.BI min_tx_rate " TXRATE"
1292- change the allowed minimum transmit bandwidth, in Mbps, for the specified VF.
1293Minimum TXRATE should be always <= Maximum TXRATE.
761a1e60
CT
1294.B vf
1295parameter must be specified.
1296
1297.sp
1298.BI spoofchk " on|off"
1299- turn packet spoof checking on or off for the specified VF.
63f60e3a 1300.sp
8e45e44b
PS
1301.BI query_rss " on|off"
1302- 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.
1303.sp
63f60e3a
OG
1304.BI state " auto|enable|disable"
1305- set the virtual link state as seen by the specified VF. Setting to auto means a
1306reflection of the PF link state, enable lets the VF to communicate with other VFs on
1307this host even if the PF link state is down, disable causes the HW to drop any packets
1308sent by the VF.
b6d77d9e
HS
1309.sp
1310.BI trust " on|off"
1311- trust the specified VF user. This enables that VF user can set a specific feature
1312which may impact security and/or performance. (e.g. VF multicast promiscuous mode)
d91fb3f4
EC
1313.sp
1314.BI node_guid " eui64"
1315- configure node GUID for the VF.
1316.sp
1317.BI port_guid " eui64"
1318- configure port GUID for the VF.
761a1e60
CT
1319.in -8
1320
1321.TP
1322.BI master " DEVICE"
1323set master device of the device (enslave device).
1324
1325.TP
1326.BI nomaster
1327unset master device of the device (release device).
1328
503aa4e2 1329.TP
8f0777a8
BM
1330.BI addrgenmode " eui64|none|stable_secret|random"
1331set the IPv6 address generation mode
1332
1333.I eui64
1334- use a Modified EUI-64 format interface identifier
1335
1336.I none
1337- disable automatic address generation
1338
1339.I stable_secret
1340- generate the interface identifier based on a preset /proc/sys/net/ipv6/conf/{default,DEVICE}/stable_secret
1341
1342.I random
1343- like stable_secret, but auto-generate a new random secret if none is set
503aa4e2
1344
1345.TP
1346.BR "link-netnsid "
1347set peer netnsid for a cross-netns interface
1348
3dd4b893
PS
1349.TP
1350.BI type " ETYPE TYPE_ARGS"
1351Change type-specific settings. For a list of supported types and arguments refer
1352to the description of
1353.B "ip link add"
1354above. In addition to that, it is possible to manipulate settings to slave
1355devices:
1356
1357.TP
1358Bridge Slave Support
1359For a link with master
1360.B bridge
1361the following additional arguments are supported:
1362
1363.B "ip link set type bridge_slave"
1364[
1365.BI state " STATE"
1366] [
1367.BI priority " PRIO"
1368] [
1369.BI cost " COST"
1370] [
1371.BR guard " { " on " | " off " }"
1372] [
1373.BR hairpin " { " on " | " off " }"
1374] [
1375.BR fastleave " { " on " | " off " }"
1376] [
1377.BR root_block " { " on " | " off " }"
1378] [
1379.BR learning " { " on " | " off " }"
1380] [
1381.BR flood " { " on " | " off " }"
1382] [
1383.BR proxy_arp " { " on " | " off " }"
1384] [
1385.BR proxy_arp_wifi " { " on " | " off " }"
1386] [
1387.BI mcast_router " MULTICAST_ROUTER"
1388] [
9208b4e7
NA
1389.BR mcast_fast_leave " { " on " | " off "}"
1390] [
1391.BR mcast_flood " { " on " | " off " } ]"
3dd4b893
PS
1392
1393.in +8
1394.sp
1395.BI state " STATE"
1396- Set port state.
1397.I STATE
1398is a number representing the following states:
1399.BR 0 " (disabled),"
1400.BR 1 " (listening),"
1401.BR 2 " (learning),"
1402.BR 3 " (forwarding),"
1403.BR 4 " (blocking)."
1404
1405.BI priority " PRIO"
1406- set port priority (a 16bit unsigned value).
1407
1408.BI cost " COST"
1409- set port cost (a 32bit unsigned value).
1410
1411.BR guard " { " on " | " off " }"
1412- block incoming BPDU packets on this port.
1413
1414.BR hairpin " { " on " | " off " }"
1415- enable hairpin mode on this port. This will allow incoming packets on this
1416port to be reflected back.
1417
1418.BR fastleave " { " on " | " off " }"
1419- enable multicast fast leave on this port.
1420
1421.BR root_block " { " on " | " off " }"
1422- block this port from becoming the bridge's root port.
1423
1424.BR learning " { " on " | " off " }"
1425- allow MAC address learning on this port.
1426
1427.BR flood " { " on " | " off " }"
1428- open the flood gates on this port, i.e. forward all unicast frames to this
1429port also. Requires
1430.BR proxy_arp " and " proxy_arp_wifi
1431to be turned off.
1432
1433.BR proxy_arp " { " on " | " off " }"
1434- enable proxy ARP on this port.
1435
1436.BR proxy_arp_wifi " { " on " | " off " }"
1437- enable proxy ARP on this port which meets extended requirements by IEEE
1438802.11 and Hotspot 2.0 specifications.
1439
1440.BI mcast_router " MULTICAST_ROUTER"
1441- configure this port for having multicast routers attached. A port with a
1442multicast router will receive all multicast traffic.
1443.I MULTICAST_ROUTER
1444may be either
1445.B 0
1446to disable multicast routers on this port,
1447.B 1
1448to let the system detect the presence of of routers (this is the default),
1449.B 2
1450to permanently enable multicast traffic forwarding on this port or
1451.B 3
1452to enable multicast routers temporarily on this port, not depending on incoming
1453queries.
1454
1455.BR mcast_fast_leave " { " on " | " off " }"
1456- this is a synonym to the
1457.B fastleave
1458option above.
1459
9208b4e7
NA
1460.BR mcast_flood " { " on " | " off " }"
1461- controls whether a given port will be flooded with multicast traffic for which there is no MDB entry.
1462
3dd4b893
PS
1463.in -8
1464
1465.TP
1466Bonding Slave Support
1467For a link with master
1468.B bond
1469the following additional arguments are supported:
1470
1471.B "ip link set type bond_slave"
1472[
1473.BI queue_id " ID"
1474]
1475
1476.in +8
1477.sp
1478.BI queue_id " ID"
1479- set the slave's queue ID (a 16bit unsigned value).
1480
1481.in -8
1482
aa1b44ca 1483.TP
1484MACVLAN and MACVTAP Support
1485Modify list of allowed macaddr for link in source mode.
1486
1487.B "ip link set type { macvlan | macvap } "
1488[
1489.BI macaddr " " "" COMMAND " " MACADDR " ..."
1490]
1491
1492Commands:
1493.in +8
1494.B add
1495- add MACADDR to allowed list
1496.sp
1497.B set
1498- replace allowed list
1499.sp
1500.B del
1501- remove MACADDR from allowed list
1502.sp
1503.B flush
1504- flush whole allowed list
1505.sp
1506.in -8
1507
1508
761a1e60
CT
1509.SS ip link show - display device attributes
1510
1511.TP
1512.BI dev " NAME " (default)
1513.I NAME
1514specifies the network device to show.
1515If this argument is omitted all devices in the default group are listed.
1516
1517.TP
1518.BI group " GROUP "
1519.I GROUP
1520specifies what group of devices to show.
1521
1522.TP
1523.B up
1524only display running interfaces.
1525
1b944148
VK
1526.TP
1527.BI master " DEVICE "
1528.I DEVICE
1529specifies the master device which enslaves devices to show.
1530
104444c2
DA
1531.TP
1532.BI vrf " NAME "
1533.I NAME
1534speficies the VRF which enslaves devices to show.
1535
712249d8
VK
1536.TP
1537.BI type " TYPE "
1538.I TYPE
1539specifies the type of devices to show.
1540
3462c116
PS
1541Note that the type name is not checked against the list of supported types -
1542instead it is sent as-is to the kernel. Later it is used to filter the returned
1543interface list by comparing it with the relevant attribute in case the kernel
1544didn't filter already. Therefore any string is accepted, but may lead to empty
1545output.
1546
1f299e92 1547.SS ip link help - display help
1548
1549.PP
1550.I "TYPE"
1551specifies which help of link type to dislpay.
1552
032b4f4d
VK
1553.SS
1554.I GROUP
1555may be a number or a string from the file
699589f6 1556.B @SYSCONFDIR@/group
032b4f4d
VK
1557which can be manually filled.
1558
761a1e60
CT
1559.SH "EXAMPLES"
1560.PP
1561ip link show
1562.RS 4
1563Shows the state of all network interfaces on the system.
1564.RE
1565.PP
712249d8
VK
1566ip link show type bridge
1567.RS 4
1568Shows the bridge devices.
1569.RE
1570.PP
1571ip link show type vlan
1572.RS 4
1573Shows the vlan devices.
1574.RE
1575.PP
417b2180
VK
1576ip link show master br0
1577.RS 4
1578Shows devices enslaved by br0
1579.RE
1580.PP
761a1e60
CT
1581ip link set dev ppp0 mtu 1400
1582.RS 4
1583Change the MTU the ppp0 device.
1584.RE
1585.PP
1586ip link add link eth0 name eth0.10 type vlan id 10
1587.RS 4
1588Creates a new vlan device eth0.10 on device eth0.
1589.RE
1590.PP
1591ip link delete dev eth0.10
1592.RS 4
1593Removes vlan device.
1594.RE
1595
1f299e92 1596ip link help gre
1597.RS 4
1598Display help for the gre link type.
90f1df71
TH
1599.RE
1600.PP
1601ip link add name tun1 type ipip remote 192.168.1.1
1602local 192.168.1.2 ttl 225 encap gue encap-sport auto
1603encap-dport 5555 encap-csum encap-remcsum
1604.RS 4
1605Creates an IPIP that is encapsulated with Generic UDP Encapsulation,
1606and the outer UDP checksum and remote checksum offload are enabled.
1607
2c0feda8
LB
1608.RE
1609.PP
1610ip link add link wpan0 lowpan0 type lowpan
1611.RS 4
1612Creates a 6LoWPAN interface named lowpan0 on the underlying
1613IEEE 802.15.4 device wpan0.
1f299e92 1614.RE
1615
761a1e60
CT
1616.SH SEE ALSO
1617.br
d5910297 1618.BR ip (8),
e612883c 1619.BR ip-netns (8),
ab872442
VK
1620.BR ethtool (8),
1621.BR iptables (8)
761a1e60
CT
1622
1623.SH AUTHOR
1624Original Manpage by Michail Litvak <mci@owl.openwall.com>