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