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