]> git.proxmox.com Git - mirror_iproute2.git/blame - man/man8/ip-link.8.in
update kernel headers based on net-next 3.21
[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
9.B ip
10.RI "[ " OPTIONS " ]"
11.B link
12.RI " { " COMMAND " | "
13.BR help " }"
14.sp
15
16.ti -8
17.IR OPTIONS " := { "
18\fB\-V\fR[\fIersion\fR] |
b68d9837 19\fB\-h\fR[\fIuman-readable\fR] |
761a1e60
CT
20\fB\-s\fR[\fItatistics\fR] |
21\fB\-r\fR[\fIesolve\fR] |
22\fB\-f\fR[\fIamily\fR] {
23.BR inet " | " inet6 " | " ipx " | " dnet " | " link " } | "
24\fB\-o\fR[\fIneline\fR] }
25
26.ti -8
9fc56974
AH
27.BI "ip link add"
28.RB "[ " link
29.IR DEVICE " ]"
761a1e60
CT
30.RB "[ " name " ]"
31.I NAME
32.br
33.RB "[ " txqueuelen
34.IR PACKETS " ]"
35.br
36.RB "[ " address
37.IR LLADDR " ]"
38.RB "[ " broadcast
39.IR LLADDR " ]"
40.br
41.RB "[ " mtu
42.IR MTU " ]"
4de8d885
PE
43.RB "[ " index
44.IR IDX " ]"
761a1e60 45.br
d992f3e6
JP
46.RB "[ " numtxqueues
47.IR QUEUE_COUNT " ]"
48.RB "[ " numrxqueues
49.IR QUEUE_COUNT " ]"
50.br
761a1e60
CT
51.BR type " TYPE"
52.RI "[ " ARGS " ]"
53
54.ti -8
55.IR TYPE " := [ "
f1a6f4e9 56.BR bridge " | "
e37a9c73 57.BR bond " | "
f1a6f4e9
SH
58.BR can " | "
59.BR dummy " | "
5c0aec93 60.BR hsr " | "
f1a6f4e9
SH
61.BR ifb " | "
62.BR ipoib " |"
63.BR macvlan " | "
e4c35682 64.BR macvtap " | "
f1a6f4e9
SH
65.BR vcan " | "
66.BR veth " | "
67.BR vlan " | "
77987911
ND
68.BR vxlan " |"
69.BR ip6tnl " |"
70.BR ipip " |"
9abde37c 71.BR sit " |"
72.BR gre " |"
73.BR gretap " |"
74.BR ip6gre " |"
75.BR ip6gretap " ]"
761a1e60
CT
76
77.ti -8
78.BI "ip link delete " DEVICE
79.BI type " TYPE"
80.RI "[ " ARGS " ]"
81
82.ti -8
83.BR "ip link set " {
84.IR DEVICE " | "
85.BI "group " GROUP
86.RB "} { " up " | " down " | " arp " { " on " | " off " } |"
87.br
88.BR promisc " { " on " | " off " } |"
89.br
90.BR allmulticast " { " on " | " off " } |"
91.br
92.BR dynamic " { " on " | " off " } |"
93.br
94.BR multicast " { " on " | " off " } |"
95.br
96.B txqueuelen
97.IR PACKETS " |"
98.br
99.B name
100.IR NEWNAME " |"
101.br
102.B address
103.IR LLADDR " |"
104.B broadcast
105.IR LLADDR " |"
106.br
107.B mtu
108.IR MTU " |"
109.br
110.B netns
111.IR PID " |"
112.br
113.B netns
114.IR NETNSNAME " |"
115.br
116.B alias
117.IR NAME " |"
118.br
119.B vf
120.IR NUM " ["
121.B mac
122.IR LLADDR " ] ["
123.B vlan
124.IR VLANID " [ "
125.B qos
126.IR VLAN-QOS " ] ] ["
127.B rate
128.IR TXRATE " ] ["
f89a2a05
SC
129.B max_tx_rate
130.IR TXRATE " ] ["
131.B min_tx_rate
132.IR TXRATE " ] ["
63f60e3a
OG
133.B spoofchk { on | off } ] [
134.B state { auto | enable | disable}
761a1e60
CT
135] |
136.br
137.B master
138.IR DEVICE
139.br
140.B nomaster
141.BR " }"
142
143
144.ti -8
145.B ip link show
146.RI "[ " DEVICE " | "
147.B group
1b944148
VK
148.IR GROUP " | "
149.BR up " | "
150.B master
712249d8
VK
151.IR DEVICE " | "
152.B type
153.IR TYPE " ]"
761a1e60 154
1f299e92 155.ti -8
156.B ip link help
157.RI "[ " TYPE " ]"
158
761a1e60
CT
159.SH "DESCRIPTION"
160.SS ip link add - add virtual link
161
162.TP
163.BI link " DEVICE "
164specifies the physical device to act operate on.
165
166.I NAME
167specifies the name of the new virtual device.
168
169.I TYPE
170specifies the type of the new device.
171.sp
172Link types:
173
174.in +8
f1a6f4e9
SH
175.B bridge
176- Ethernet Bridge device
761a1e60 177.sp
cc26a890
JP
178.B bond
179- Bonding device
180.sp
761a1e60
CT
181.B dummy
182- Dummy network interface
183.sp
2f937359 184.B hsr
185- High-availability Seamless Redundancy device
186.sp
761a1e60
CT
187.B ifb
188- Intermediate Functional Block device
189.sp
f1a6f4e9
SH
190.B ipoib
191- IP over Infiniband device
192.sp
761a1e60 193.B macvlan
f1a6f4e9 194- Virtual interface base on link layer address (MAC)
761a1e60 195.sp
e4c35682
RR
196.B macvtap
197- Virtual interface based on link layer address (MAC) and TAP.
198.sp
f1a6f4e9 199.B vcan
2b70fe15 200- Virtual Controller Area Network interface
761a1e60 201.sp
f1a6f4e9
SH
202.B veth
203- Virtual ethernet interface
de038993 204.sp
f1a6f4e9
SH
205.BR vlan
206- 802.1q tagged virtual LAN interface
207.sp
208.BR vxlan
209- Virtual eXtended LAN
77987911
ND
210.sp
211.BR ip6tnl
212- Virtual tunnel interface IPv4|IPv6 over IPv6
213.sp
214.BR ipip
215- Virtual tunnel interface IPv4 over IPv4
216.sp
217.BR sit
218- Virtual tunnel interface IPv6 over IPv4
9abde37c 219.sp
220.BR gre
221- Virtual tunnel interface GRE over IPv4
222.sp
223.BR gretap
d36d9d41 224- Virtual L2 tunnel interface GRE over IPv4
9abde37c 225.sp
226.BR ip6gre
d36d9d41 227- Virtual tunnel interface GRE over IPv6
9abde37c 228.sp
229.BR ip6gretap
d36d9d41 230- Virtual L2 tunnel interface GRE over IPv6
761a1e60
CT
231.in -8
232
d992f3e6
JP
233.TP
234.BI numtxqueues " QUEUE_COUNT "
235specifies the number of transmit queues for new device.
236
237.TP
238.BI numrxqueues " QUEUE_COUNT "
239specifies the number of receive queues for new device.
240
4de8d885
PE
241.TP
242.BI index " IDX "
243specifies the desired index of the new virtual device. The link creation fails, if the index is busy.
244
2816a568
TR
245.TP
246VXLAN Type Support
63f60e3a 247For a link of type
2816a568
TR
248.I VXLAN
249the following additional arguments are supported:
250
251.BI "ip link add " DEVICE
f66611d8 252.BI type " vxlan " id " ID"
2816a568
TR
253.R " [ "
254.BI dev " PHYS_DEV "
7cfa3802
AW
255.RB " ] [ { " group " | " remote " } "
256.I IPADDR
2816a568
TR
257.R " ] [ "
258.BI local " IPADDR "
259.R " ] [ "
260.BI ttl " TTL "
261.R " ] [ "
262.BI tos " TOS "
263.R " ] [ "
264.BI port " MIN MAX "
265.R " ] [ "
266.I "[no]learning "
267.R " ] [ "
268.I "[no]proxy "
269.R " ] [ "
270.I "[no]rsc "
271.R " ] [ "
272.I "[no]l2miss "
273.R " ] [ "
274.I "[no]l3miss "
c2fbc57e
ND
275.R " ] [ "
276.BI ageing " SECONDS "
277.R " ] [ "
278.BI maxaddress " NUMBER "
2816a568
TR
279.R " ]"
280
281.in +8
282.sp
283.BI id " VNI "
284- specifies the VXLAN Network Identifer (or VXLAN Segment
285Identifier) to use.
286
287.BI dev " PHYS_DEV"
288- specifies the physical device to use for tunnel endpoint communication.
289
290.sp
291.BI group " IPADDR"
292- specifies the multicast IP address to join.
7cfa3802
AW
293This parameter cannot be specified with the
294.B remote
295parameter.
296
297.sp
298.BI remote " IPADDR"
299- specifies the unicast destination IP address to use in outgoing packets
300when the destination link layer address is not known in the VXLAN device
301forwarding database. This parameter cannot be specified with the
302.B group
303parameter.
2816a568
TR
304
305.sp
306.BI local " IPADDR"
307- specifies the source IP address to use in outgoing packets.
308
309.sp
310.BI ttl " TTL"
311- specifies the TTL value to use in outgoing packets.
312
313.sp
314.BI tos " TOS"
315- specifies the TOS value to use in outgoing packets.
316
317.sp
318.BI port " MIN MAX"
319- specifies the range of port numbers to use as UDP
320source ports to communicate to the remote VXLAN tunnel endpoint.
321
322.sp
323.I [no]learning
324- specifies if unknown source link layer addresses and IP addresses
325are entered into the VXLAN device forwarding database.
326
327.sp
328.I [no]rsc
329- specifies if route short circuit is turned on.
330
331.sp
332.I [no]proxy
333- specifies ARP proxy is turned on.
334
335.sp
336.I [no]l2miss
337- specifies if netlink LLADDR miss notifications are generated.
338
339.sp
340.I [no]l3miss
341- specifies if netlink IP ADDR miss notifications are generated.
342
c2fbc57e
ND
343.sp
344.BI ageing " SECONDS"
345- specifies the lifetime in seconds of FDB entries learnt by the kernel.
346
347.sp
348.BI maxaddress " NUMBER"
349- specifies the maximum number of FDB entries.
350
2816a568
TR
351.in -8
352
9abde37c 353.TP
354IP6GRE/IP6GRETAP Type Support
63f60e3a 355For a link of type
9abde37c 356.I IP6GRE/IP6GRETAP
357the following additional arguments are supported:
358
359.BI "ip link add " DEVICE
360.BI type " { ip6gre | ip6gretap } " remote " ADDR " local " ADDR
361.R " [ "
362.I "[i|o]seq]"
363.R " ] [ "
364.I "[i|o]key" KEY
365.R " ] [ "
366.I " [i|o]csum "
367.R " ] [ "
368.BI hoplimit " TTL "
369.R " ] [ "
370.BI encaplimit " ELIM "
371.R " ] [ "
372.BI tclass " TCLASS "
373.R " ] [ "
374.BI flowlabel " FLOWLABEL "
375.R " ] [ "
376.BI "dscp inherit"
377.R " ] [ "
378.BI dev " PHYS_DEV "
379.R " ]"
380
381.in +8
382.sp
383.BI remote " ADDR "
384- specifies the remote IPv6 address of the tunnel.
385
386.sp
387.BI local " ADDR "
388- specifies the fixed local IPv6 address for tunneled packets.
389It must be and address on another interface on this host.
390
391.sp
392.BI [i|o]seq
393- serialize packets.
394The
395.B oseq
396flag enables sequencing of outgoing packets.
397The
398.B iseq
399flag requires that all input packets are serialized.
400
401.sp
402.BI [i|o]key " KEY"
403- use keyed GRE with key
404.IR KEY ". "KEY
405is either a number or an IPv4 address-like dotted quad.
406The
407.B key
408parameter specifies the same key to use in both directions.
409The
410.BR ikey " and " okey
411parameters specify different keys for input and output.
412
413.sp
414.BI [i|o]csum
415- generate/require checksums for tunneled packets.
416The
417.B ocsum
418flag calculates checksums for outgoing packets.
419The
420.B icsum
421flag requires that all input packets have the correct
422checksum. The
423.B csum
424flag is equivalent to the combination
425.BR "icsum ocsum" .
426
427.sp
428.BI hoplimit " TTL"
429- specifies Hop Limit value to use in outgoing packets.
430
431.sp
432.BI encaplimit " ELIM"
433- specifies a fixed encapsulation limit. Default is 4.
434
435.sp
436.BI flowlabel " FLOWLABEL"
63f60e3a 437- specifies a fixed flowlabel.
9abde37c 438
439.sp
440.BI tclass " TCLASS"
441- specifies the traffic class field on
442tunneled packets, which can be specified as either a two-digit
443hex value (e.g. c0) or a predefined string (e.g. internet).
444The value
445.B inherit
446causes the field to be copied from the original IP header. The
447values
448.BI "inherit/" STRING
449or
450.BI "inherit/" 00 ".." ff
451will set the field to
452.I STRING
453or
454.IR 00 ".." ff
455when tunneling non-IP packets. The default value is 00.
456
457.in -8
458
8ca8fac7
OG
459.TP
460IPoIB Type Support
461For a link of type
462.I IPoIB
463the following additional arguments are supported:
464
465.BI "ip link add " DEVICE " name " NAME
466.BI type " ipoib [ " pkey " PKEY ] [" mode " MODE " ]
467
468.in +8
469.sp
470.BI pkey " PKEY "
471- specifies the IB P-Key to use.
472
473.BI mode " MODE "
474- specifies the mode (datagram or connected) to use.
475
761a1e60
CT
476.SS ip link delete - delete virtual link
477.I DEVICE
478specifies the virtual device to act operate on.
479.I TYPE
480specifies the type of the device.
481
482
483.TP
484.BI dev " DEVICE "
485specifies the physical device to act operate on.
486
487.SS ip link set - change device attributes
488
489.TP
490.BI dev " DEVICE "
491.I DEVICE
6274b0b7 492specifies network device to operate on. When configuring SR-IOV Virtual Function
761a1e60
CT
493(VF) devices, this keyword should specify the associated Physical Function (PF)
494device.
495
496.TP
497.BI group " GROUP "
498.I GROUP
499has a dual role: If both group and dev are present, then move the device to the
500specified group. If only a group is specified, then the command operates on
501all devices in that group.
502
503.TP
504.BR up " and " down
505change the state of the device to
506.B UP
507or
508.BR "DOWN" .
509
510.TP
511.BR "arp on " or " arp off"
512change the
513.B NOARP
514flag on the device.
515
516.TP
517.BR "multicast on " or " multicast off"
518change the
519.B MULTICAST
520flag on the device.
521
522.TP
523.BR "dynamic on " or " dynamic off"
524change the
525.B DYNAMIC
526flag on the device.
527
528.TP
529.BI name " NAME"
530change the name of the device. This operation is not
531recommended if the device is running or has some addresses
532already configured.
533
534.TP
535.BI txqueuelen " NUMBER"
536.TP
537.BI txqlen " NUMBER"
538change the transmit queue length of the device.
539
540.TP
541.BI mtu " NUMBER"
542change the
543.I MTU
544of the device.
545
546.TP
547.BI address " LLADDRESS"
548change the station address of the interface.
549
550.TP
551.BI broadcast " LLADDRESS"
552.TP
553.BI brd " LLADDRESS"
554.TP
555.BI peer " LLADDRESS"
556change the link layer broadcast address or the peer address when
557the interface is
558.IR "POINTOPOINT" .
559
560.TP
561.BI netns " PID"
562move the device to the network namespace associated with the process
563.IR "PID".
564
565.TP
566.BI netns " NETNSNAME"
567move the device to the network namespace associated with name
568.IR "NETNSNAME".
569
570.TP
571.BI alias " NAME"
572give the device a symbolic name for easy reference.
573
574.TP
575.BI group " GROUP"
576specify the group the device belongs to.
577The available groups are listed in file
578.BR "@SYSCONFDIR@/group" .
579
580.TP
581.BI vf " NUM"
582specify a Virtual Function device to be configured. The associated PF device
583must be specified using the
584.B dev
585parameter.
586
587.in +8
588.BI mac " LLADDRESS"
589- change the station address for the specified VF. The
590.B vf
591parameter must be specified.
592
593.sp
594.BI vlan " VLANID"
595- change the assigned VLAN for the specified VF. When specified, all traffic
596sent from the VF will be tagged with the specified VLAN ID. Incoming traffic
597will be filtered for the specified VLAN ID, and will have all VLAN tags
598stripped before being passed to the VF. Setting this parameter to 0 disables
599VLAN tagging and filtering. The
600.B vf
601parameter must be specified.
602
603.sp
604.BI qos " VLAN-QOS"
605- assign VLAN QOS (priority) bits for the VLAN tag. When specified, all VLAN
606tags transmitted by the VF will include the specified priority bits in the
607VLAN tag. If not specified, the value is assumed to be 0. Both the
608.B vf
609and
610.B vlan
611parameters must be specified. Setting both
612.B vlan
613and
614.B qos
615as 0 disables VLAN tagging and filtering for the VF.
616
617.sp
618.BI rate " TXRATE"
f89a2a05
SC
619-- change the allowed transmit bandwidth, in Mbps, for the specified VF.
620Setting this parameter to 0 disables rate limiting.
621.B vf
622parameter must be specified.
623Please use new API
624.B "max_tx_rate"
625option instead.
626
627.sp
628.BI max_tx_rate " TXRATE"
629- change the allowed maximum transmit bandwidth, in Mbps, for the specified VF.
630.B vf
631parameter must be specified.
632
633.sp
634.BI min_tx_rate " TXRATE"
635- change the allowed minimum transmit bandwidth, in Mbps, for the specified VF.
636Minimum TXRATE should be always <= Maximum TXRATE.
761a1e60
CT
637.B vf
638parameter must be specified.
639
640.sp
641.BI spoofchk " on|off"
642- turn packet spoof checking on or off for the specified VF.
63f60e3a
OG
643.sp
644.BI state " auto|enable|disable"
645- set the virtual link state as seen by the specified VF. Setting to auto means a
646reflection of the PF link state, enable lets the VF to communicate with other VFs on
647this host even if the PF link state is down, disable causes the HW to drop any packets
648sent by the VF.
761a1e60
CT
649.in -8
650
651.TP
652.BI master " DEVICE"
653set master device of the device (enslave device).
654
655.TP
656.BI nomaster
657unset master device of the device (release device).
658
659.PP
660.B Warning:
661If multiple parameter changes are requested,
662.B ip
663aborts immediately after any of the changes have failed.
664This is the only case when
665.B ip
666can move the system to an unpredictable state. The solution
667is to avoid changing several parameters with one
668.B ip link set
669call.
670
671.SS ip link show - display device attributes
672
673.TP
674.BI dev " NAME " (default)
675.I NAME
676specifies the network device to show.
677If this argument is omitted all devices in the default group are listed.
678
679.TP
680.BI group " GROUP "
681.I GROUP
682specifies what group of devices to show.
683
684.TP
685.B up
686only display running interfaces.
687
1b944148
VK
688.TP
689.BI master " DEVICE "
690.I DEVICE
691specifies the master device which enslaves devices to show.
692
712249d8
VK
693.TP
694.BI type " TYPE "
695.I TYPE
696specifies the type of devices to show.
697
8322d28d 698.TP
1e264abc
SH
699The show command has additional formatting options:
700
8322d28d 701.RS
1e264abc
SH
702.TP
703.BR "\-s" , " \-stats", " \-statistics"
704output more statistics about packet usage.
705
706.TP
707.BR "\-d", " \-details"
708output more detailed information.
709
710.TP
711.BR "\-h", " \-human", " \-human-readble"
712output statistics with human readable values number followed by suffix
713
714.TP
715.BR "\-iec"
716print human readable rates in IEC units (ie. 1K = 1024).
8322d28d 717.RE
b68d9837 718
1f299e92 719.SS ip link help - display help
720
721.PP
722.I "TYPE"
723specifies which help of link type to dislpay.
724
761a1e60
CT
725.SH "EXAMPLES"
726.PP
727ip link show
728.RS 4
729Shows the state of all network interfaces on the system.
730.RE
731.PP
712249d8
VK
732ip link show type bridge
733.RS 4
734Shows the bridge devices.
735.RE
736.PP
737ip link show type vlan
738.RS 4
739Shows the vlan devices.
740.RE
741.PP
417b2180
VK
742ip link show master br0
743.RS 4
744Shows devices enslaved by br0
745.RE
746.PP
761a1e60
CT
747ip link set dev ppp0 mtu 1400
748.RS 4
749Change the MTU the ppp0 device.
750.RE
751.PP
752ip link add link eth0 name eth0.10 type vlan id 10
753.RS 4
754Creates a new vlan device eth0.10 on device eth0.
755.RE
756.PP
757ip link delete dev eth0.10
758.RS 4
759Removes vlan device.
760.RE
761
1f299e92 762ip link help gre
763.RS 4
764Display help for the gre link type.
765.RE
766
761a1e60
CT
767.SH SEE ALSO
768.br
769.BR ip (8)
770
771.SH AUTHOR
772Original Manpage by Michail Litvak <mci@owl.openwall.com>