]> git.proxmox.com Git - mirror_iproute2.git/blob - man/man8/ip-link.8.in
iplink: can: fix help text and man page
[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 spoofchk { on | off } ] [
128 .B state { auto | enable | disable}
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 "
149 specifies the physical device to act operate on.
150
151 .I NAME
152 specifies the name of the new virtual device.
153
154 .I TYPE
155 specifies the type of the new device.
156 .sp
157 Link types:
158
159 .in +8
160 .B bridge
161 - Ethernet Bridge device
162 .sp
163 .B bond
164 - Bonding device
165 .sp
166 .B dummy
167 - Dummy network interface
168 .sp
169 .B ifb
170 - Intermediate Functional Block device
171 .sp
172 .B ipoib
173 - IP over Infiniband device
174 .sp
175 .B macvlan
176 - Virtual interface base on link layer address (MAC)
177 .sp
178 .B vcan
179 - Virtual Controller Area Network interface
180 .sp
181 .B veth
182 - Virtual ethernet interface
183 .sp
184 .BR vlan
185 - 802.1q tagged virtual LAN interface
186 .sp
187 .BR vxlan
188 - Virtual eXtended LAN
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
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
210 .in -8
211
212 .TP
213 .BI numtxqueues " QUEUE_COUNT "
214 specifies the number of transmit queues for new device.
215
216 .TP
217 .BI numrxqueues " QUEUE_COUNT "
218 specifies the number of receive queues for new device.
219
220 .TP
221 .BI index " IDX "
222 specifies the desired index of the new virtual device. The link creation fails, if the index is busy.
223
224 .TP
225 VXLAN Type Support
226 For a link of type
227 .I VXLAN
228 the 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 "
234 .RB " ] [ { " group " | " remote " } "
235 .I IPADDR
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
260 Identifier) 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.
268 This parameter cannot be specified with the
269 .B remote
270 parameter.
271
272 .sp
273 .BI remote " IPADDR"
274 - specifies the unicast destination IP address to use in outgoing packets
275 when the destination link layer address is not known in the VXLAN device
276 forwarding database. This parameter cannot be specified with the
277 .B group
278 parameter.
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
295 source 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
300 are 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
320 .TP
321 IP6GRE/IP6GRETAP Type Support
322 For a link of type
323 .I IP6GRE/IP6GRETAP
324 the 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.
356 It must be and address on another interface on this host.
357
358 .sp
359 .BI [i|o]seq
360 - serialize packets.
361 The
362 .B oseq
363 flag enables sequencing of outgoing packets.
364 The
365 .B iseq
366 flag 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
372 is either a number or an IPv4 address-like dotted quad.
373 The
374 .B key
375 parameter specifies the same key to use in both directions.
376 The
377 .BR ikey " and " okey
378 parameters specify different keys for input and output.
379
380 .sp
381 .BI [i|o]csum
382 - generate/require checksums for tunneled packets.
383 The
384 .B ocsum
385 flag calculates checksums for outgoing packets.
386 The
387 .B icsum
388 flag requires that all input packets have the correct
389 checksum. The
390 .B csum
391 flag 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"
404 - specifies a fixed flowlabel.
405
406 .sp
407 .BI tclass " TCLASS"
408 - specifies the traffic class field on
409 tunneled packets, which can be specified as either a two-digit
410 hex value (e.g. c0) or a predefined string (e.g. internet).
411 The value
412 .B inherit
413 causes the field to be copied from the original IP header. The
414 values
415 .BI "inherit/" STRING
416 or
417 .BI "inherit/" 00 ".." ff
418 will set the field to
419 .I STRING
420 or
421 .IR 00 ".." ff
422 when tunneling non-IP packets. The default value is 00.
423
424 .in -8
425
426 .SS ip link delete - delete virtual link
427 .I DEVICE
428 specifies the virtual device to act operate on.
429 .I TYPE
430 specifies the type of the device.
431
432
433 .TP
434 .BI dev " DEVICE "
435 specifies 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
442 specifies network device to operate on. When configuring SR-IOV Virtual Function
443 (VF) devices, this keyword should specify the associated Physical Function (PF)
444 device.
445
446 .TP
447 .BI group " GROUP "
448 .I GROUP
449 has a dual role: If both group and dev are present, then move the device to the
450 specified group. If only a group is specified, then the command operates on
451 all devices in that group.
452
453 .TP
454 .BR up " and " down
455 change the state of the device to
456 .B UP
457 or
458 .BR "DOWN" .
459
460 .TP
461 .BR "arp on " or " arp off"
462 change the
463 .B NOARP
464 flag on the device.
465
466 .TP
467 .BR "multicast on " or " multicast off"
468 change the
469 .B MULTICAST
470 flag on the device.
471
472 .TP
473 .BR "dynamic on " or " dynamic off"
474 change the
475 .B DYNAMIC
476 flag on the device.
477
478 .TP
479 .BI name " NAME"
480 change the name of the device. This operation is not
481 recommended if the device is running or has some addresses
482 already configured.
483
484 .TP
485 .BI txqueuelen " NUMBER"
486 .TP
487 .BI txqlen " NUMBER"
488 change the transmit queue length of the device.
489
490 .TP
491 .BI mtu " NUMBER"
492 change the
493 .I MTU
494 of the device.
495
496 .TP
497 .BI address " LLADDRESS"
498 change 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"
506 change the link layer broadcast address or the peer address when
507 the interface is
508 .IR "POINTOPOINT" .
509
510 .TP
511 .BI netns " PID"
512 move the device to the network namespace associated with the process
513 .IR "PID".
514
515 .TP
516 .BI netns " NETNSNAME"
517 move the device to the network namespace associated with name
518 .IR "NETNSNAME".
519
520 .TP
521 .BI alias " NAME"
522 give the device a symbolic name for easy reference.
523
524 .TP
525 .BI group " GROUP"
526 specify the group the device belongs to.
527 The available groups are listed in file
528 .BR "@SYSCONFDIR@/group" .
529
530 .TP
531 .BI vf " NUM"
532 specify a Virtual Function device to be configured. The associated PF device
533 must be specified using the
534 .B dev
535 parameter.
536
537 .in +8
538 .BI mac " LLADDRESS"
539 - change the station address for the specified VF. The
540 .B vf
541 parameter must be specified.
542
543 .sp
544 .BI vlan " VLANID"
545 - change the assigned VLAN for the specified VF. When specified, all traffic
546 sent from the VF will be tagged with the specified VLAN ID. Incoming traffic
547 will be filtered for the specified VLAN ID, and will have all VLAN tags
548 stripped before being passed to the VF. Setting this parameter to 0 disables
549 VLAN tagging and filtering. The
550 .B vf
551 parameter 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
556 tags transmitted by the VF will include the specified priority bits in the
557 VLAN tag. If not specified, the value is assumed to be 0. Both the
558 .B vf
559 and
560 .B vlan
561 parameters must be specified. Setting both
562 .B vlan
563 and
564 .B qos
565 as 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.
570 Setting this parameter to 0 disables rate limiting. The
571 .B vf
572 parameter must be specified.
573
574 .sp
575 .BI spoofchk " on|off"
576 - turn packet spoof checking on or off for the specified VF.
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
580 reflection of the PF link state, enable lets the VF to communicate with other VFs on
581 this host even if the PF link state is down, disable causes the HW to drop any packets
582 sent by the VF.
583 .in -8
584
585 .TP
586 .BI master " DEVICE"
587 set master device of the device (enslave device).
588
589 .TP
590 .BI nomaster
591 unset master device of the device (release device).
592
593 .PP
594 .B Warning:
595 If multiple parameter changes are requested,
596 .B ip
597 aborts immediately after any of the changes have failed.
598 This is the only case when
599 .B ip
600 can move the system to an unpredictable state. The solution
601 is to avoid changing several parameters with one
602 .B ip link set
603 call.
604
605 .SS ip link show - display device attributes
606
607 .TP
608 .BI dev " NAME " (default)
609 .I NAME
610 specifies the network device to show.
611 If this argument is omitted all devices in the default group are listed.
612
613 .TP
614 .BI group " GROUP "
615 .I GROUP
616 specifies what group of devices to show.
617
618 .TP
619 .B up
620 only display running interfaces.
621
622 .SH "EXAMPLES"
623 .PP
624 ip link show
625 .RS 4
626 Shows the state of all network interfaces on the system.
627 .RE
628 .PP
629 ip link set dev ppp0 mtu 1400
630 .RS 4
631 Change the MTU the ppp0 device.
632 .RE
633 .PP
634 ip link add link eth0 name eth0.10 type vlan id 10
635 .RS 4
636 Creates a new vlan device eth0.10 on device eth0.
637 .RE
638 .PP
639 ip link delete dev eth0.10
640 .RS 4
641 Removes vlan device.
642 .RE
643
644 .SH SEE ALSO
645 .br
646 .BR ip (8)
647
648 .SH AUTHOR
649 Original Manpage by Michail Litvak <mci@owl.openwall.com>