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