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