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