]>
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 | |
e895ae0b | 9 | .B ip link |
761a1e60 CT |
10 | .RI " { " COMMAND " | " |
11 | .BR help " }" | |
12 | .sp | |
13 | ||
761a1e60 | 14 | .ti -8 |
9fc56974 AH |
15 | .BI "ip link add" |
16 | .RB "[ " link | |
17 | .IR DEVICE " ]" | |
761a1e60 CT |
18 | .RB "[ " name " ]" |
19 | .I NAME | |
20 | .br | |
21 | .RB "[ " txqueuelen | |
22 | .IR PACKETS " ]" | |
23 | .br | |
24 | .RB "[ " address | |
25 | .IR LLADDR " ]" | |
26 | .RB "[ " broadcast | |
27 | .IR LLADDR " ]" | |
28 | .br | |
29 | .RB "[ " mtu | |
30 | .IR MTU " ]" | |
4de8d885 PE |
31 | .RB "[ " index |
32 | .IR IDX " ]" | |
761a1e60 | 33 | .br |
d992f3e6 JP |
34 | .RB "[ " numtxqueues |
35 | .IR QUEUE_COUNT " ]" | |
36 | .RB "[ " numrxqueues | |
37 | .IR QUEUE_COUNT " ]" | |
38 | .br | |
d890144e | 39 | .BI type " TYPE" |
761a1e60 CT |
40 | .RI "[ " ARGS " ]" |
41 | ||
42 | .ti -8 | |
43 | .IR TYPE " := [ " | |
f1a6f4e9 | 44 | .BR bridge " | " |
e37a9c73 | 45 | .BR bond " | " |
f1a6f4e9 SH |
46 | .BR can " | " |
47 | .BR dummy " | " | |
5c0aec93 | 48 | .BR hsr " | " |
f1a6f4e9 SH |
49 | .BR ifb " | " |
50 | .BR ipoib " |" | |
51 | .BR macvlan " | " | |
e4c35682 | 52 | .BR macvtap " | " |
f1a6f4e9 SH |
53 | .BR vcan " | " |
54 | .BR veth " | " | |
55 | .BR vlan " | " | |
77987911 ND |
56 | .BR vxlan " |" |
57 | .BR ip6tnl " |" | |
58 | .BR ipip " |" | |
9abde37c | 59 | .BR sit " |" |
60 | .BR gre " |" | |
61 | .BR gretap " |" | |
62 | .BR ip6gre " |" | |
b6d6b5a1 VK |
63 | .BR ip6gretap " |" |
64 | .BR vti " |" | |
65 | .BR nlmon " |" | |
2c0feda8 | 66 | .BR ipvlan " |" |
c1a1d8bc JL |
67 | .BR lowpan " |" |
68 | .BR geneve " ]" | |
761a1e60 CT |
69 | |
70 | .ti -8 | |
7f74cf6d VK |
71 | .BR "ip link delete " { |
72 | .IR DEVICE " | " | |
73 | .BI "group " GROUP | |
74 | } | |
761a1e60 CT |
75 | .BI type " TYPE" |
76 | .RI "[ " ARGS " ]" | |
77 | ||
78 | .ti -8 | |
79 | .BR "ip link set " { | |
80 | .IR DEVICE " | " | |
81 | .BI "group " GROUP | |
ca611d64 | 82 | .RB "} [ { " up " | " down " } ]" |
761a1e60 | 83 | .br |
ca611d64 | 84 | .RB "[ " arp " { " on " | " off " } ]" |
761a1e60 | 85 | .br |
ca611d64 | 86 | .RB "[ " dynamic " { " on " | " off " } ]" |
761a1e60 | 87 | .br |
ca611d64 | 88 | .RB "[ " multicast " { " on " | " off " } ]" |
761a1e60 | 89 | .br |
ca611d64 | 90 | .RB "[ " allmulticast " { " on " | " off " } ]" |
761a1e60 | 91 | .br |
ca611d64 | 92 | .RB "[ " promisc " { " on " | " off " } ]" |
18864827 | 93 | .br |
ca611d64 | 94 | .RB "[ " protodown " { " on " | " off " } ]" |
761a1e60 | 95 | .br |
ca611d64 | 96 | .RB "[ " trailers " { " on " | " off " } ]" |
761a1e60 | 97 | .br |
ca611d64 PS |
98 | .RB "[ " txqueuelen |
99 | .IR PACKETS " ]" | |
100 | .br | |
101 | .RB "[ " name | |
102 | .IR NEWNAME " ]" | |
103 | .br | |
104 | .RB "[ " address | |
105 | .IR LLADDR " ]" | |
761a1e60 | 106 | .br |
ca611d64 PS |
107 | .RB "[ " broadcast |
108 | .IR LLADDR " ]" | |
109 | .br | |
110 | .RB "[ " mtu | |
111 | .IR MTU " ]" | |
761a1e60 | 112 | .br |
ca611d64 PS |
113 | .RB "[ " netns " {" |
114 | .IR PID " | " NETNSNAME " } ]" | |
761a1e60 | 115 | .br |
ca611d64 PS |
116 | .RB "[ " link-netnsid |
117 | .IR ID " ]" | |
761a1e60 | 118 | .br |
ca611d64 PS |
119 | .RB "[ " alias |
120 | .IR NAME " ]" | |
761a1e60 | 121 | .br |
ca611d64 | 122 | .RB "[ " vf |
761a1e60 CT |
123 | .IR NUM " [" |
124 | .B mac | |
ca611d64 PS |
125 | .IR LLADDR " ]" |
126 | .br | |
127 | .in +9 | |
128 | .RB "[ " vlan | |
761a1e60 CT |
129 | .IR VLANID " [ " |
130 | .B qos | |
ca611d64 | 131 | .IR VLAN-QOS " ] ]" |
761a1e60 | 132 | .br |
ca611d64 PS |
133 | .RB "[ " rate |
134 | .IR TXRATE " ]" | |
135 | .br | |
136 | .RB "[ " max_tx_rate | |
137 | .IR TXRATE " ]" | |
138 | .br | |
139 | .RB "[ " min_tx_rate | |
140 | .IR TXRATE " ]" | |
761a1e60 | 141 | .br |
ca611d64 | 142 | .RB "[ " spoofchk " { " on " | " off " } ]" |
503aa4e2 | 143 | .br |
ca611d64 | 144 | .RB "[ " state " { " auto " | " enable " | " disable " } ]" |
503aa4e2 | 145 | .br |
ca611d64 PS |
146 | .RB "[ " trust " { " on " | " off " } ] ]" |
147 | .br | |
148 | .in -9 | |
149 | .RB "[ " master | |
150 | .IR DEVICE " ]" | |
151 | .br | |
152 | .RB "[ " nomaster " ]" | |
153 | .br | |
154 | .RB "[ " addrgenmode " { " eui64 " | " none " | " stable_secret " | " random " } ]" | |
761a1e60 CT |
155 | |
156 | ||
157 | .ti -8 | |
158 | .B ip link show | |
159 | .RI "[ " DEVICE " | " | |
160 | .B group | |
ca611d64 PS |
161 | .IR GROUP " ] [" |
162 | .BR up " ] [" | |
1b944148 | 163 | .B master |
ca611d64 | 164 | .IR DEVICE " ] [" |
712249d8 VK |
165 | .B type |
166 | .IR TYPE " ]" | |
761a1e60 | 167 | |
1f299e92 | 168 | .ti -8 |
169 | .B ip link help | |
170 | .RI "[ " TYPE " ]" | |
171 | ||
761a1e60 CT |
172 | .SH "DESCRIPTION" |
173 | .SS ip link add - add virtual link | |
174 | ||
175 | .TP | |
176 | .BI link " DEVICE " | |
177 | specifies the physical device to act operate on. | |
178 | ||
179 | .I NAME | |
180 | specifies the name of the new virtual device. | |
181 | ||
182 | .I TYPE | |
183 | specifies the type of the new device. | |
184 | .sp | |
185 | Link types: | |
186 | ||
187 | .in +8 | |
f1a6f4e9 SH |
188 | .B bridge |
189 | - Ethernet Bridge device | |
761a1e60 | 190 | .sp |
cc26a890 JP |
191 | .B bond |
192 | - Bonding device | |
503aa4e2 PŠ |
193 | .B can |
194 | - Controller Area Network interface | |
cc26a890 | 195 | .sp |
761a1e60 CT |
196 | .B dummy |
197 | - Dummy network interface | |
198 | .sp | |
2f937359 | 199 | .B hsr |
200 | - High-availability Seamless Redundancy device | |
201 | .sp | |
761a1e60 CT |
202 | .B ifb |
203 | - Intermediate Functional Block device | |
204 | .sp | |
f1a6f4e9 SH |
205 | .B ipoib |
206 | - IP over Infiniband device | |
207 | .sp | |
761a1e60 | 208 | .B macvlan |
f1a6f4e9 | 209 | - Virtual interface base on link layer address (MAC) |
761a1e60 | 210 | .sp |
e4c35682 RR |
211 | .B macvtap |
212 | - Virtual interface based on link layer address (MAC) and TAP. | |
213 | .sp | |
f1a6f4e9 | 214 | .B vcan |
2b70fe15 | 215 | - Virtual Controller Area Network interface |
761a1e60 | 216 | .sp |
f1a6f4e9 SH |
217 | .B veth |
218 | - Virtual ethernet interface | |
de038993 | 219 | .sp |
f1a6f4e9 SH |
220 | .BR vlan |
221 | - 802.1q tagged virtual LAN interface | |
222 | .sp | |
223 | .BR vxlan | |
224 | - Virtual eXtended LAN | |
77987911 ND |
225 | .sp |
226 | .BR ip6tnl | |
227 | - Virtual tunnel interface IPv4|IPv6 over IPv6 | |
228 | .sp | |
229 | .BR ipip | |
230 | - Virtual tunnel interface IPv4 over IPv4 | |
231 | .sp | |
232 | .BR sit | |
233 | - Virtual tunnel interface IPv6 over IPv4 | |
9abde37c | 234 | .sp |
235 | .BR gre | |
236 | - Virtual tunnel interface GRE over IPv4 | |
237 | .sp | |
238 | .BR gretap | |
d36d9d41 | 239 | - Virtual L2 tunnel interface GRE over IPv4 |
9abde37c | 240 | .sp |
241 | .BR ip6gre | |
d36d9d41 | 242 | - Virtual tunnel interface GRE over IPv6 |
9abde37c | 243 | .sp |
244 | .BR ip6gretap | |
d36d9d41 | 245 | - Virtual L2 tunnel interface GRE over IPv6 |
b6d6b5a1 VK |
246 | .sp |
247 | .BR vti | |
248 | - Virtual tunnel interface | |
249 | .sp | |
250 | .BR nlmon | |
251 | - Netlink monitoring device | |
252 | .sp | |
253 | .BR ipvlan | |
254 | - Interface for L3 (IPv6/IPv4) based VLANs | |
2c0feda8 LB |
255 | .sp |
256 | .BR lowpan | |
257 | - Interface for 6LoWPAN (IPv6) over IEEE 802.15.4 / Bluetooth | |
c1a1d8bc JL |
258 | .sp |
259 | .BR geneve | |
260 | - GEneric NEtwork Virtualization Encapsulation | |
b26fc590 SD |
261 | .sp |
262 | .BR macsec | |
263 | - Interface for IEEE 802.1AE MAC Security (MACsec) | |
761a1e60 CT |
264 | .in -8 |
265 | ||
d992f3e6 JP |
266 | .TP |
267 | .BI numtxqueues " QUEUE_COUNT " | |
268 | specifies the number of transmit queues for new device. | |
269 | ||
270 | .TP | |
271 | .BI numrxqueues " QUEUE_COUNT " | |
272 | specifies the number of receive queues for new device. | |
273 | ||
4de8d885 PE |
274 | .TP |
275 | .BI index " IDX " | |
276 | specifies the desired index of the new virtual device. The link creation fails, if the index is busy. | |
277 | ||
503aa4e2 PŠ |
278 | .TP |
279 | VLAN Type Support | |
280 | For a link of type | |
281 | .I VLAN | |
282 | the following additional arguments are supported: | |
283 | ||
284 | .BI "ip link add | |
285 | .BI link " DEVICE " | |
286 | .BI name " NAME " | |
287 | .BI type " vlan " | |
1ab0f02f | 288 | [ |
503aa4e2 | 289 | .BI protocol " VLAN_PROTO " |
1ab0f02f | 290 | ] |
503aa4e2 | 291 | .BI id " VLANID " |
1ab0f02f | 292 | [ |
503aa4e2 | 293 | .BR reorder_hdr " { " on " | " off " } " |
1ab0f02f TF |
294 | ] |
295 | [ | |
503aa4e2 | 296 | .BR gvrp " { " on " | " off " } " |
1ab0f02f TF |
297 | ] |
298 | [ | |
503aa4e2 | 299 | .BR mvrp " { " on " | " off " } " |
1ab0f02f TF |
300 | ] |
301 | [ | |
503aa4e2 | 302 | .BR loose_binding " { " on " | " off " } " |
1ab0f02f TF |
303 | ] |
304 | [ | |
503aa4e2 | 305 | .BI ingress-qos-map " QOS-MAP " |
1ab0f02f TF |
306 | ] |
307 | [ | |
503aa4e2 | 308 | .BI egress-qos-map " QOS-MAP " |
1ab0f02f | 309 | ] |
503aa4e2 PŠ |
310 | |
311 | .in +8 | |
312 | .sp | |
313 | .BI protocol " VLAN_PROTO " | |
314 | - either 802.1Q or 802.1ad. | |
315 | ||
316 | .BI id " VLANID " | |
317 | - specifies the VLAN Identifer to use. Note that numbers with a leading " 0 " or " 0x " are interpreted as octal or hexadeimal, respectively. | |
318 | ||
319 | .BR reorder_hdr " { " on " | " off " } " | |
e612883c VK |
320 | - specifies whether ethernet headers are reordered or not (default is |
321 | .BR on ")." | |
322 | ||
323 | .in +4 | |
324 | If | |
325 | .BR reorder_hdr " is " on | |
326 | then VLAN header will be not inserted immediately but only before passing to the | |
327 | physical device (if this device does not support VLAN offloading), the similar | |
328 | on the RX direction - by default the packet will be untagged before being | |
329 | received by VLAN device. Reordering allows to accelerate tagging on egress and | |
330 | to hide VLAN header on ingress so the packet looks like regular Ethernet packet, | |
79c7078e | 331 | at the same time it might be confusing for packet capture as the VLAN header |
e612883c VK |
332 | does not exist within the packet. |
333 | ||
334 | VLAN offloading can be checked by | |
335 | .BR ethtool "(8):" | |
336 | .in +4 | |
337 | .sp | |
338 | .B ethtool -k | |
339 | <phy_dev> | | |
340 | .RB grep " tx-vlan-offload" | |
341 | .sp | |
342 | .in -4 | |
343 | where <phy_dev> is the physical device to which VLAN device is bound. | |
344 | .in -4 | |
503aa4e2 PŠ |
345 | |
346 | .BR gvrp " { " on " | " off " } " | |
347 | - specifies whether this VLAN should be registered using GARP VLAN Registration Protocol. | |
348 | ||
349 | .BR mvrp " { " on " | " off " } " | |
350 | - specifies whether this VLAN should be registered using Multiple VLAN Registration Protocol. | |
351 | ||
352 | .BR loose_binding " { " on " | " off " } " | |
353 | - specifies whether the VLAN device state is bound to the physical device state. | |
354 | ||
355 | .BI ingress-qos-map " QOS-MAP " | |
ab872442 VK |
356 | - defines a mapping of VLAN header prio field to the Linux internal packet |
357 | priority on incoming frames. The format is FROM:TO with multiple mappings | |
358 | separated by spaces. | |
503aa4e2 PŠ |
359 | |
360 | .BI egress-qos-map " QOS-MAP " | |
ab872442 VK |
361 | - defines a mapping of Linux internal packet priority to VLAN header prio field |
362 | but for outgoing frames. The format is the same as for ingress-qos-map. | |
363 | .in +4 | |
364 | ||
365 | Linux packet priority can be set by | |
366 | .BR iptables "(8)": | |
367 | .in +4 | |
368 | .sp | |
369 | .B iptables | |
370 | -t mangle -A POSTROUTING [...] -j CLASSIFY --set-class 0:4 | |
371 | .sp | |
372 | .in -4 | |
373 | and this "4" priority can be used in the egress qos mapping to set VLAN prio "5": | |
374 | .sp | |
375 | .in +4 | |
376 | .B ip | |
377 | link set veth0.10 type vlan egress 4:5 | |
378 | .in -4 | |
379 | .in -4 | |
503aa4e2 PŠ |
380 | .in -8 |
381 | ||
2816a568 TR |
382 | .TP |
383 | VXLAN Type Support | |
63f60e3a | 384 | For a link of type |
2816a568 TR |
385 | .I VXLAN |
386 | the following additional arguments are supported: | |
387 | ||
388 | .BI "ip link add " DEVICE | |
f66611d8 | 389 | .BI type " vxlan " id " ID" |
1ab0f02f | 390 | [ |
2816a568 | 391 | .BI dev " PHYS_DEV " |
7cfa3802 AW |
392 | .RB " ] [ { " group " | " remote " } " |
393 | .I IPADDR | |
1ab0f02f | 394 | ] [ |
5cd64c97 TF |
395 | .B local |
396 | .RI "{ "IPADDR " | "any " } " | |
1ab0f02f | 397 | ] [ |
2816a568 | 398 | .BI ttl " TTL " |
1ab0f02f | 399 | ] [ |
2816a568 | 400 | .BI tos " TOS " |
1ab0f02f | 401 | ] [ |
f8eb79a6 DB |
402 | .BI flowlabel " FLOWLABEL " |
403 | ] [ | |
503aa4e2 | 404 | .BI dstport " PORT " |
1ab0f02f | 405 | ] [ |
503aa4e2 | 406 | .BI srcport " MIN MAX " |
1ab0f02f | 407 | ] [ |
2816a568 | 408 | .I "[no]learning " |
1ab0f02f | 409 | ] [ |
2816a568 | 410 | .I "[no]proxy " |
1ab0f02f | 411 | ] [ |
2816a568 | 412 | .I "[no]rsc " |
1ab0f02f | 413 | ] [ |
2816a568 | 414 | .I "[no]l2miss " |
1ab0f02f | 415 | ] [ |
2816a568 | 416 | .I "[no]l3miss " |
1ab0f02f | 417 | ] [ |
503aa4e2 | 418 | .I "[no]udpcsum " |
1ab0f02f | 419 | ] [ |
503aa4e2 | 420 | .I "[no]udp6zerocsumtx " |
1ab0f02f | 421 | ] [ |
503aa4e2 | 422 | .I "[no]udp6zerocsumrx " |
1ab0f02f | 423 | ] [ |
c2fbc57e | 424 | .BI ageing " SECONDS " |
1ab0f02f | 425 | ] [ |
c2fbc57e | 426 | .BI maxaddress " NUMBER " |
1ab0f02f | 427 | ] [ |
42d17a61 JB |
428 | .RI "[no]external " |
429 | ] [ | |
2eb90dc7 | 430 | .B gbp |
346410bd JB |
431 | ] [ |
432 | .B gpe | |
1ab0f02f | 433 | ] |
2816a568 TR |
434 | |
435 | .in +8 | |
436 | .sp | |
437 | .BI id " VNI " | |
438 | - specifies the VXLAN Network Identifer (or VXLAN Segment | |
439 | Identifier) to use. | |
440 | ||
441 | .BI dev " PHYS_DEV" | |
442 | - specifies the physical device to use for tunnel endpoint communication. | |
443 | ||
444 | .sp | |
445 | .BI group " IPADDR" | |
446 | - specifies the multicast IP address to join. | |
7cfa3802 AW |
447 | This parameter cannot be specified with the |
448 | .B remote | |
449 | parameter. | |
450 | ||
451 | .sp | |
452 | .BI remote " IPADDR" | |
453 | - specifies the unicast destination IP address to use in outgoing packets | |
454 | when the destination link layer address is not known in the VXLAN device | |
a89d5329 | 455 | forwarding database. This parameter cannot be specified with the |
7cfa3802 AW |
456 | .B group |
457 | parameter. | |
2816a568 TR |
458 | |
459 | .sp | |
460 | .BI local " IPADDR" | |
461 | - specifies the source IP address to use in outgoing packets. | |
462 | ||
463 | .sp | |
464 | .BI ttl " TTL" | |
465 | - specifies the TTL value to use in outgoing packets. | |
466 | ||
467 | .sp | |
468 | .BI tos " TOS" | |
469 | - specifies the TOS value to use in outgoing packets. | |
470 | ||
f8eb79a6 DB |
471 | .sp |
472 | .BI flowlabel " FLOWLABEL" | |
473 | - specifies the flow label to use in outgoing packets. | |
474 | ||
2816a568 | 475 | .sp |
503aa4e2 PŠ |
476 | .BI dstport " PORT" |
477 | - specifies the UDP destination port to communicate to the remote VXLAN tunnel endpoint. | |
478 | ||
479 | .sp | |
480 | .BI srcport " MIN MAX" | |
2816a568 TR |
481 | - specifies the range of port numbers to use as UDP |
482 | source ports to communicate to the remote VXLAN tunnel endpoint. | |
483 | ||
484 | .sp | |
485 | .I [no]learning | |
486 | - specifies if unknown source link layer addresses and IP addresses | |
487 | are entered into the VXLAN device forwarding database. | |
488 | ||
489 | .sp | |
490 | .I [no]rsc | |
491 | - specifies if route short circuit is turned on. | |
492 | ||
493 | .sp | |
494 | .I [no]proxy | |
495 | - specifies ARP proxy is turned on. | |
496 | ||
497 | .sp | |
498 | .I [no]l2miss | |
499 | - specifies if netlink LLADDR miss notifications are generated. | |
500 | ||
501 | .sp | |
502 | .I [no]l3miss | |
503 | - specifies if netlink IP ADDR miss notifications are generated. | |
504 | ||
503aa4e2 PŠ |
505 | .sp |
506 | .I [no]udpcsum | |
4853ee52 | 507 | - specifies if UDP checksum is calculated for transmitted packets over IPv4. |
503aa4e2 PŠ |
508 | |
509 | .sp | |
510 | .I [no]udp6zerocsumtx | |
4853ee52 | 511 | - skip UDP checksum calculation for transmitted packets over IPv6. |
503aa4e2 PŠ |
512 | |
513 | .sp | |
514 | .I [no]udp6zerocsumrx | |
4853ee52 | 515 | - allow incoming UDP packets over IPv6 with zero checksum field. |
503aa4e2 | 516 | |
c2fbc57e ND |
517 | .sp |
518 | .BI ageing " SECONDS" | |
519 | - specifies the lifetime in seconds of FDB entries learnt by the kernel. | |
520 | ||
521 | .sp | |
522 | .BI maxaddress " NUMBER" | |
523 | - specifies the maximum number of FDB entries. | |
524 | ||
42d17a61 JB |
525 | .sp |
526 | .I [no]external | |
527 | - specifies whether an external control plane | |
528 | .RB "(e.g. " "ip route encap" ) | |
529 | or the internal FDB should be used. | |
530 | ||
2eb90dc7 TG |
531 | .sp |
532 | .B gbp | |
533 | - enables the Group Policy extension (VXLAN-GBP). | |
534 | ||
535 | .in +4 | |
536 | Allows to transport group policy context across VXLAN network peers. | |
537 | If enabled, includes the mark of a packet in the VXLAN header for outgoing | |
538 | packets and fills the packet mark based on the information found in the | |
539 | VXLAN header for incomming packets. | |
540 | ||
541 | Format of upper 16 bits of packet mark (flags); | |
542 | ||
543 | .in +2 | |
544 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
545 | .br | |
546 | |-|-|-|-|-|-|-|-|-|D|-|-|A|-|-|-| | |
547 | .br | |
548 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
549 | ||
550 | .B D := | |
551 | Don't Learn bit. When set, this bit indicates that the egress | |
552 | VTEP MUST NOT learn the source address of the encapsulated frame. | |
553 | ||
554 | .B A := | |
555 | Indicates that the group policy has already been applied to | |
556 | this packet. Policies MUST NOT be applied by devices when the A bit is set. | |
557 | .in -2 | |
558 | ||
559 | Format of lower 16 bits of packet mark (policy ID): | |
560 | ||
561 | .in +2 | |
562 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
563 | .br | |
564 | | Group Policy ID | | |
565 | .br | |
566 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
567 | .in -2 | |
568 | ||
569 | Example: | |
570 | iptables -A OUTPUT [...] -j MARK --set-mark 0x800FF | |
571 | ||
572 | .in -4 | |
573 | ||
346410bd JB |
574 | .sp |
575 | .B gpe | |
576 | - enables the Generic Protocol extension (VXLAN-GPE). Currently, this is | |
577 | only supported together with the | |
578 | .B external | |
579 | keyword. | |
580 | ||
2816a568 TR |
581 | .in -8 |
582 | ||
90f1df71 TH |
583 | .TP |
584 | GRE, IPIP, SIT Type Support | |
585 | For a link of types | |
586 | .I GRE/IPIP/SIT | |
587 | the following additional arguments are supported: | |
588 | ||
589 | .BI "ip link add " DEVICE | |
590 | .BR type " { gre | ipip | sit } " | |
591 | .BI " remote " ADDR " local " ADDR | |
1ab0f02f | 592 | [ |
90f1df71 | 593 | .BR encap " { fou | gue | none } " |
1ab0f02f | 594 | ] [ |
90f1df71 | 595 | .BI "encap-sport { " PORT " | auto } " |
1ab0f02f | 596 | ] [ |
90f1df71 | 597 | .BI "encap-dport " PORT |
1ab0f02f | 598 | ] [ |
90f1df71 | 599 | .I " [no]encap-csum " |
1ab0f02f | 600 | ] [ |
90f1df71 | 601 | .I " [no]encap-remcsum " |
1ab0f02f | 602 | ] |
90f1df71 TH |
603 | |
604 | .in +8 | |
605 | .sp | |
606 | .BI remote " ADDR " | |
607 | - specifies the remote address of the tunnel. | |
608 | ||
609 | .sp | |
610 | .BI local " ADDR " | |
611 | - specifies the fixed local address for tunneled packets. | |
612 | It must be an address on another interface on this host. | |
613 | ||
614 | .sp | |
615 | .BR encap " { fou | gue | none } " | |
616 | - specifies type of secondary UDP encapsulation. "fou" indicates | |
617 | Foo-Over-UDP, "gue" indicates Generic UDP Encapsulation. | |
618 | ||
619 | .sp | |
620 | .BI "encap-sport { " PORT " | auto } " | |
621 | - specifies the source port in UDP encapsulation. | |
622 | .IR PORT | |
623 | indicates the port by number, "auto" | |
624 | indicates that the port number should be chosen automatically | |
625 | (the kernel picks a flow based on the flow hash of the | |
626 | encapsulated packet). | |
627 | ||
628 | .sp | |
629 | .I [no]encap-csum | |
630 | - specifies if UDP checksums are enabled in the secondary | |
631 | encapsulation. | |
632 | ||
633 | .sp | |
634 | .I [no]encap-remcsum | |
635 | - specifies if Remote Checksum Offload is enabled. This is only | |
636 | applicable for Generic UDP Encapsulation. | |
637 | ||
638 | .in -8 | |
639 | ||
9abde37c | 640 | .TP |
641 | IP6GRE/IP6GRETAP Type Support | |
63f60e3a | 642 | For a link of type |
9abde37c | 643 | .I IP6GRE/IP6GRETAP |
644 | the following additional arguments are supported: | |
645 | ||
646 | .BI "ip link add " DEVICE | |
647 | .BI type " { ip6gre | ip6gretap } " remote " ADDR " local " ADDR | |
1ab0f02f | 648 | [ |
9abde37c | 649 | .I "[i|o]seq]" |
1ab0f02f | 650 | ] [ |
9abde37c | 651 | .I "[i|o]key" KEY |
1ab0f02f | 652 | ] [ |
9abde37c | 653 | .I " [i|o]csum " |
1ab0f02f | 654 | ] [ |
9abde37c | 655 | .BI hoplimit " TTL " |
1ab0f02f | 656 | ] [ |
9abde37c | 657 | .BI encaplimit " ELIM " |
1ab0f02f | 658 | ] [ |
9abde37c | 659 | .BI tclass " TCLASS " |
1ab0f02f | 660 | ] [ |
9abde37c | 661 | .BI flowlabel " FLOWLABEL " |
1ab0f02f | 662 | ] [ |
9abde37c | 663 | .BI "dscp inherit" |
1ab0f02f | 664 | ] [ |
9abde37c | 665 | .BI dev " PHYS_DEV " |
1ab0f02f | 666 | ] |
9abde37c | 667 | |
668 | .in +8 | |
669 | .sp | |
670 | .BI remote " ADDR " | |
671 | - specifies the remote IPv6 address of the tunnel. | |
672 | ||
673 | .sp | |
674 | .BI local " ADDR " | |
675 | - specifies the fixed local IPv6 address for tunneled packets. | |
90f1df71 | 676 | It must be an address on another interface on this host. |
9abde37c | 677 | |
678 | .sp | |
679 | .BI [i|o]seq | |
680 | - serialize packets. | |
681 | The | |
682 | .B oseq | |
683 | flag enables sequencing of outgoing packets. | |
684 | The | |
685 | .B iseq | |
686 | flag requires that all input packets are serialized. | |
687 | ||
688 | .sp | |
689 | .BI [i|o]key " KEY" | |
690 | - use keyed GRE with key | |
691 | .IR KEY ". "KEY | |
692 | is either a number or an IPv4 address-like dotted quad. | |
693 | The | |
694 | .B key | |
695 | parameter specifies the same key to use in both directions. | |
696 | The | |
697 | .BR ikey " and " okey | |
698 | parameters specify different keys for input and output. | |
699 | ||
700 | .sp | |
701 | .BI [i|o]csum | |
702 | - generate/require checksums for tunneled packets. | |
703 | The | |
704 | .B ocsum | |
705 | flag calculates checksums for outgoing packets. | |
706 | The | |
707 | .B icsum | |
708 | flag requires that all input packets have the correct | |
a89d5329 | 709 | checksum. The |
9abde37c | 710 | .B csum |
711 | flag is equivalent to the combination | |
712 | .BR "icsum ocsum" . | |
713 | ||
714 | .sp | |
715 | .BI hoplimit " TTL" | |
716 | - specifies Hop Limit value to use in outgoing packets. | |
717 | ||
718 | .sp | |
719 | .BI encaplimit " ELIM" | |
a89d5329 | 720 | - specifies a fixed encapsulation limit. Default is 4. |
9abde37c | 721 | |
722 | .sp | |
723 | .BI flowlabel " FLOWLABEL" | |
63f60e3a | 724 | - specifies a fixed flowlabel. |
9abde37c | 725 | |
726 | .sp | |
727 | .BI tclass " TCLASS" | |
728 | - specifies the traffic class field on | |
729 | tunneled packets, which can be specified as either a two-digit | |
730 | hex value (e.g. c0) or a predefined string (e.g. internet). | |
731 | The value | |
732 | .B inherit | |
733 | causes the field to be copied from the original IP header. The | |
734 | values | |
735 | .BI "inherit/" STRING | |
736 | or | |
737 | .BI "inherit/" 00 ".." ff | |
738 | will set the field to | |
739 | .I STRING | |
740 | or | |
741 | .IR 00 ".." ff | |
742 | when tunneling non-IP packets. The default value is 00. | |
743 | ||
744 | .in -8 | |
745 | ||
8ca8fac7 OG |
746 | .TP |
747 | IPoIB Type Support | |
748 | For a link of type | |
749 | .I IPoIB | |
750 | the following additional arguments are supported: | |
751 | ||
752 | .BI "ip link add " DEVICE " name " NAME | |
753 | .BI type " ipoib [ " pkey " PKEY ] [" mode " MODE " ] | |
754 | ||
755 | .in +8 | |
756 | .sp | |
757 | .BI pkey " PKEY " | |
758 | - specifies the IB P-Key to use. | |
759 | ||
760 | .BI mode " MODE " | |
761 | - specifies the mode (datagram or connected) to use. | |
762 | ||
c1a1d8bc JL |
763 | .TP |
764 | GENEVE Type Support | |
765 | For a link of type | |
766 | .I GENEVE | |
767 | the following additional arguments are supported: | |
768 | ||
769 | .BI "ip link add " DEVICE | |
770 | .BI type " geneve " id " ID " remote " IPADDR" | |
1ab0f02f | 771 | [ |
f4c05c2e | 772 | .BI ttl " TTL " |
1ab0f02f | 773 | ] [ |
f4739b2e | 774 | .BI tos " TOS " |
29bb2373 DB |
775 | ] [ |
776 | .BI flowlabel " FLOWLABEL " | |
1ab0f02f | 777 | ] |
c1a1d8bc JL |
778 | |
779 | .in +8 | |
780 | .sp | |
781 | .BI id " VNI " | |
782 | - specifies the Virtual Network Identifer to use. | |
783 | ||
784 | .sp | |
785 | .BI remote " IPADDR" | |
786 | - specifies the unicast destination IP address to use in outgoing packets. | |
787 | ||
f4c05c2e JL |
788 | .sp |
789 | .BI ttl " TTL" | |
790 | - specifies the TTL value to use in outgoing packets. | |
791 | ||
f4739b2e JL |
792 | .sp |
793 | .BI tos " TOS" | |
794 | - specifies the TOS value to use in outgoing packets. | |
795 | ||
29bb2373 DB |
796 | .sp |
797 | .BI flowlabel " FLOWLABEL" | |
798 | - specifies the flow label to use in outgoing packets. | |
799 | ||
c1a1d8bc JL |
800 | .in -8 |
801 | ||
a60223bc PS |
802 | .TP |
803 | MACVLAN and MACVTAP Type Support | |
804 | For a link of type | |
805 | .I MACVLAN | |
806 | or | |
807 | .I MACVTAP | |
808 | the following additional arguments are supported: | |
809 | ||
810 | .BI "ip link add link " DEVICE " name " NAME | |
811 | .BR type " { " macvlan " | " macvtap " } " | |
812 | .BR mode " { " private " | " vepa " | " bridge " | " passthru | |
813 | .BR " [ " nopromisc " ] } " | |
814 | ||
815 | .in +8 | |
816 | .sp | |
817 | .BR type " { " macvlan " | " macvtap " } " | |
818 | - specifies the link type to use. | |
819 | .BR macvlan " creates just a virtual interface, while " | |
820 | .BR macvtap " in addition creates a character device " | |
821 | .BR /dev/tapX " to be used just like a " tuntap " device." | |
822 | ||
823 | .B mode private | |
824 | - Do not allow communication between | |
825 | .B macvlan | |
826 | instances on the same physical interface, even if the external switch supports | |
827 | hairpin mode. | |
828 | ||
829 | .B mode vepa | |
830 | - Virtual Ethernet Port Aggregator mode. Data from one | |
831 | .B macvlan | |
832 | instance to the other on the same physical interface is transmitted over the | |
833 | physical interface. Either the attached switch needs to support hairpin mode, | |
834 | or there must be a TCP/IP router forwarding the packets in order to allow | |
835 | communication. This is the default mode. | |
836 | ||
837 | .B mode bridge | |
838 | - In bridge mode, all endpoints are directly connected to each other, | |
839 | communication is not redirected through the physical interface's peer. | |
840 | ||
841 | .BR mode " " passthru " [ " nopromisc " ] " | |
842 | - This mode gives more power to a single endpoint, usually in | |
843 | .BR macvtap " mode. It is not allowed for more than one endpoint on the same " | |
844 | physical interface. All traffic will be forwarded to this endpoint, allowing | |
845 | virtio guests to change MAC address or set promiscuous mode in order to bridge | |
846 | the interface or create vlan interfaces on top of it. By default, this mode | |
847 | forces the underlying interface into promiscuous mode. Passing the | |
848 | .BR nopromisc " flag prevents this, so the promisc flag may be controlled " | |
849 | using standard tools. | |
850 | .in -8 | |
851 | ||
9b3c971a PH |
852 | .TP |
853 | High-availability Seamless Redundancy (HSR) Support | |
854 | For a link of type | |
855 | .I HSR | |
856 | the following additional arguments are supported: | |
857 | ||
858 | .BI "ip link add link " DEVICE " name " NAME | |
859 | .BI type " hsr " | |
860 | .BI slave1 " SLAVE1-IF " slave2 " SLAVE2-IF " | |
861 | .BR " [ supervision " ADDR-BYTE " ] " | |
862 | .BR " [ version { " 0 " | " 1 " } ] " | |
863 | ||
864 | .in +8 | |
865 | .sp | |
866 | .BR type " hsr " | |
867 | - specifies the link type to use, here HSR. | |
868 | ||
869 | .BI slave1 " SLAVE1-IF " | |
870 | - Specifies the physical device used for the first of the two ring ports. | |
871 | ||
872 | .BI slave2 " SLAVE2-IF " | |
873 | - Specifies the physical device used for the second of the two ring ports. | |
874 | ||
875 | .BR "supervision ADDR-BYTE " | |
876 | - The last byte of the multicast address used for HSR supervision frames. | |
877 | Default option is "0", possible values 0-255. | |
878 | ||
879 | .BR "version { 0 | 1 }" | |
880 | - Selects the protocol version of the interface. Default option is "0", which | |
881 | corresponds to the 2010 version of the HSR standard. Option "1" activates the | |
882 | 2012 version. | |
883 | .in -8 | |
884 | ||
b26fc590 SD |
885 | .TP |
886 | MACsec Type Support | |
887 | For a link of type | |
888 | .I MACsec | |
889 | the following additional arguments are supported: | |
890 | ||
891 | .BI "ip link add link " DEVICE " name " NAME " type macsec" | |
892 | [ | |
893 | .BI port " PORT" | |
894 | | | |
895 | .BI sci " SCI" | |
896 | ] [ | |
897 | .BI cipher " CIPHER_SUITE" | |
898 | ] [ | |
899 | .BR encrypt " {" | |
900 | .BR on " | " off " } ] [ " | |
901 | .BR send_sci " { " on " | " off " } ] [" | |
902 | .BR es " { " on " | " off " } ] [" | |
903 | .BR scb " { " on " | " off " } ] [" | |
904 | .BR protect " { " on " | " off " } ] [" | |
905 | .BR replay " { " on " | " off " }" | |
906 | .BR window " { " | |
907 | .IR 0..2^32-1 " } ] [" | |
908 | .BR validate " { " strict " | " check " | " disabled " } ] [" | |
909 | .BR encoding " { " | |
910 | .IR 0..3 " } ]" | |
911 | ||
912 | .in +8 | |
913 | .sp | |
914 | .BI port " PORT " | |
915 | - sets the port number for this MACsec device. | |
916 | ||
917 | .sp | |
918 | .BI sci " SCI " | |
919 | - sets the SCI for this MACsec device. | |
920 | ||
921 | .sp | |
922 | .BI cipher " CIPHER_SUITE " | |
923 | - defines the cipher suite to use. | |
924 | ||
925 | .sp | |
926 | .BR "encrypt on " or " encrypt off" | |
927 | - switches between authenticated encryption, or authenticity mode only. | |
928 | ||
929 | .sp | |
930 | .BR "send_sci on " or " send_sci off" | |
931 | - specifies whether the SCI is included in every packet, or only when it is necessary. | |
932 | ||
933 | .sp | |
934 | .BR "es on " or " es off" | |
935 | - sets the End Station bit. | |
936 | ||
937 | .sp | |
938 | .BR "scb on " or " scb off" | |
939 | - sets the Single Copy Broadcast bit. | |
940 | ||
941 | .sp | |
942 | .BR "protect on " or " protect off" | |
943 | - enables MACsec protection on the device. | |
944 | ||
945 | .sp | |
946 | .BR "replay on " or " replay off" | |
947 | - enables replay protection on the device. | |
948 | ||
949 | .in +8 | |
950 | ||
951 | .sp | |
952 | .BI window " SIZE " | |
953 | - sets the size of the replay window. | |
954 | ||
955 | .in -8 | |
956 | ||
957 | .sp | |
958 | .BR "validate strict " or " validate check " or " validate disabled" | |
959 | - sets the validation mode on the device. | |
960 | ||
961 | .sp | |
962 | .BI encoding " AN " | |
963 | - sets the active secure association for transmission. | |
964 | ||
965 | .in -8 | |
966 | ||
761a1e60 | 967 | .SS ip link delete - delete virtual link |
761a1e60 CT |
968 | |
969 | .TP | |
970 | .BI dev " DEVICE " | |
7f74cf6d VK |
971 | specifies the virtual device to act operate on. |
972 | ||
973 | .TP | |
974 | .BI group " GROUP " | |
975 | specifies the group of virtual links to delete. Group 0 is not allowed to be | |
976 | deleted since it is the default group. | |
977 | ||
978 | .TP | |
979 | .BI type " TYPE " | |
980 | specifies the type of the device. | |
761a1e60 CT |
981 | |
982 | .SS ip link set - change device attributes | |
983 | ||
984 | .TP | |
985 | .BI dev " DEVICE " | |
986 | .I DEVICE | |
6274b0b7 | 987 | specifies network device to operate on. When configuring SR-IOV Virtual Function |
761a1e60 CT |
988 | (VF) devices, this keyword should specify the associated Physical Function (PF) |
989 | device. | |
990 | ||
991 | .TP | |
992 | .BI group " GROUP " | |
993 | .I GROUP | |
994 | has a dual role: If both group and dev are present, then move the device to the | |
a89d5329 | 995 | specified group. If only a group is specified, then the command operates on |
761a1e60 CT |
996 | all devices in that group. |
997 | ||
998 | .TP | |
999 | .BR up " and " down | |
1000 | change the state of the device to | |
1001 | .B UP | |
1002 | or | |
1003 | .BR "DOWN" . | |
1004 | ||
1005 | .TP | |
1006 | .BR "arp on " or " arp off" | |
1007 | change the | |
1008 | .B NOARP | |
1009 | flag on the device. | |
1010 | ||
1011 | .TP | |
1012 | .BR "multicast on " or " multicast off" | |
1013 | change the | |
1014 | .B MULTICAST | |
1015 | flag on the device. | |
1016 | ||
18864827 AK |
1017 | .TP |
1018 | .BR "protodown on " or " protodown off" | |
1019 | change the | |
1020 | .B PROTODOWN | |
1021 | state on the device. Indicates that a protocol error has been detected on the port. Switch drivers can react to this error by doing a phys down on the switch port. | |
1022 | ||
761a1e60 CT |
1023 | .TP |
1024 | .BR "dynamic on " or " dynamic off" | |
1025 | change the | |
1026 | .B DYNAMIC | |
34c8a95c VK |
1027 | flag on the device. Indicates that address can change when interface goes down (currently |
1028 | .B NOT | |
1029 | used by the Linux). | |
761a1e60 CT |
1030 | |
1031 | .TP | |
1032 | .BI name " NAME" | |
a89d5329 | 1033 | change the name of the device. This operation is not |
761a1e60 CT |
1034 | recommended if the device is running or has some addresses |
1035 | already configured. | |
1036 | ||
1037 | .TP | |
1038 | .BI txqueuelen " NUMBER" | |
1039 | .TP | |
1040 | .BI txqlen " NUMBER" | |
1041 | change the transmit queue length of the device. | |
1042 | ||
1043 | .TP | |
1044 | .BI mtu " NUMBER" | |
1045 | change the | |
1046 | .I MTU | |
1047 | of the device. | |
1048 | ||
1049 | .TP | |
1050 | .BI address " LLADDRESS" | |
1051 | change the station address of the interface. | |
1052 | ||
1053 | .TP | |
1054 | .BI broadcast " LLADDRESS" | |
1055 | .TP | |
1056 | .BI brd " LLADDRESS" | |
1057 | .TP | |
1058 | .BI peer " LLADDRESS" | |
1059 | change the link layer broadcast address or the peer address when | |
1060 | the interface is | |
1061 | .IR "POINTOPOINT" . | |
1062 | ||
1063 | .TP | |
36324eba | 1064 | .BI netns " NETNSNAME " \fR| " PID" |
761a1e60 | 1065 | move the device to the network namespace associated with name |
36324eba VK |
1066 | .IR "NETNSNAME " or |
1067 | .RI process " PID". | |
1068 | ||
1069 | Some devices are not allowed to change network namespace: loopback, bridge, | |
1070 | ppp, wireless. These are network namespace local devices. In such case | |
1071 | .B ip | |
1072 | tool will return "Invalid argument" error. It is possible to find out if device is local | |
1073 | to a single network namespace by checking | |
1074 | .B netns-local | |
1075 | flag in the output of the | |
1076 | .BR ethtool ":" | |
1077 | ||
1078 | .in +8 | |
1079 | .B ethtool -k | |
1080 | .I DEVICE | |
1081 | .in -8 | |
1082 | ||
1083 | To change network namespace for wireless devices the | |
1084 | .B iw | |
1085 | tool can be used. But it allows to change network namespace only for physical devices and by process | |
1086 | .IR PID . | |
761a1e60 CT |
1087 | |
1088 | .TP | |
1089 | .BI alias " NAME" | |
1090 | give the device a symbolic name for easy reference. | |
1091 | ||
503aa4e2 PŠ |
1092 | .TP |
1093 | .BI group " GROUP" | |
1094 | specify the group the device belongs to. | |
1095 | The available groups are listed in file | |
1096 | .BR "@SYSCONFDIR@/group" . | |
1097 | ||
761a1e60 CT |
1098 | .TP |
1099 | .BI vf " NUM" | |
1100 | specify a Virtual Function device to be configured. The associated PF device | |
1101 | must be specified using the | |
1102 | .B dev | |
1103 | parameter. | |
1104 | ||
1105 | .in +8 | |
1106 | .BI mac " LLADDRESS" | |
1107 | - change the station address for the specified VF. The | |
1108 | .B vf | |
1109 | parameter must be specified. | |
1110 | ||
1111 | .sp | |
1112 | .BI vlan " VLANID" | |
1113 | - change the assigned VLAN for the specified VF. When specified, all traffic | |
1114 | sent from the VF will be tagged with the specified VLAN ID. Incoming traffic | |
1115 | will be filtered for the specified VLAN ID, and will have all VLAN tags | |
1116 | stripped before being passed to the VF. Setting this parameter to 0 disables | |
1117 | VLAN tagging and filtering. The | |
1118 | .B vf | |
1119 | parameter must be specified. | |
1120 | ||
1121 | .sp | |
1122 | .BI qos " VLAN-QOS" | |
1123 | - assign VLAN QOS (priority) bits for the VLAN tag. When specified, all VLAN | |
1124 | tags transmitted by the VF will include the specified priority bits in the | |
1125 | VLAN tag. If not specified, the value is assumed to be 0. Both the | |
1126 | .B vf | |
1127 | and | |
1128 | .B vlan | |
1129 | parameters must be specified. Setting both | |
1130 | .B vlan | |
1131 | and | |
1132 | .B qos | |
1133 | as 0 disables VLAN tagging and filtering for the VF. | |
1134 | ||
1135 | .sp | |
1136 | .BI rate " TXRATE" | |
f89a2a05 SC |
1137 | -- change the allowed transmit bandwidth, in Mbps, for the specified VF. |
1138 | Setting this parameter to 0 disables rate limiting. | |
1139 | .B vf | |
1140 | parameter must be specified. | |
1141 | Please use new API | |
1142 | .B "max_tx_rate" | |
1143 | option instead. | |
1144 | ||
1145 | .sp | |
1146 | .BI max_tx_rate " TXRATE" | |
1147 | - change the allowed maximum transmit bandwidth, in Mbps, for the specified VF. | |
1148 | .B vf | |
1149 | parameter must be specified. | |
1150 | ||
1151 | .sp | |
1152 | .BI min_tx_rate " TXRATE" | |
1153 | - change the allowed minimum transmit bandwidth, in Mbps, for the specified VF. | |
1154 | Minimum TXRATE should be always <= Maximum TXRATE. | |
761a1e60 CT |
1155 | .B vf |
1156 | parameter must be specified. | |
1157 | ||
1158 | .sp | |
1159 | .BI spoofchk " on|off" | |
1160 | - turn packet spoof checking on or off for the specified VF. | |
63f60e3a OG |
1161 | .sp |
1162 | .BI state " auto|enable|disable" | |
1163 | - set the virtual link state as seen by the specified VF. Setting to auto means a | |
1164 | reflection of the PF link state, enable lets the VF to communicate with other VFs on | |
1165 | this host even if the PF link state is down, disable causes the HW to drop any packets | |
1166 | sent by the VF. | |
b6d77d9e HS |
1167 | .sp |
1168 | .BI trust " on|off" | |
1169 | - trust the specified VF user. This enables that VF user can set a specific feature | |
1170 | which may impact security and/or performance. (e.g. VF multicast promiscuous mode) | |
761a1e60 CT |
1171 | .in -8 |
1172 | ||
1173 | .TP | |
1174 | .BI master " DEVICE" | |
1175 | set master device of the device (enslave device). | |
1176 | ||
1177 | .TP | |
1178 | .BI nomaster | |
1179 | unset master device of the device (release device). | |
1180 | ||
503aa4e2 | 1181 | .TP |
8f0777a8 BM |
1182 | .BI addrgenmode " eui64|none|stable_secret|random" |
1183 | set the IPv6 address generation mode | |
1184 | ||
1185 | .I eui64 | |
1186 | - use a Modified EUI-64 format interface identifier | |
1187 | ||
1188 | .I none | |
1189 | - disable automatic address generation | |
1190 | ||
1191 | .I stable_secret | |
1192 | - generate the interface identifier based on a preset /proc/sys/net/ipv6/conf/{default,DEVICE}/stable_secret | |
1193 | ||
1194 | .I random | |
1195 | - like stable_secret, but auto-generate a new random secret if none is set | |
503aa4e2 PŠ |
1196 | |
1197 | .TP | |
1198 | .BR "link-netnsid " | |
1199 | set peer netnsid for a cross-netns interface | |
1200 | ||
761a1e60 CT |
1201 | .PP |
1202 | .B Warning: | |
1203 | If multiple parameter changes are requested, | |
1204 | .B ip | |
1205 | aborts immediately after any of the changes have failed. | |
1206 | This is the only case when | |
1207 | .B ip | |
a89d5329 | 1208 | can move the system to an unpredictable state. The solution |
761a1e60 CT |
1209 | is to avoid changing several parameters with one |
1210 | .B ip link set | |
1211 | call. | |
1212 | ||
1213 | .SS ip link show - display device attributes | |
1214 | ||
1215 | .TP | |
1216 | .BI dev " NAME " (default) | |
1217 | .I NAME | |
1218 | specifies the network device to show. | |
1219 | If this argument is omitted all devices in the default group are listed. | |
1220 | ||
1221 | .TP | |
1222 | .BI group " GROUP " | |
1223 | .I GROUP | |
1224 | specifies what group of devices to show. | |
1225 | ||
1226 | .TP | |
1227 | .B up | |
1228 | only display running interfaces. | |
1229 | ||
1b944148 VK |
1230 | .TP |
1231 | .BI master " DEVICE " | |
1232 | .I DEVICE | |
1233 | specifies the master device which enslaves devices to show. | |
1234 | ||
712249d8 VK |
1235 | .TP |
1236 | .BI type " TYPE " | |
1237 | .I TYPE | |
1238 | specifies the type of devices to show. | |
1239 | ||
1f299e92 | 1240 | .SS ip link help - display help |
1241 | ||
1242 | .PP | |
1243 | .I "TYPE" | |
1244 | specifies which help of link type to dislpay. | |
1245 | ||
032b4f4d VK |
1246 | .SS |
1247 | .I GROUP | |
1248 | may be a number or a string from the file | |
699589f6 | 1249 | .B @SYSCONFDIR@/group |
032b4f4d VK |
1250 | which can be manually filled. |
1251 | ||
761a1e60 CT |
1252 | .SH "EXAMPLES" |
1253 | .PP | |
1254 | ip link show | |
1255 | .RS 4 | |
1256 | Shows the state of all network interfaces on the system. | |
1257 | .RE | |
1258 | .PP | |
712249d8 VK |
1259 | ip link show type bridge |
1260 | .RS 4 | |
1261 | Shows the bridge devices. | |
1262 | .RE | |
1263 | .PP | |
1264 | ip link show type vlan | |
1265 | .RS 4 | |
1266 | Shows the vlan devices. | |
1267 | .RE | |
1268 | .PP | |
417b2180 VK |
1269 | ip link show master br0 |
1270 | .RS 4 | |
1271 | Shows devices enslaved by br0 | |
1272 | .RE | |
1273 | .PP | |
761a1e60 CT |
1274 | ip link set dev ppp0 mtu 1400 |
1275 | .RS 4 | |
1276 | Change the MTU the ppp0 device. | |
1277 | .RE | |
1278 | .PP | |
1279 | ip link add link eth0 name eth0.10 type vlan id 10 | |
1280 | .RS 4 | |
1281 | Creates a new vlan device eth0.10 on device eth0. | |
1282 | .RE | |
1283 | .PP | |
1284 | ip link delete dev eth0.10 | |
1285 | .RS 4 | |
1286 | Removes vlan device. | |
1287 | .RE | |
1288 | ||
1f299e92 | 1289 | ip link help gre |
1290 | .RS 4 | |
1291 | Display help for the gre link type. | |
90f1df71 TH |
1292 | .RE |
1293 | .PP | |
1294 | ip link add name tun1 type ipip remote 192.168.1.1 | |
1295 | local 192.168.1.2 ttl 225 encap gue encap-sport auto | |
1296 | encap-dport 5555 encap-csum encap-remcsum | |
1297 | .RS 4 | |
1298 | Creates an IPIP that is encapsulated with Generic UDP Encapsulation, | |
1299 | and the outer UDP checksum and remote checksum offload are enabled. | |
1300 | ||
2c0feda8 LB |
1301 | .RE |
1302 | .PP | |
1303 | ip link add link wpan0 lowpan0 type lowpan | |
1304 | .RS 4 | |
1305 | Creates a 6LoWPAN interface named lowpan0 on the underlying | |
1306 | IEEE 802.15.4 device wpan0. | |
1f299e92 | 1307 | .RE |
1308 | ||
761a1e60 CT |
1309 | .SH SEE ALSO |
1310 | .br | |
d5910297 | 1311 | .BR ip (8), |
e612883c | 1312 | .BR ip-netns (8), |
ab872442 VK |
1313 | .BR ethtool (8), |
1314 | .BR iptables (8) | |
761a1e60 CT |
1315 | |
1316 | .SH AUTHOR | |
1317 | Original Manpage by Michail Litvak <mci@owl.openwall.com> |