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