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