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