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