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