]>
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 | |
051274b4 | 39 | .BR "[ " gso_max_size |
c2db423f SH |
40 | .IR BYTES " ]" |
41 | .RB "[ " gso_max_segs | |
42 | .IR SEGMENTS " ]" | |
43 | .br | |
d890144e | 44 | .BI type " TYPE" |
761a1e60 CT |
45 | .RI "[ " ARGS " ]" |
46 | ||
761a1e60 | 47 | .ti -8 |
7f74cf6d VK |
48 | .BR "ip link delete " { |
49 | .IR DEVICE " | " | |
50 | .BI "group " GROUP | |
51 | } | |
761a1e60 CT |
52 | .BI type " TYPE" |
53 | .RI "[ " ARGS " ]" | |
54 | ||
55 | .ti -8 | |
56 | .BR "ip link set " { | |
57 | .IR DEVICE " | " | |
58 | .BI "group " GROUP | |
657426c5 PS |
59 | } |
60 | .br | |
61 | .RB "[ { " up " | " down " } ]" | |
62 | .br | |
63 | .RB "[ " type | |
64 | .IR "ETYPE TYPE_ARGS" " ]" | |
761a1e60 | 65 | .br |
ca611d64 | 66 | .RB "[ " arp " { " on " | " off " } ]" |
761a1e60 | 67 | .br |
ca611d64 | 68 | .RB "[ " dynamic " { " on " | " off " } ]" |
761a1e60 | 69 | .br |
ca611d64 | 70 | .RB "[ " multicast " { " on " | " off " } ]" |
761a1e60 | 71 | .br |
ca611d64 | 72 | .RB "[ " allmulticast " { " on " | " off " } ]" |
761a1e60 | 73 | .br |
ca611d64 | 74 | .RB "[ " promisc " { " on " | " off " } ]" |
18864827 | 75 | .br |
ca611d64 | 76 | .RB "[ " protodown " { " on " | " off " } ]" |
761a1e60 | 77 | .br |
ca611d64 | 78 | .RB "[ " trailers " { " on " | " off " } ]" |
761a1e60 | 79 | .br |
ca611d64 PS |
80 | .RB "[ " txqueuelen |
81 | .IR PACKETS " ]" | |
82 | .br | |
83 | .RB "[ " name | |
84 | .IR NEWNAME " ]" | |
85 | .br | |
86 | .RB "[ " address | |
87 | .IR LLADDR " ]" | |
761a1e60 | 88 | .br |
ca611d64 PS |
89 | .RB "[ " broadcast |
90 | .IR LLADDR " ]" | |
91 | .br | |
92 | .RB "[ " mtu | |
93 | .IR MTU " ]" | |
761a1e60 | 94 | .br |
ca611d64 PS |
95 | .RB "[ " netns " {" |
96 | .IR PID " | " NETNSNAME " } ]" | |
761a1e60 | 97 | .br |
ca611d64 PS |
98 | .RB "[ " link-netnsid |
99 | .IR ID " ]" | |
761a1e60 | 100 | .br |
ca611d64 PS |
101 | .RB "[ " alias |
102 | .IR NAME " ]" | |
761a1e60 | 103 | .br |
ca611d64 | 104 | .RB "[ " vf |
761a1e60 CT |
105 | .IR NUM " [" |
106 | .B mac | |
ca611d64 PS |
107 | .IR LLADDR " ]" |
108 | .br | |
109 | .in +9 | |
56e9f0ab | 110 | .RI "[ " VFVLAN-LIST " ]" |
761a1e60 | 111 | .br |
ca611d64 PS |
112 | .RB "[ " rate |
113 | .IR TXRATE " ]" | |
114 | .br | |
115 | .RB "[ " max_tx_rate | |
116 | .IR TXRATE " ]" | |
117 | .br | |
118 | .RB "[ " min_tx_rate | |
119 | .IR TXRATE " ]" | |
761a1e60 | 120 | .br |
ca611d64 | 121 | .RB "[ " spoofchk " { " on " | " off " } ]" |
503aa4e2 | 122 | .br |
8e45e44b PS |
123 | .RB "[ " query_rss " { " on " | " off " } ]" |
124 | .br | |
ca611d64 | 125 | .RB "[ " state " { " auto " | " enable " | " disable " } ]" |
503aa4e2 | 126 | .br |
d91fb3f4 EC |
127 | .RB "[ " trust " { " on " | " off " } ]" |
128 | .br | |
129 | .RB "[ " node_guid " eui64 ]" | |
130 | .br | |
131 | .RB "[ " port_guid " eui64 ] ]" | |
ca611d64 PS |
132 | .br |
133 | .in -9 | |
1b5e8094 | 134 | .RB "[ { " xdp " | " xdpgeneric " | " xdpdrv " | " xdpoffload " } { " off " | " |
c7272ca7 DB |
135 | .br |
136 | .in +8 | |
137 | .BR object | |
138 | .IR FILE | |
139 | .RB "[ " section | |
140 | .IR NAME " ]" | |
141 | .RB "[ " verbose " ] |" | |
142 | .br | |
143 | .BR pinned | |
144 | .IR FILE " } ]" | |
145 | .br | |
146 | .in -8 | |
ca611d64 PS |
147 | .RB "[ " master |
148 | .IR DEVICE " ]" | |
149 | .br | |
150 | .RB "[ " nomaster " ]" | |
151 | .br | |
104444c2 DA |
152 | .RB "[ " vrf |
153 | .IR NAME " ]" | |
154 | .br | |
ca611d64 | 155 | .RB "[ " addrgenmode " { " eui64 " | " none " | " stable_secret " | " random " } ]" |
aa1b44ca | 156 | .br |
cd35c954 SH |
157 | .RB "[ " macaddr |
158 | .RI "[ " MACADDR " ]" | |
159 | .br | |
160 | .in +10 | |
161 | .RB "[ { " flush " | " add " | " del " } " | |
162 | .IR MACADDR " ]" | |
163 | .br | |
164 | .RB "[ " set | |
165 | .IR MACADDR " ] ]" | |
aa1b44ca | 166 | .br |
761a1e60 CT |
167 | |
168 | .ti -8 | |
169 | .B ip link show | |
170 | .RI "[ " DEVICE " | " | |
171 | .B group | |
ca611d64 PS |
172 | .IR GROUP " ] [" |
173 | .BR up " ] [" | |
1b944148 | 174 | .B master |
ca611d64 | 175 | .IR DEVICE " ] [" |
712249d8 | 176 | .B type |
ad0e3740 | 177 | .IR ETYPE " ] [" |
104444c2 DA |
178 | .B vrf |
179 | .IR NAME " ]" | |
761a1e60 | 180 | |
94f1a22a NA |
181 | .ti -8 |
182 | .B ip link xstats | |
183 | .BI type " TYPE" | |
184 | .RI "[ " ARGS " ]" | |
185 | ||
837552b4 RS |
186 | .ti -8 |
187 | .B ip link afstats | |
188 | .RB "[ " dev | |
189 | .IR DEVICE " ]" | |
190 | ||
1f299e92 | 191 | .ti -8 |
192 | .B ip link help | |
193 | .RI "[ " TYPE " ]" | |
194 | ||
657426c5 PS |
195 | .ti -8 |
196 | .IR TYPE " := [ " | |
197 | .BR bridge " | " | |
198 | .BR bond " | " | |
199 | .BR can " | " | |
200 | .BR dummy " | " | |
201 | .BR hsr " | " | |
202 | .BR ifb " | " | |
203 | .BR ipoib " |" | |
204 | .BR macvlan " | " | |
205 | .BR macvtap " | " | |
206 | .BR vcan " | " | |
1eccc573 | 207 | .BR vxcan " | " |
657426c5 PS |
208 | .BR veth " | " |
209 | .BR vlan " | " | |
210 | .BR vxlan " |" | |
211 | .BR ip6tnl " |" | |
212 | .BR ipip " |" | |
213 | .BR sit " |" | |
214 | .BR gre " |" | |
215 | .BR gretap " |" | |
9a1381d5 | 216 | .BR erspan " |" |
657426c5 PS |
217 | .BR ip6gre " |" |
218 | .BR ip6gretap " |" | |
8595cc40 | 219 | .BR ip6erspan " |" |
657426c5 PS |
220 | .BR vti " |" |
221 | .BR nlmon " |" | |
222 | .BR ipvlan " |" | |
88272775 | 223 | .BR ipvtap " |" |
657426c5 PS |
224 | .BR lowpan " |" |
225 | .BR geneve " |" | |
a6c5c952 | 226 | .BR bareudp " |" |
fd4df5b2 | 227 | .BR vrf " |" |
7d424c71 | 228 | .BR macsec " |" |
46c16a5d | 229 | .BR netdevsim " |" |
286446c1 ME |
230 | .BR rmnet " |" |
231 | .BR xfrm " ]" | |
657426c5 PS |
232 | |
233 | .ti -8 | |
234 | .IR ETYPE " := [ " TYPE " |" | |
235 | .BR bridge_slave " | " bond_slave " ]" | |
236 | ||
56e9f0ab MS |
237 | .ti -8 |
238 | .IR VFVLAN-LIST " := [ " VFVLAN-LIST " ] " VFVLAN | |
239 | ||
240 | .ti -8 | |
241 | .IR VFVLAN " := " | |
242 | .RB "[ " vlan | |
243 | .IR VLANID " [ " | |
244 | .B qos | |
245 | .IR VLAN-QOS " ] [" | |
246 | .B proto | |
247 | .IR VLAN-PROTO " ] ]" | |
3aa0e51b JP |
248 | .in -8 |
249 | ||
250 | .ti -8 | |
251 | .BI "ip link property add" | |
252 | .RB "[ " altname | |
253 | .IR NAME " .. ]" | |
254 | ||
255 | .ti -8 | |
256 | .BI "ip link property del" | |
257 | .RB "[ " altname | |
258 | .IR NAME " .. ]" | |
56e9f0ab | 259 | |
761a1e60 CT |
260 | .SH "DESCRIPTION" |
261 | .SS ip link add - add virtual link | |
262 | ||
263 | .TP | |
264 | .BI link " DEVICE " | |
265 | specifies the physical device to act operate on. | |
266 | ||
267 | .I NAME | |
268 | specifies the name of the new virtual device. | |
269 | ||
270 | .I TYPE | |
271 | specifies the type of the new device. | |
272 | .sp | |
273 | Link types: | |
274 | ||
275 | .in +8 | |
f1a6f4e9 SH |
276 | .B bridge |
277 | - Ethernet Bridge device | |
761a1e60 | 278 | .sp |
cc26a890 JP |
279 | .B bond |
280 | - Bonding device | |
103bc5f1 | 281 | .sp |
761a1e60 CT |
282 | .B dummy |
283 | - Dummy network interface | |
284 | .sp | |
2f937359 | 285 | .B hsr |
286 | - High-availability Seamless Redundancy device | |
287 | .sp | |
761a1e60 CT |
288 | .B ifb |
289 | - Intermediate Functional Block device | |
290 | .sp | |
f1a6f4e9 SH |
291 | .B ipoib |
292 | - IP over Infiniband device | |
293 | .sp | |
761a1e60 | 294 | .B macvlan |
f1a6f4e9 | 295 | - Virtual interface base on link layer address (MAC) |
761a1e60 | 296 | .sp |
e4c35682 RR |
297 | .B macvtap |
298 | - Virtual interface based on link layer address (MAC) and TAP. | |
299 | .sp | |
f1a6f4e9 | 300 | .B vcan |
2b70fe15 | 301 | - Virtual Controller Area Network interface |
761a1e60 | 302 | .sp |
1eccc573 OH |
303 | .B vxcan |
304 | - Virtual Controller Area Network tunnel interface | |
305 | .sp | |
f1a6f4e9 SH |
306 | .B veth |
307 | - Virtual ethernet interface | |
de038993 | 308 | .sp |
f1a6f4e9 SH |
309 | .BR vlan |
310 | - 802.1q tagged virtual LAN interface | |
311 | .sp | |
312 | .BR vxlan | |
313 | - Virtual eXtended LAN | |
77987911 ND |
314 | .sp |
315 | .BR ip6tnl | |
316 | - Virtual tunnel interface IPv4|IPv6 over IPv6 | |
317 | .sp | |
318 | .BR ipip | |
319 | - Virtual tunnel interface IPv4 over IPv4 | |
320 | .sp | |
321 | .BR sit | |
322 | - Virtual tunnel interface IPv6 over IPv4 | |
9abde37c | 323 | .sp |
324 | .BR gre | |
325 | - Virtual tunnel interface GRE over IPv4 | |
326 | .sp | |
327 | .BR gretap | |
d36d9d41 | 328 | - Virtual L2 tunnel interface GRE over IPv4 |
9abde37c | 329 | .sp |
9a1381d5 WT |
330 | .BR erspan |
331 | - Encapsulated Remote SPAN over GRE and IPv4 | |
332 | .sp | |
9abde37c | 333 | .BR ip6gre |
d36d9d41 | 334 | - Virtual tunnel interface GRE over IPv6 |
9abde37c | 335 | .sp |
336 | .BR ip6gretap | |
d36d9d41 | 337 | - Virtual L2 tunnel interface GRE over IPv6 |
b6d6b5a1 | 338 | .sp |
8595cc40 WT |
339 | .BR ip6erspan |
340 | - Encapsulated Remote SPAN over GRE and IPv6 | |
341 | .sp | |
b6d6b5a1 VK |
342 | .BR vti |
343 | - Virtual tunnel interface | |
344 | .sp | |
345 | .BR nlmon | |
346 | - Netlink monitoring device | |
347 | .sp | |
348 | .BR ipvlan | |
349 | - Interface for L3 (IPv6/IPv4) based VLANs | |
2c0feda8 | 350 | .sp |
88272775 HL |
351 | .BR ipvtap |
352 | - Interface for L3 (IPv6/IPv4) based VLANs and TAP | |
353 | .sp | |
2c0feda8 LB |
354 | .BR lowpan |
355 | - Interface for 6LoWPAN (IPv6) over IEEE 802.15.4 / Bluetooth | |
c1a1d8bc JL |
356 | .sp |
357 | .BR geneve | |
358 | - GEneric NEtwork Virtualization Encapsulation | |
b26fc590 | 359 | .sp |
a6c5c952 GN |
360 | .BR bareudp |
361 | - Bare UDP L3 encapsulation support | |
362 | .sp | |
b26fc590 SD |
363 | .BR macsec |
364 | - Interface for IEEE 802.1AE MAC Security (MACsec) | |
2a6f9cfa DA |
365 | .sp |
366 | .BR vrf | |
367 | - Interface for L3 VRF domains | |
7d424c71 JK |
368 | .sp |
369 | .BR netdevsim | |
370 | - Interface for netdev API tests | |
46c16a5d DP |
371 | .sp |
372 | .BR rmnet | |
373 | - Qualcomm rmnet device | |
286446c1 ME |
374 | .sp |
375 | .BR xfrm | |
376 | - Virtual xfrm interface | |
761a1e60 CT |
377 | .in -8 |
378 | ||
d992f3e6 JP |
379 | .TP |
380 | .BI numtxqueues " QUEUE_COUNT " | |
381 | specifies the number of transmit queues for new device. | |
382 | ||
383 | .TP | |
384 | .BI numrxqueues " QUEUE_COUNT " | |
385 | specifies the number of receive queues for new device. | |
386 | ||
c2db423f SH |
387 | .TP |
388 | .BI gso_max_size " BYTES " | |
f76ad635 SH |
389 | specifies the recommended maximum size of a Generic Segment Offload |
390 | packet the new device should accept. | |
c2db423f SH |
391 | |
392 | .TP | |
393 | .BI gso_max_segs " SEGMENTS " | |
f76ad635 SH |
394 | specifies the recommended maximum number of a Generic Segment Offload |
395 | segments the new device should accept. | |
c2db423f | 396 | |
4de8d885 PE |
397 | .TP |
398 | .BI index " IDX " | |
f76ad635 SH |
399 | specifies the desired index of the new virtual device. The link |
400 | creation fails, if the index is busy. | |
4de8d885 | 401 | |
503aa4e2 PŠ |
402 | .TP |
403 | VLAN Type Support | |
404 | For a link of type | |
405 | .I VLAN | |
406 | the following additional arguments are supported: | |
407 | ||
408 | .BI "ip link add | |
409 | .BI link " DEVICE " | |
410 | .BI name " NAME " | |
52a59869 | 411 | .B "type vlan" |
1ab0f02f | 412 | [ |
503aa4e2 | 413 | .BI protocol " VLAN_PROTO " |
1ab0f02f | 414 | ] |
503aa4e2 | 415 | .BI id " VLANID " |
1ab0f02f | 416 | [ |
503aa4e2 | 417 | .BR reorder_hdr " { " on " | " off " } " |
1ab0f02f TF |
418 | ] |
419 | [ | |
503aa4e2 | 420 | .BR gvrp " { " on " | " off " } " |
1ab0f02f TF |
421 | ] |
422 | [ | |
503aa4e2 | 423 | .BR mvrp " { " on " | " off " } " |
1ab0f02f TF |
424 | ] |
425 | [ | |
503aa4e2 | 426 | .BR loose_binding " { " on " | " off " } " |
1ab0f02f TF |
427 | ] |
428 | [ | |
3f2e457a MM |
429 | .BR bridge_binding " { " on " | " off " } " |
430 | ] | |
431 | [ | |
503aa4e2 | 432 | .BI ingress-qos-map " QOS-MAP " |
1ab0f02f TF |
433 | ] |
434 | [ | |
503aa4e2 | 435 | .BI egress-qos-map " QOS-MAP " |
1ab0f02f | 436 | ] |
503aa4e2 PŠ |
437 | |
438 | .in +8 | |
439 | .sp | |
440 | .BI protocol " VLAN_PROTO " | |
441 | - either 802.1Q or 802.1ad. | |
442 | ||
443 | .BI id " VLANID " | |
444 | - specifies the VLAN Identifer to use. Note that numbers with a leading " 0 " or " 0x " are interpreted as octal or hexadeimal, respectively. | |
445 | ||
446 | .BR reorder_hdr " { " on " | " off " } " | |
e612883c VK |
447 | - specifies whether ethernet headers are reordered or not (default is |
448 | .BR on ")." | |
449 | ||
450 | .in +4 | |
451 | If | |
452 | .BR reorder_hdr " is " on | |
f76ad635 SH |
453 | then VLAN header will be not inserted immediately but only before |
454 | passing to the physical device (if this device does not support VLAN | |
455 | offloading), the similar on the RX direction - by default the packet | |
456 | will be untagged before being received by VLAN device. Reordering | |
457 | allows to accelerate tagging on egress and to hide VLAN header on | |
458 | ingress so the packet looks like regular Ethernet packet, at the same | |
459 | time it might be confusing for packet capture as the VLAN header does | |
460 | not exist within the packet. | |
e612883c VK |
461 | |
462 | VLAN offloading can be checked by | |
463 | .BR ethtool "(8):" | |
464 | .in +4 | |
465 | .sp | |
466 | .B ethtool -k | |
467 | <phy_dev> | | |
468 | .RB grep " tx-vlan-offload" | |
469 | .sp | |
470 | .in -4 | |
471 | where <phy_dev> is the physical device to which VLAN device is bound. | |
472 | .in -4 | |
503aa4e2 PŠ |
473 | |
474 | .BR gvrp " { " on " | " off " } " | |
f76ad635 SH |
475 | - specifies whether this VLAN should be registered using GARP VLAN |
476 | Registration Protocol. | |
503aa4e2 PŠ |
477 | |
478 | .BR mvrp " { " on " | " off " } " | |
f76ad635 SH |
479 | - specifies whether this VLAN should be registered using Multiple VLAN |
480 | Registration Protocol. | |
503aa4e2 PŠ |
481 | |
482 | .BR loose_binding " { " on " | " off " } " | |
483 | - specifies whether the VLAN device state is bound to the physical device state. | |
484 | ||
3f2e457a MM |
485 | .BR bridge_binding " { " on " | " off " } " |
486 | - specifies whether the VLAN device link state tracks the state of bridge ports | |
487 | that are members of the VLAN. | |
488 | ||
503aa4e2 | 489 | .BI ingress-qos-map " QOS-MAP " |
ab872442 VK |
490 | - defines a mapping of VLAN header prio field to the Linux internal packet |
491 | priority on incoming frames. The format is FROM:TO with multiple mappings | |
492 | separated by spaces. | |
503aa4e2 PŠ |
493 | |
494 | .BI egress-qos-map " QOS-MAP " | |
ab872442 VK |
495 | - defines a mapping of Linux internal packet priority to VLAN header prio field |
496 | but for outgoing frames. The format is the same as for ingress-qos-map. | |
497 | .in +4 | |
498 | ||
499 | Linux packet priority can be set by | |
500 | .BR iptables "(8)": | |
501 | .in +4 | |
502 | .sp | |
503 | .B iptables | |
504 | -t mangle -A POSTROUTING [...] -j CLASSIFY --set-class 0:4 | |
505 | .sp | |
506 | .in -4 | |
f76ad635 SH |
507 | and this "4" priority can be used in the egress qos mapping to set |
508 | VLAN prio "5": | |
ab872442 VK |
509 | .sp |
510 | .in +4 | |
511 | .B ip | |
512 | link set veth0.10 type vlan egress 4:5 | |
513 | .in -4 | |
514 | .in -4 | |
503aa4e2 PŠ |
515 | .in -8 |
516 | ||
2816a568 TR |
517 | .TP |
518 | VXLAN Type Support | |
63f60e3a | 519 | For a link of type |
2816a568 TR |
520 | .I VXLAN |
521 | the following additional arguments are supported: | |
522 | ||
523 | .BI "ip link add " DEVICE | |
52a59869 | 524 | .BI type " vxlan " id " VNI" |
1ab0f02f | 525 | [ |
2816a568 | 526 | .BI dev " PHYS_DEV " |
7cfa3802 AW |
527 | .RB " ] [ { " group " | " remote " } " |
528 | .I IPADDR | |
1ab0f02f | 529 | ] [ |
5cd64c97 TF |
530 | .B local |
531 | .RI "{ "IPADDR " | "any " } " | |
1ab0f02f | 532 | ] [ |
2816a568 | 533 | .BI ttl " TTL " |
1ab0f02f | 534 | ] [ |
2816a568 | 535 | .BI tos " TOS " |
1ab0f02f | 536 | ] [ |
3d98eba4 SB |
537 | .BI df " DF " |
538 | ] [ | |
f8eb79a6 DB |
539 | .BI flowlabel " FLOWLABEL " |
540 | ] [ | |
503aa4e2 | 541 | .BI dstport " PORT " |
1ab0f02f | 542 | ] [ |
503aa4e2 | 543 | .BI srcport " MIN MAX " |
1ab0f02f | 544 | ] [ |
52a59869 | 545 | .RB [ no ] learning |
1ab0f02f | 546 | ] [ |
52a59869 | 547 | .RB [ no ] proxy |
1ab0f02f | 548 | ] [ |
52a59869 | 549 | .RB [ no ] rsc |
1ab0f02f | 550 | ] [ |
52a59869 | 551 | .RB [ no ] l2miss |
1ab0f02f | 552 | ] [ |
52a59869 | 553 | .RB [ no ] l3miss |
1ab0f02f | 554 | ] [ |
52a59869 | 555 | .RB [ no ] udpcsum |
1ab0f02f | 556 | ] [ |
52a59869 | 557 | .RB [ no ] udp6zerocsumtx |
1ab0f02f | 558 | ] [ |
52a59869 | 559 | .RB [ no ] udp6zerocsumrx |
1ab0f02f | 560 | ] [ |
c2fbc57e | 561 | .BI ageing " SECONDS " |
1ab0f02f | 562 | ] [ |
c2fbc57e | 563 | .BI maxaddress " NUMBER " |
1ab0f02f | 564 | ] [ |
52a59869 | 565 | .RB [ no ] external |
42d17a61 | 566 | ] [ |
2eb90dc7 | 567 | .B gbp |
346410bd JB |
568 | ] [ |
569 | .B gpe | |
1ab0f02f | 570 | ] |
2816a568 TR |
571 | |
572 | .in +8 | |
573 | .sp | |
574 | .BI id " VNI " | |
575 | - specifies the VXLAN Network Identifer (or VXLAN Segment | |
576 | Identifier) to use. | |
577 | ||
578 | .BI dev " PHYS_DEV" | |
579 | - specifies the physical device to use for tunnel endpoint communication. | |
580 | ||
581 | .sp | |
582 | .BI group " IPADDR" | |
583 | - specifies the multicast IP address to join. | |
7cfa3802 AW |
584 | This parameter cannot be specified with the |
585 | .B remote | |
586 | parameter. | |
587 | ||
588 | .sp | |
589 | .BI remote " IPADDR" | |
590 | - specifies the unicast destination IP address to use in outgoing packets | |
591 | when the destination link layer address is not known in the VXLAN device | |
a89d5329 | 592 | forwarding database. This parameter cannot be specified with the |
7cfa3802 AW |
593 | .B group |
594 | parameter. | |
2816a568 TR |
595 | |
596 | .sp | |
597 | .BI local " IPADDR" | |
598 | - specifies the source IP address to use in outgoing packets. | |
599 | ||
600 | .sp | |
601 | .BI ttl " TTL" | |
602 | - specifies the TTL value to use in outgoing packets. | |
603 | ||
604 | .sp | |
605 | .BI tos " TOS" | |
606 | - specifies the TOS value to use in outgoing packets. | |
607 | ||
3d98eba4 SB |
608 | .sp |
609 | .BI df " DF" | |
610 | - specifies the usage of the Don't Fragment flag (DF) bit in outgoing packets | |
611 | with IPv4 headers. The value | |
612 | .B inherit | |
613 | causes the bit to be copied from the original IP header. The values | |
614 | .B unset | |
615 | and | |
616 | .B set | |
617 | cause the bit to be always unset or always set, respectively. By default, the | |
618 | bit is not set. | |
619 | ||
f8eb79a6 DB |
620 | .sp |
621 | .BI flowlabel " FLOWLABEL" | |
622 | - specifies the flow label to use in outgoing packets. | |
623 | ||
2816a568 | 624 | .sp |
503aa4e2 | 625 | .BI dstport " PORT" |
f76ad635 SH |
626 | - specifies the UDP destination port to communicate to the remote |
627 | VXLAN tunnel endpoint. | |
503aa4e2 PŠ |
628 | |
629 | .sp | |
630 | .BI srcport " MIN MAX" | |
2816a568 TR |
631 | - specifies the range of port numbers to use as UDP |
632 | source ports to communicate to the remote VXLAN tunnel endpoint. | |
633 | ||
634 | .sp | |
52a59869 | 635 | .RB [ no ] learning |
2816a568 TR |
636 | - specifies if unknown source link layer addresses and IP addresses |
637 | are entered into the VXLAN device forwarding database. | |
638 | ||
639 | .sp | |
52a59869 | 640 | .RB [ no ] rsc |
2816a568 TR |
641 | - specifies if route short circuit is turned on. |
642 | ||
643 | .sp | |
52a59869 | 644 | .RB [ no ] proxy |
2816a568 TR |
645 | - specifies ARP proxy is turned on. |
646 | ||
647 | .sp | |
52a59869 | 648 | .RB [ no ] l2miss |
2816a568 TR |
649 | - specifies if netlink LLADDR miss notifications are generated. |
650 | ||
651 | .sp | |
52a59869 | 652 | .RB [ no ] l3miss |
2816a568 TR |
653 | - specifies if netlink IP ADDR miss notifications are generated. |
654 | ||
503aa4e2 | 655 | .sp |
52a59869 | 656 | .RB [ no ] udpcsum |
4853ee52 | 657 | - specifies if UDP checksum is calculated for transmitted packets over IPv4. |
503aa4e2 PŠ |
658 | |
659 | .sp | |
52a59869 | 660 | .RB [ no ] udp6zerocsumtx |
4853ee52 | 661 | - skip UDP checksum calculation for transmitted packets over IPv6. |
503aa4e2 PŠ |
662 | |
663 | .sp | |
52a59869 | 664 | .RB [ no ] udp6zerocsumrx |
4853ee52 | 665 | - allow incoming UDP packets over IPv6 with zero checksum field. |
503aa4e2 | 666 | |
c2fbc57e ND |
667 | .sp |
668 | .BI ageing " SECONDS" | |
669 | - specifies the lifetime in seconds of FDB entries learnt by the kernel. | |
670 | ||
671 | .sp | |
672 | .BI maxaddress " NUMBER" | |
673 | - specifies the maximum number of FDB entries. | |
674 | ||
42d17a61 | 675 | .sp |
52a59869 | 676 | .RB [ no ] external |
42d17a61 JB |
677 | - specifies whether an external control plane |
678 | .RB "(e.g. " "ip route encap" ) | |
679 | or the internal FDB should be used. | |
680 | ||
2eb90dc7 TG |
681 | .sp |
682 | .B gbp | |
683 | - enables the Group Policy extension (VXLAN-GBP). | |
684 | ||
685 | .in +4 | |
686 | Allows to transport group policy context across VXLAN network peers. | |
687 | If enabled, includes the mark of a packet in the VXLAN header for outgoing | |
688 | packets and fills the packet mark based on the information found in the | |
9d715cf6 | 689 | VXLAN header for incoming packets. |
2eb90dc7 TG |
690 | |
691 | Format of upper 16 bits of packet mark (flags); | |
692 | ||
693 | .in +2 | |
694 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
695 | .br | |
696 | |-|-|-|-|-|-|-|-|-|D|-|-|A|-|-|-| | |
697 | .br | |
698 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
699 | ||
700 | .B D := | |
701 | Don't Learn bit. When set, this bit indicates that the egress | |
702 | VTEP MUST NOT learn the source address of the encapsulated frame. | |
703 | ||
704 | .B A := | |
705 | Indicates that the group policy has already been applied to | |
706 | this packet. Policies MUST NOT be applied by devices when the A bit is set. | |
707 | .in -2 | |
708 | ||
709 | Format of lower 16 bits of packet mark (policy ID): | |
710 | ||
711 | .in +2 | |
712 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
713 | .br | |
714 | | Group Policy ID | | |
715 | .br | |
716 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
717 | .in -2 | |
718 | ||
719 | Example: | |
720 | iptables -A OUTPUT [...] -j MARK --set-mark 0x800FF | |
721 | ||
722 | .in -4 | |
723 | ||
346410bd JB |
724 | .sp |
725 | .B gpe | |
726 | - enables the Generic Protocol extension (VXLAN-GPE). Currently, this is | |
727 | only supported together with the | |
728 | .B external | |
729 | keyword. | |
730 | ||
2816a568 TR |
731 | .in -8 |
732 | ||
1eccc573 OH |
733 | .TP |
734 | VETH, VXCAN Type Support | |
735 | For a link of types | |
736 | .I VETH/VXCAN | |
737 | the following additional arguments are supported: | |
738 | ||
739 | .BI "ip link add " DEVICE | |
740 | .BR type " { " veth " | " vxcan " }" | |
741 | [ | |
742 | .BR peer | |
743 | .BI "name " NAME | |
744 | ] | |
745 | ||
746 | .in +8 | |
747 | .sp | |
748 | .BR peer | |
749 | .BI "name " NAME | |
750 | - specifies the virtual pair device name of the | |
751 | .I VETH/VXCAN | |
752 | tunnel. | |
753 | ||
754 | .in -8 | |
755 | ||
90f1df71 | 756 | .TP |
d21c028c SD |
757 | IPIP, SIT Type Support |
758 | For a link of type | |
759 | .IR IPIP or SIT | |
90f1df71 TH |
760 | the following additional arguments are supported: |
761 | ||
762 | .BI "ip link add " DEVICE | |
d21c028c | 763 | .BR type " { " ipip " | " sit " }" |
90f1df71 | 764 | .BI " remote " ADDR " local " ADDR |
1ab0f02f | 765 | [ |
52a59869 | 766 | .BR encap " { " fou " | " gue " | " none " }" |
1ab0f02f | 767 | ] [ |
52a59869 | 768 | .BR encap-sport " { " \fIPORT " | " auto " }" |
1ab0f02f | 769 | ] [ |
90f1df71 | 770 | .BI "encap-dport " PORT |
1ab0f02f | 771 | ] [ |
52a59869 | 772 | .RB [ no ] encap-csum |
1ab0f02f | 773 | ] [ |
7baca946 KJ |
774 | .I " [no]encap-remcsum " |
775 | ] [ | |
f005b700 | 776 | .I " mode " { ip6ip | ipip | mplsip | any } " |
9a1381d5 | 777 | ] [ |
b760a882 | 778 | .BR external |
1ab0f02f | 779 | ] |
90f1df71 TH |
780 | |
781 | .in +8 | |
782 | .sp | |
783 | .BI remote " ADDR " | |
784 | - specifies the remote address of the tunnel. | |
785 | ||
786 | .sp | |
787 | .BI local " ADDR " | |
788 | - specifies the fixed local address for tunneled packets. | |
789 | It must be an address on another interface on this host. | |
790 | ||
791 | .sp | |
52a59869 | 792 | .BR encap " { " fou " | " gue " | " none " }" |
90f1df71 TH |
793 | - specifies type of secondary UDP encapsulation. "fou" indicates |
794 | Foo-Over-UDP, "gue" indicates Generic UDP Encapsulation. | |
795 | ||
796 | .sp | |
52a59869 | 797 | .BR encap-sport " { " \fIPORT " | " auto " }" |
90f1df71 TH |
798 | - specifies the source port in UDP encapsulation. |
799 | .IR PORT | |
800 | indicates the port by number, "auto" | |
801 | indicates that the port number should be chosen automatically | |
802 | (the kernel picks a flow based on the flow hash of the | |
803 | encapsulated packet). | |
804 | ||
805 | .sp | |
52a59869 | 806 | .RB [ no ] encap-csum |
90f1df71 TH |
807 | - specifies if UDP checksums are enabled in the secondary |
808 | encapsulation. | |
809 | ||
810 | .sp | |
52a59869 | 811 | .RB [ no ] encap-remcsum |
90f1df71 TH |
812 | - specifies if Remote Checksum Offload is enabled. This is only |
813 | applicable for Generic UDP Encapsulation. | |
814 | ||
7baca946 | 815 | .sp |
f005b700 | 816 | .BI mode " { ip6ip | ipip | mplsip | any } " |
7baca946 | 817 | - specifies mode in which device should run. "ip6ip" indicates |
f005b700 | 818 | IPv6-Over-IPv4, "ipip" indicates "IPv4-Over-IPv4", "mplsip" indicates |
288c28bc KJ |
819 | MPLS-Over-IPv4, "any" indicates IPv6, IPv4 or MPLS Over IPv4. Supported for |
820 | SIT where the default is "ip6ip" and IPIP where the default is "ipip". | |
821 | IPv6-Over-IPv4 is not supported for IPIP. | |
7baca946 | 822 | |
b760a882 SP |
823 | .sp |
824 | .BR external | |
825 | - make this tunnel externally controlled | |
826 | .RB "(e.g. " "ip route encap" ). | |
827 | ||
d21c028c SD |
828 | .in -8 |
829 | .TP | |
830 | GRE Type Support | |
831 | For a link of type | |
832 | .IR GRE " or " GRETAP | |
833 | the following additional arguments are supported: | |
834 | ||
835 | .BI "ip link add " DEVICE | |
836 | .BR type " { " gre " | " gretap " }" | |
837 | .BI " remote " ADDR " local " ADDR | |
838 | [ | |
7f520601 | 839 | .RB [ no ] "" [ i | o ] seq |
d21c028c SD |
840 | ] [ |
841 | .RB [ i | o ] key | |
842 | .I KEY | |
7f520601 SD |
843 | | |
844 | .BR no [ i | o ] key | |
d21c028c | 845 | ] [ |
7f520601 | 846 | .RB [ no ] "" [ i | o ] csum |
d21c028c SD |
847 | ] [ |
848 | .BI ttl " TTL " | |
849 | ] [ | |
850 | .BI tos " TOS " | |
851 | ] [ | |
852 | .RB [ no ] pmtudisc | |
853 | ] [ | |
854 | .RB [ no ] ignore-df | |
855 | ] [ | |
856 | .BI dev " PHYS_DEV " | |
857 | ] [ | |
858 | .BR encap " { " fou " | " gue " | " none " }" | |
859 | ] [ | |
860 | .BR encap-sport " { " \fIPORT " | " auto " }" | |
861 | ] [ | |
862 | .BI "encap-dport " PORT | |
863 | ] [ | |
864 | .RB [ no ] encap-csum | |
865 | ] [ | |
866 | .RB [ no ] encap-remcsum | |
867 | ] [ | |
868 | .BR external | |
869 | ] | |
870 | ||
871 | .in +8 | |
872 | .sp | |
873 | .BI remote " ADDR " | |
874 | - specifies the remote address of the tunnel. | |
875 | ||
876 | .sp | |
877 | .BI local " ADDR " | |
878 | - specifies the fixed local address for tunneled packets. | |
879 | It must be an address on another interface on this host. | |
880 | ||
881 | .sp | |
7f520601 | 882 | .RB [ no ] "" [ i | o ] seq |
d21c028c SD |
883 | - serialize packets. |
884 | The | |
885 | .B oseq | |
886 | flag enables sequencing of outgoing packets. | |
887 | The | |
888 | .B iseq | |
889 | flag requires that all input packets are serialized. | |
890 | ||
891 | .sp | |
892 | .RB [ i | o ] key | |
893 | .I KEY | |
7f520601 SD |
894 | | |
895 | .BR no [ i | o ] key | |
d21c028c SD |
896 | - use keyed GRE with key |
897 | .IR KEY ". "KEY | |
898 | is either a number or an IPv4 address-like dotted quad. | |
899 | The | |
900 | .B key | |
901 | parameter specifies the same key to use in both directions. | |
902 | The | |
903 | .BR ikey " and " okey | |
904 | parameters specify different keys for input and output. | |
905 | ||
906 | .sp | |
7f520601 | 907 | .RB [ no ] "" [ i | o ] csum |
d21c028c SD |
908 | - generate/require checksums for tunneled packets. |
909 | The | |
910 | .B ocsum | |
911 | flag calculates checksums for outgoing packets. | |
912 | The | |
913 | .B icsum | |
914 | flag requires that all input packets have the correct | |
915 | checksum. The | |
916 | .B csum | |
917 | flag is equivalent to the combination | |
918 | .B "icsum ocsum" . | |
919 | ||
920 | .sp | |
921 | .BI ttl " TTL" | |
922 | - specifies the TTL value to use in outgoing packets. | |
923 | ||
924 | .sp | |
925 | .BI tos " TOS" | |
926 | - specifies the TOS value to use in outgoing packets. | |
927 | ||
928 | .sp | |
929 | .RB [ no ] pmtudisc | |
930 | - enables/disables Path MTU Discovery on this tunnel. | |
931 | It is enabled by default. Note that a fixed ttl is incompatible | |
932 | with this option: tunneling with a fixed ttl always makes pmtu | |
933 | discovery. | |
934 | ||
935 | .sp | |
936 | .RB [ no ] ignore-df | |
937 | - enables/disables IPv4 DF suppression on this tunnel. | |
938 | Normally datagrams that exceed the MTU will be fragmented; the presence | |
939 | of the DF flag inhibits this, resulting instead in an ICMP Unreachable | |
9d715cf6 | 940 | (Fragmentation Required) message. Enabling this attribute causes the |
d21c028c SD |
941 | DF flag to be ignored. |
942 | ||
943 | .sp | |
944 | .BI dev " PHYS_DEV" | |
945 | - specifies the physical device to use for tunnel endpoint communication. | |
946 | ||
947 | .sp | |
948 | .BR encap " { " fou " | " gue " | " none " }" | |
949 | - specifies type of secondary UDP encapsulation. "fou" indicates | |
950 | Foo-Over-UDP, "gue" indicates Generic UDP Encapsulation. | |
951 | ||
952 | .sp | |
953 | .BR encap-sport " { " \fIPORT " | " auto " }" | |
954 | - specifies the source port in UDP encapsulation. | |
955 | .IR PORT | |
956 | indicates the port by number, "auto" | |
957 | indicates that the port number should be chosen automatically | |
958 | (the kernel picks a flow based on the flow hash of the | |
959 | encapsulated packet). | |
960 | ||
961 | .sp | |
962 | .RB [ no ] encap-csum | |
963 | - specifies if UDP checksums are enabled in the secondary | |
964 | encapsulation. | |
965 | ||
966 | .sp | |
967 | .RB [ no ] encap-remcsum | |
968 | - specifies if Remote Checksum Offload is enabled. This is only | |
969 | applicable for Generic UDP Encapsulation. | |
970 | ||
971 | .sp | |
972 | .BR external | |
973 | - make this tunnel externally controlled | |
974 | .RB "(e.g. " "ip route encap" ). | |
975 | ||
90f1df71 TH |
976 | .in -8 |
977 | ||
9abde37c | 978 | .TP |
979 | IP6GRE/IP6GRETAP Type Support | |
63f60e3a | 980 | For a link of type |
9abde37c | 981 | .I IP6GRE/IP6GRETAP |
982 | the following additional arguments are supported: | |
983 | ||
984 | .BI "ip link add " DEVICE | |
52a59869 PS |
985 | .BR type " { " ip6gre " | " ip6gretap " }" |
986 | .BI remote " ADDR " local " ADDR" | |
1ab0f02f | 987 | [ |
7f520601 | 988 | .RB [ no ] "" [ i | o ] seq |
1ab0f02f | 989 | ] [ |
52a59869 PS |
990 | .RB [ i | o ] key |
991 | .I KEY | |
7f520601 SD |
992 | | |
993 | .BR no [ i | o ] key | |
1ab0f02f | 994 | ] [ |
7f520601 | 995 | .RB [ no ] "" [ i | o ] csum |
1ab0f02f | 996 | ] [ |
9abde37c | 997 | .BI hoplimit " TTL " |
1ab0f02f | 998 | ] [ |
9abde37c | 999 | .BI encaplimit " ELIM " |
1ab0f02f | 1000 | ] [ |
9abde37c | 1001 | .BI tclass " TCLASS " |
1ab0f02f | 1002 | ] [ |
9abde37c | 1003 | .BI flowlabel " FLOWLABEL " |
1ab0f02f | 1004 | ] [ |
9abde37c | 1005 | .BI "dscp inherit" |
1ab0f02f | 1006 | ] [ |
f798a8ab PM |
1007 | .BI "[no]allow-localremote" |
1008 | ] [ | |
9abde37c | 1009 | .BI dev " PHYS_DEV " |
6231c5be WT |
1010 | ] [ |
1011 | .RB external | |
1ab0f02f | 1012 | ] |
9abde37c | 1013 | |
1014 | .in +8 | |
1015 | .sp | |
1016 | .BI remote " ADDR " | |
1017 | - specifies the remote IPv6 address of the tunnel. | |
1018 | ||
1019 | .sp | |
1020 | .BI local " ADDR " | |
1021 | - specifies the fixed local IPv6 address for tunneled packets. | |
90f1df71 | 1022 | It must be an address on another interface on this host. |
9abde37c | 1023 | |
1024 | .sp | |
7f520601 | 1025 | .RB [ no ] "" [ i | o ] seq |
9abde37c | 1026 | - serialize packets. |
1027 | The | |
1028 | .B oseq | |
1029 | flag enables sequencing of outgoing packets. | |
1030 | The | |
1031 | .B iseq | |
1032 | flag requires that all input packets are serialized. | |
1033 | ||
1034 | .sp | |
7f520601 SD |
1035 | .RB [ i | o ] key |
1036 | .I KEY | |
1037 | | | |
1038 | .BR no [ i | o ] key | |
9abde37c | 1039 | - use keyed GRE with key |
1040 | .IR KEY ". "KEY | |
1041 | is either a number or an IPv4 address-like dotted quad. | |
1042 | The | |
1043 | .B key | |
1044 | parameter specifies the same key to use in both directions. | |
1045 | The | |
1046 | .BR ikey " and " okey | |
1047 | parameters specify different keys for input and output. | |
1048 | ||
1049 | .sp | |
7f520601 | 1050 | .RB [ no ] "" [ i | o ] csum |
9abde37c | 1051 | - generate/require checksums for tunneled packets. |
1052 | The | |
1053 | .B ocsum | |
1054 | flag calculates checksums for outgoing packets. | |
1055 | The | |
1056 | .B icsum | |
1057 | flag requires that all input packets have the correct | |
a89d5329 | 1058 | checksum. The |
9abde37c | 1059 | .B csum |
1060 | flag is equivalent to the combination | |
1061 | .BR "icsum ocsum" . | |
1062 | ||
1063 | .sp | |
1064 | .BI hoplimit " TTL" | |
1065 | - specifies Hop Limit value to use in outgoing packets. | |
1066 | ||
1067 | .sp | |
1068 | .BI encaplimit " ELIM" | |
a89d5329 | 1069 | - specifies a fixed encapsulation limit. Default is 4. |
9abde37c | 1070 | |
1071 | .sp | |
1072 | .BI flowlabel " FLOWLABEL" | |
63f60e3a | 1073 | - specifies a fixed flowlabel. |
9abde37c | 1074 | |
f798a8ab PM |
1075 | .sp |
1076 | .BI [no]allow-localremote | |
1077 | - specifies whether to allow remote endpoint to have an address configured on | |
1078 | local host. | |
1079 | ||
9abde37c | 1080 | .sp |
1081 | .BI tclass " TCLASS" | |
1082 | - specifies the traffic class field on | |
1083 | tunneled packets, which can be specified as either a two-digit | |
1084 | hex value (e.g. c0) or a predefined string (e.g. internet). | |
1085 | The value | |
1086 | .B inherit | |
1087 | causes the field to be copied from the original IP header. The | |
1088 | values | |
1089 | .BI "inherit/" STRING | |
1090 | or | |
1091 | .BI "inherit/" 00 ".." ff | |
1092 | will set the field to | |
1093 | .I STRING | |
1094 | or | |
1095 | .IR 00 ".." ff | |
1096 | when tunneling non-IP packets. The default value is 00. | |
1097 | ||
6231c5be WT |
1098 | .sp |
1099 | .RB external | |
1100 | - make this tunnel externally controlled (or not, which is the default). | |
1101 | In the kernel, this is referred to as collect metadata mode. This flag is | |
1102 | mutually exclusive with the | |
1103 | .BR remote , | |
1104 | .BR local , | |
1105 | .BR seq , | |
1106 | .BR key, | |
1107 | .BR csum, | |
1108 | .BR hoplimit, | |
1109 | .BR encaplimit, | |
1110 | .BR flowlabel " and " tclass | |
1111 | options. | |
1112 | ||
9abde37c | 1113 | .in -8 |
1114 | ||
8ca8fac7 OG |
1115 | .TP |
1116 | IPoIB Type Support | |
1117 | For a link of type | |
1118 | .I IPoIB | |
1119 | the following additional arguments are supported: | |
1120 | ||
1121 | .BI "ip link add " DEVICE " name " NAME | |
52a59869 | 1122 | .BR "type ipoib " [ " pkey \fIPKEY" " ] [ " mode " \fIMODE \fR]" |
8ca8fac7 OG |
1123 | |
1124 | .in +8 | |
1125 | .sp | |
1126 | .BI pkey " PKEY " | |
1127 | - specifies the IB P-Key to use. | |
1128 | ||
1129 | .BI mode " MODE " | |
1130 | - specifies the mode (datagram or connected) to use. | |
1131 | ||
28976362 WT |
1132 | .TP |
1133 | ERSPAN Type Support | |
1134 | For a link of type | |
1135 | .I ERSPAN/IP6ERSPAN | |
1136 | the following additional arguments are supported: | |
1137 | ||
1138 | .BI "ip link add " DEVICE | |
1139 | .BR type " { " erspan " | " ip6erspan " }" | |
1140 | .BI remote " ADDR " local " ADDR " seq | |
1141 | .RB key | |
1142 | .I KEY | |
1143 | .BR erspan_ver " \fIversion " | |
1144 | [ | |
1145 | .BR erspan " \fIIDX " | |
1146 | ] [ | |
1147 | .BR erspan_dir " { " \fIingress " | " \fIegress " }" | |
1148 | ] [ | |
1149 | .BR erspan_hwid " \fIhwid " | |
1150 | ] [ | |
f798a8ab PM |
1151 | .BI "[no]allow-localremote" |
1152 | ] [ | |
28976362 WT |
1153 | .RB external |
1154 | ] | |
1155 | ||
1156 | .in +8 | |
1157 | .sp | |
1158 | .BI remote " ADDR " | |
1159 | - specifies the remote address of the tunnel. | |
1160 | ||
1161 | .sp | |
1162 | .BI local " ADDR " | |
1163 | - specifies the fixed local address for tunneled packets. | |
1164 | It must be an address on another interface on this host. | |
1165 | ||
1166 | .sp | |
1167 | .BR erspan_ver " \fIversion " | |
1168 | - specifies the ERSPAN version number. | |
1169 | .IR version | |
846b6b2d WT |
1170 | indicates the ERSPAN version to be created: 0 for version 0 type I, |
1171 | 1 for version 1 (type II) or 2 for version 2 (type III). | |
28976362 WT |
1172 | |
1173 | .sp | |
1174 | .BR erspan " \fIIDX " | |
1175 | - specifies the ERSPAN v1 index field. | |
1176 | .IR IDX | |
1177 | indicates a 20 bit index/port number associated with the ERSPAN | |
1178 | traffic's source port and direction. | |
1179 | ||
1180 | .sp | |
1181 | .BR erspan_dir " { " \fIingress " | " \fIegress " }" | |
1182 | - specifies the ERSPAN v2 mirrored traffic's direction. | |
1183 | ||
1184 | .sp | |
1185 | .BR erspan_hwid " \fIhwid " | |
1186 | - an unique identifier of an ERSPAN v2 engine within a system. | |
1187 | .IR hwid | |
1188 | is a 6-bit value for users to configure. | |
1189 | ||
f798a8ab PM |
1190 | .sp |
1191 | .BI [no]allow-localremote | |
1192 | - specifies whether to allow remote endpoint to have an address configured on | |
1193 | local host. | |
1194 | ||
28976362 WT |
1195 | .sp |
1196 | .BR external | |
1197 | - make this tunnel externally controlled (or not, which is the default). | |
1198 | In the kernel, this is referred to as collect metadata mode. This flag is | |
1199 | mutually exclusive with the | |
1200 | .BR remote , | |
1201 | .BR local , | |
1202 | .BR erspan_ver , | |
1203 | .BR erspan , | |
1204 | .BR erspan_dir " and " erspan_hwid | |
1205 | options. | |
1206 | ||
1207 | .in -8 | |
1208 | ||
c1a1d8bc JL |
1209 | .TP |
1210 | GENEVE Type Support | |
1211 | For a link of type | |
1212 | .I GENEVE | |
1213 | the following additional arguments are supported: | |
1214 | ||
1215 | .BI "ip link add " DEVICE | |
52a59869 | 1216 | .BI type " geneve " id " VNI " remote " IPADDR" |
1ab0f02f | 1217 | [ |
f4c05c2e | 1218 | .BI ttl " TTL " |
1ab0f02f | 1219 | ] [ |
f4739b2e | 1220 | .BI tos " TOS " |
29bb2373 | 1221 | ] [ |
64dbd03e SB |
1222 | .BI df " DF " |
1223 | ] [ | |
29bb2373 | 1224 | .BI flowlabel " FLOWLABEL " |
7e33b093 PS |
1225 | ] [ |
1226 | .BI dstport " PORT" | |
1227 | ] [ | |
1228 | .RB [ no ] external | |
1229 | ] [ | |
1230 | .RB [ no ] udpcsum | |
1231 | ] [ | |
1232 | .RB [ no ] udp6zerocsumtx | |
1233 | ] [ | |
1234 | .RB [ no ] udp6zerocsumrx | |
1ab0f02f | 1235 | ] |
c1a1d8bc JL |
1236 | |
1237 | .in +8 | |
1238 | .sp | |
1239 | .BI id " VNI " | |
1240 | - specifies the Virtual Network Identifer to use. | |
1241 | ||
1242 | .sp | |
1243 | .BI remote " IPADDR" | |
1244 | - specifies the unicast destination IP address to use in outgoing packets. | |
1245 | ||
f4c05c2e JL |
1246 | .sp |
1247 | .BI ttl " TTL" | |
35b857f9 HL |
1248 | - specifies the TTL value to use in outgoing packets. "0" or "auto" means |
1249 | use whatever default value, "inherit" means inherit the inner protocol's | |
1250 | ttl. Default option is "0". | |
f4c05c2e | 1251 | |
f4739b2e JL |
1252 | .sp |
1253 | .BI tos " TOS" | |
1254 | - specifies the TOS value to use in outgoing packets. | |
1255 | ||
64dbd03e SB |
1256 | .sp |
1257 | .BI df " DF" | |
1258 | - specifies the usage of the Don't Fragment flag (DF) bit in outgoing packets | |
1259 | with IPv4 headers. The value | |
1260 | .B inherit | |
1261 | causes the bit to be copied from the original IP header. The values | |
1262 | .B unset | |
1263 | and | |
1264 | .B set | |
1265 | cause the bit to be always unset or always set, respectively. By default, the | |
1266 | bit is not set. | |
1267 | ||
29bb2373 DB |
1268 | .sp |
1269 | .BI flowlabel " FLOWLABEL" | |
1270 | - specifies the flow label to use in outgoing packets. | |
1271 | ||
7e33b093 PS |
1272 | .sp |
1273 | .BI dstport " PORT" | |
1274 | - select a destination port other than the default of 6081. | |
1275 | ||
1276 | .sp | |
1277 | .RB [ no ] external | |
1278 | - make this tunnel externally controlled (or not, which is the default). This | |
1279 | flag is mutually exclusive with the | |
1280 | .BR id , | |
1281 | .BR remote , | |
1282 | .BR ttl , | |
1283 | .BR tos " and " flowlabel | |
1284 | options. | |
1285 | ||
1286 | .sp | |
1287 | .RB [ no ] udpcsum | |
1288 | - specifies if UDP checksum is calculated for transmitted packets over IPv4. | |
1289 | ||
1290 | .sp | |
1291 | .RB [ no ] udp6zerocsumtx | |
1292 | - skip UDP checksum calculation for transmitted packets over IPv6. | |
1293 | ||
1294 | .sp | |
1295 | .RB [ no ] udp6zerocsumrx | |
1296 | - allow incoming UDP packets over IPv6 with zero checksum field. | |
1297 | ||
c1a1d8bc JL |
1298 | .in -8 |
1299 | ||
a6c5c952 GN |
1300 | .TP |
1301 | Bareudp Type Support | |
1302 | For a link of type | |
1303 | .I Bareudp | |
1304 | the following additional arguments are supported: | |
1305 | ||
1306 | .BI "ip link add " DEVICE | |
1307 | .BI type " bareudp " dstport " PORT " ethertype " ETHERTYPE" | |
1308 | [ | |
1309 | .BI srcportmin " SRCPORTMIN " | |
1310 | ] [ | |
1311 | .RB [ no ] multiproto | |
1312 | ] | |
1313 | ||
1314 | .in +8 | |
1315 | .sp | |
1316 | .BI dstport " PORT" | |
1317 | - specifies the destination port for the UDP tunnel. | |
1318 | ||
1319 | .sp | |
1320 | .BI ethertype " ETHERTYPE" | |
1321 | - specifies the ethertype of the L3 protocol being tunnelled. | |
1322 | ||
1323 | .sp | |
1324 | .BI srcportmin " SRCPORTMIN" | |
1325 | - selects the lowest value of the UDP tunnel source port range. | |
1326 | ||
1327 | .sp | |
1328 | .RB [ no ] multiproto | |
1329 | - activates support for protocols similar to the one | |
1330 | .RB "specified by " ethertype . | |
1331 | When | |
1332 | .I ETHERTYPE | |
1333 | is "mpls_uc" (that is, unicast MPLS), this allows the tunnel to also handle | |
1334 | multicast MPLS. | |
1335 | When | |
1336 | .I ETHERTYPE | |
1337 | is "ipv4", this allows the tunnel to also handle IPv6. This option is disabled | |
1338 | by default. | |
1339 | ||
a60223bc PS |
1340 | .TP |
1341 | MACVLAN and MACVTAP Type Support | |
1342 | For a link of type | |
1343 | .I MACVLAN | |
1344 | or | |
1345 | .I MACVTAP | |
1346 | the following additional arguments are supported: | |
1347 | ||
1348 | .BI "ip link add link " DEVICE " name " NAME | |
1349 | .BR type " { " macvlan " | " macvtap " } " | |
1350 | .BR mode " { " private " | " vepa " | " bridge " | " passthru | |
aa1b44ca | 1351 | .RB " [ " nopromisc " ] | " source " } " |
a60223bc PS |
1352 | |
1353 | .in +8 | |
1354 | .sp | |
1355 | .BR type " { " macvlan " | " macvtap " } " | |
1356 | - specifies the link type to use. | |
1357 | .BR macvlan " creates just a virtual interface, while " | |
1358 | .BR macvtap " in addition creates a character device " | |
1359 | .BR /dev/tapX " to be used just like a " tuntap " device." | |
1360 | ||
1361 | .B mode private | |
1362 | - Do not allow communication between | |
1363 | .B macvlan | |
1364 | instances on the same physical interface, even if the external switch supports | |
1365 | hairpin mode. | |
1366 | ||
1367 | .B mode vepa | |
1368 | - Virtual Ethernet Port Aggregator mode. Data from one | |
1369 | .B macvlan | |
1370 | instance to the other on the same physical interface is transmitted over the | |
1371 | physical interface. Either the attached switch needs to support hairpin mode, | |
1372 | or there must be a TCP/IP router forwarding the packets in order to allow | |
1373 | communication. This is the default mode. | |
1374 | ||
1375 | .B mode bridge | |
1376 | - In bridge mode, all endpoints are directly connected to each other, | |
1377 | communication is not redirected through the physical interface's peer. | |
1378 | ||
1379 | .BR mode " " passthru " [ " nopromisc " ] " | |
1380 | - This mode gives more power to a single endpoint, usually in | |
1381 | .BR macvtap " mode. It is not allowed for more than one endpoint on the same " | |
1382 | physical interface. All traffic will be forwarded to this endpoint, allowing | |
1383 | virtio guests to change MAC address or set promiscuous mode in order to bridge | |
1384 | the interface or create vlan interfaces on top of it. By default, this mode | |
1385 | forces the underlying interface into promiscuous mode. Passing the | |
1386 | .BR nopromisc " flag prevents this, so the promisc flag may be controlled " | |
1387 | using standard tools. | |
aa1b44ca | 1388 | |
1389 | .B mode source | |
1390 | - allows one to set a list of allowed mac address, which is used to match | |
1391 | against source mac address from received frames on underlying interface. This | |
1392 | allows creating mac based VLAN associations, instead of standard port or tag | |
1393 | based. The feature is useful to deploy 802.1x mac based behavior, | |
1394 | where drivers of underlying interfaces doesn't allows that. | |
a60223bc PS |
1395 | .in -8 |
1396 | ||
9b3c971a PH |
1397 | .TP |
1398 | High-availability Seamless Redundancy (HSR) Support | |
1399 | For a link of type | |
1400 | .I HSR | |
1401 | the following additional arguments are supported: | |
1402 | ||
52a59869 | 1403 | .BI "ip link add link " DEVICE " name " NAME " type hsr" |
9b3c971a | 1404 | .BI slave1 " SLAVE1-IF " slave2 " SLAVE2-IF " |
52a59869 PS |
1405 | .RB [ " supervision" |
1406 | .IR ADDR-BYTE " ] [" | |
1407 | .BR version " { " 0 " | " 1 " } ]" | |
9b3c971a PH |
1408 | |
1409 | .in +8 | |
1410 | .sp | |
1411 | .BR type " hsr " | |
1412 | - specifies the link type to use, here HSR. | |
1413 | ||
1414 | .BI slave1 " SLAVE1-IF " | |
1415 | - Specifies the physical device used for the first of the two ring ports. | |
1416 | ||
1417 | .BI slave2 " SLAVE2-IF " | |
1418 | - Specifies the physical device used for the second of the two ring ports. | |
1419 | ||
52a59869 | 1420 | .BI supervision " ADDR-BYTE" |
9b3c971a PH |
1421 | - The last byte of the multicast address used for HSR supervision frames. |
1422 | Default option is "0", possible values 0-255. | |
1423 | ||
52a59869 | 1424 | .BR version " { " 0 " | " 1 " }" |
9b3c971a PH |
1425 | - Selects the protocol version of the interface. Default option is "0", which |
1426 | corresponds to the 2010 version of the HSR standard. Option "1" activates the | |
1427 | 2012 version. | |
1428 | .in -8 | |
1429 | ||
3fbb5d43 SD |
1430 | .TP |
1431 | BRIDGE Type Support | |
1432 | For a link of type | |
1433 | .I BRIDGE | |
1434 | the following additional arguments are supported: | |
1435 | ||
1436 | .BI "ip link add " DEVICE " type bridge " | |
1437 | [ | |
1438 | .BI ageing_time " AGEING_TIME " | |
1439 | ] [ | |
1440 | .BI group_fwd_mask " MASK " | |
1441 | ] [ | |
1442 | .BI group_address " ADDRESS " | |
1443 | ] [ | |
1444 | .BI forward_delay " FORWARD_DELAY " | |
1445 | ] [ | |
1446 | .BI hello_time " HELLO_TIME " | |
1447 | ] [ | |
1448 | .BI max_age " MAX_AGE " | |
1449 | ] [ | |
1450 | .BI stp_state " STP_STATE " | |
1451 | ] [ | |
1452 | .BI priority " PRIORITY " | |
1453 | ] [ | |
1454 | .BI vlan_filtering " VLAN_FILTERING " | |
1455 | ] [ | |
1456 | .BI vlan_protocol " VLAN_PROTOCOL " | |
1457 | ] [ | |
1458 | .BI vlan_default_pvid " VLAN_DEFAULT_PVID " | |
1459 | ] [ | |
1460 | .BI vlan_stats_enabled " VLAN_STATS_ENABLED " | |
1461 | ] [ | |
90306a14 NA |
1462 | .BI vlan_stats_per_port " VLAN_STATS_PER_PORT " |
1463 | ] [ | |
3fbb5d43 SD |
1464 | .BI mcast_snooping " MULTICAST_SNOOPING " |
1465 | ] [ | |
1466 | .BI mcast_router " MULTICAST_ROUTER " | |
1467 | ] [ | |
1468 | .BI mcast_query_use_ifaddr " MCAST_QUERY_USE_IFADDR " | |
1469 | ] [ | |
1470 | .BI mcast_querier " MULTICAST_QUERIER " | |
1471 | ] [ | |
1472 | .BI mcast_hash_elasticity " HASH_ELASTICITY " | |
1473 | ] [ | |
1474 | .BI mcast_hash_max " HASH_MAX " | |
1475 | ] [ | |
1476 | .BI mcast_last_member_count " LAST_MEMBER_COUNT " | |
1477 | ] [ | |
1478 | .BI mcast_startup_query_count " STARTUP_QUERY_COUNT " | |
1479 | ] [ | |
1480 | .BI mcast_last_member_interval " LAST_MEMBER_INTERVAL " | |
1481 | ] [ | |
1482 | .BI mcast_membership_interval " MEMBERSHIP_INTERVAL " | |
1483 | ] [ | |
1484 | .BI mcast_querier_interval " QUERIER_INTERVAL " | |
1485 | ] [ | |
1486 | .BI mcast_query_interval " QUERY_INTERVAL " | |
1487 | ] [ | |
1488 | .BI mcast_query_response_interval " QUERY_RESPONSE_INTERVAL " | |
1489 | ] [ | |
1490 | .BI mcast_startup_query_interval " STARTUP_QUERY_INTERVAL " | |
1491 | ] [ | |
1492 | .BI mcast_stats_enabled " MCAST_STATS_ENABLED " | |
1493 | ] [ | |
1494 | .BI mcast_igmp_version " IGMP_VERSION " | |
1495 | ] [ | |
1496 | .BI mcast_mld_version " MLD_VERSION " | |
1497 | ] [ | |
1498 | .BI nf_call_iptables " NF_CALL_IPTABLES " | |
1499 | ] [ | |
1500 | .BI nf_call_ip6tables " NF_CALL_IP6TABLES " | |
1501 | ] [ | |
1502 | .BI nf_call_arptables " NF_CALL_ARPTABLES " | |
1503 | ] | |
1504 | ||
1505 | .in +8 | |
1506 | .sp | |
1507 | .BI ageing_time " AGEING_TIME " | |
f76ad635 SH |
1508 | - configure the bridge's FDB entries ageing time, ie the number of |
1509 | seconds a MAC address will be kept in the FDB after a packet has been | |
1510 | received from that address. after this time has passed, entries are | |
1511 | cleaned up. | |
3fbb5d43 SD |
1512 | |
1513 | .BI group_fwd_mask " MASK " | |
f76ad635 SH |
1514 | - set the group forward mask. This is the bitmask that is applied to |
1515 | decide whether to forward incoming frames destined to link-local | |
1516 | addresses, ie addresses of the form 01:80:C2:00:00:0X (defaults to 0, | |
1517 | ie the bridge does not forward any link-local frames). | |
3fbb5d43 SD |
1518 | |
1519 | .BI group_address " ADDRESS " | |
f76ad635 SH |
1520 | - set the MAC address of the multicast group this bridge uses for STP. |
1521 | The address must be a link-local address in standard Ethernet MAC | |
1522 | address format, ie an address of the form 01:80:C2:00:00:0X, with X | |
1523 | in [0, 4..f]. | |
3fbb5d43 SD |
1524 | |
1525 | .BI forward_delay " FORWARD_DELAY " | |
f76ad635 SH |
1526 | - set the forwarding delay in seconds, ie the time spent in LISTENING |
1527 | state (before moving to LEARNING) and in LEARNING state (before | |
1528 | moving to FORWARDING). Only relevant if STP is enabled. Valid values | |
1529 | are between 2 and 30. | |
3fbb5d43 SD |
1530 | |
1531 | .BI hello_time " HELLO_TIME " | |
f76ad635 SH |
1532 | - set the time in seconds between hello packets sent by the bridge, |
1533 | when it is a root bridge or a designated bridges. | |
1534 | Only relevant if STP is enabled. Valid values are between 1 and 10. | |
3fbb5d43 SD |
1535 | |
1536 | .BI max_age " MAX_AGE " | |
f76ad635 SH |
1537 | - set the hello packet timeout, ie the time in seconds until another |
1538 | bridge in the spanning tree is assumed to be dead, after reception of | |
1539 | its last hello message. Only relevant if STP is enabled. Valid values | |
1540 | are between 6 and 40. | |
3fbb5d43 SD |
1541 | |
1542 | .BI stp_state " STP_STATE " | |
1543 | - turn spanning tree protocol on | |
1544 | .RI ( STP_STATE " > 0) " | |
1545 | or off | |
1546 | .RI ( STP_STATE " == 0). " | |
1547 | for this bridge. | |
1548 | ||
1549 | .BI priority " PRIORITY " | |
f76ad635 SH |
1550 | - set this bridge's spanning tree priority, used during STP root |
1551 | bridge election. | |
3fbb5d43 SD |
1552 | .I PRIORITY |
1553 | is a 16bit unsigned integer. | |
1554 | ||
1555 | .BI vlan_filtering " VLAN_FILTERING " | |
1556 | - turn VLAN filtering on | |
1557 | .RI ( VLAN_FILTERING " > 0) " | |
1558 | or off | |
1559 | .RI ( VLAN_FILTERING " == 0). " | |
1560 | When disabled, the bridge will not consider the VLAN tag when handling packets. | |
1561 | ||
1562 | .BR vlan_protocol " { " 802.1Q " | " 802.1ad " } " | |
1563 | - set the protocol used for VLAN filtering. | |
1564 | ||
1565 | .BI vlan_default_pvid " VLAN_DEFAULT_PVID " | |
1566 | - set the default PVID (native/untagged VLAN ID) for this bridge. | |
1567 | ||
1568 | .BI vlan_stats_enabled " VLAN_STATS_ENABLED " | |
1569 | - enable | |
1570 | .RI ( VLAN_STATS_ENABLED " == 1) " | |
1571 | or disable | |
1572 | .RI ( VLAN_STATS_ENABLED " == 0) " | |
1573 | per-VLAN stats accounting. | |
1574 | ||
90306a14 NA |
1575 | .BI vlan_stats_per_port " VLAN_STATS_PER_PORT " |
1576 | - enable | |
1577 | .RI ( VLAN_STATS_PER_PORT " == 1) " | |
1578 | or disable | |
1579 | .RI ( VLAN_STATS_PER_PORT " == 0) " | |
1580 | per-VLAN per-port stats accounting. Can be changed only when there are no port VLANs configured. | |
1581 | ||
3fbb5d43 SD |
1582 | .BI mcast_snooping " MULTICAST_SNOOPING " |
1583 | - turn multicast snooping on | |
1584 | .RI ( MULTICAST_SNOOPING " > 0) " | |
1585 | or off | |
1586 | .RI ( MULTICAST_SNOOPING " == 0). " | |
1587 | ||
1588 | .BI mcast_router " MULTICAST_ROUTER " | |
1589 | - set bridge's multicast router if IGMP snooping is enabled. | |
1590 | .I MULTICAST_ROUTER | |
1591 | is an integer value having the following meaning: | |
1592 | .in +8 | |
1593 | .sp | |
1594 | .B 0 | |
1595 | - disabled. | |
1596 | ||
1597 | .B 1 | |
1598 | - automatic (queried). | |
1599 | ||
1600 | .B 2 | |
1601 | - permanently enabled. | |
1602 | .in -8 | |
1603 | ||
1604 | .BI mcast_query_use_ifaddr " MCAST_QUERY_USE_IFADDR " | |
1605 | - whether to use the bridge's own IP address as source address for IGMP queries | |
1606 | .RI ( MCAST_QUERY_USE_IFADDR " > 0) " | |
1607 | or the default of 0.0.0.0 | |
1608 | .RI ( MCAST_QUERY_USE_IFADDR " == 0). " | |
1609 | ||
1610 | .BI mcast_querier " MULTICAST_QUERIER " | |
1611 | - enable | |
1612 | .RI ( MULTICAST_QUERIER " > 0) " | |
1613 | or disable | |
1614 | .RI ( MULTICAST_QUERIER " == 0) " | |
1615 | IGMP querier, ie sending of multicast queries by the bridge (default: disabled). | |
1616 | ||
1617 | .BI mcast_querier_interval " QUERIER_INTERVAL " | |
f76ad635 SH |
1618 | - interval between queries sent by other routers. if no queries are seen |
1619 | after this delay has passed, the bridge will start to send its own queries | |
1620 | (as if | |
3fbb5d43 SD |
1621 | .BI mcast_querier |
1622 | was enabled). | |
1623 | ||
1624 | .BI mcast_hash_elasticity " HASH_ELASTICITY " | |
f76ad635 SH |
1625 | - set multicast database hash elasticity, ie the maximum chain length |
1626 | in the multicast hash table (defaults to 4). | |
3fbb5d43 SD |
1627 | |
1628 | .BI mcast_hash_max " HASH_MAX " | |
f76ad635 SH |
1629 | - set maximum size of multicast hash table (defaults to 512, |
1630 | value must be a power of 2). | |
3fbb5d43 SD |
1631 | |
1632 | .BI mcast_last_member_count " LAST_MEMBER_COUNT " | |
f76ad635 SH |
1633 | - set multicast last member count, ie the number of queries the bridge |
1634 | will send before stopping forwarding a multicast group after a "leave" | |
1635 | message has been received (defaults to 2). | |
3fbb5d43 SD |
1636 | |
1637 | .BI mcast_last_member_interval " LAST_MEMBER_INTERVAL " | |
f76ad635 SH |
1638 | - interval between queries to find remaining members of a group, |
1639 | after a "leave" message is received. | |
3fbb5d43 SD |
1640 | |
1641 | .BI mcast_startup_query_count " STARTUP_QUERY_COUNT " | |
1642 | - set the number of IGMP queries to send during startup phase (defaults to 2). | |
1643 | ||
1644 | .BI mcast_startup_query_interval " STARTUP_QUERY_INTERVAL " | |
1645 | - interval between queries in the startup phase. | |
1646 | ||
1647 | .BI mcast_query_interval " QUERY_INTERVAL " | |
f76ad635 SH |
1648 | - interval between queries sent by the bridge after the end of the |
1649 | startup phase. | |
3fbb5d43 SD |
1650 | |
1651 | .BI mcast_query_response_interval " QUERY_RESPONSE_INTERVAL " | |
f76ad635 SH |
1652 | - set the Max Response Time/Maximum Response Delay for IGMP/MLD |
1653 | queries sent by the bridge. | |
3fbb5d43 SD |
1654 | |
1655 | .BI mcast_membership_interval " MEMBERSHIP_INTERVAL " | |
f76ad635 SH |
1656 | - delay after which the bridge will leave a group, |
1657 | if no membership reports for this group are received. | |
3fbb5d43 SD |
1658 | |
1659 | .BI mcast_stats_enabled " MCAST_STATS_ENABLED " | |
1660 | - enable | |
1661 | .RI ( MCAST_STATS_ENABLED " > 0) " | |
1662 | or disable | |
1663 | .RI ( MCAST_STATS_ENABLED " == 0) " | |
1664 | multicast (IGMP/MLD) stats accounting. | |
1665 | ||
1666 | .BI mcast_igmp_version " IGMP_VERSION " | |
1667 | - set the IGMP version. | |
1668 | ||
1669 | .BI mcast_mld_version " MLD_VERSION " | |
1670 | - set the MLD version. | |
1671 | ||
1672 | .BI nf_call_iptables " NF_CALL_IPTABLES " | |
1673 | - enable | |
1674 | .RI ( NF_CALL_IPTABLES " > 0) " | |
1675 | or disable | |
1676 | .RI ( NF_CALL_IPTABLES " == 0) " | |
1677 | iptables hooks on the bridge. | |
1678 | ||
1679 | .BI nf_call_ip6tables " NF_CALL_IP6TABLES " | |
1680 | - enable | |
1681 | .RI ( NF_CALL_IP6TABLES " > 0) " | |
1682 | or disable | |
1683 | .RI ( NF_CALL_IP6TABLES " == 0) " | |
1684 | ip6tables hooks on the bridge. | |
1685 | ||
1686 | .BI nf_call_arptables " NF_CALL_ARPTABLES " | |
1687 | - enable | |
1688 | .RI ( NF_CALL_ARPTABLES " > 0) " | |
1689 | or disable | |
1690 | .RI ( NF_CALL_ARPTABLES " == 0) " | |
1691 | arptables hooks on the bridge. | |
1692 | ||
1693 | ||
c7d6cbaf | 1694 | .in -8 |
3fbb5d43 | 1695 | |
b26fc590 SD |
1696 | .TP |
1697 | MACsec Type Support | |
1698 | For a link of type | |
1699 | .I MACsec | |
1700 | the following additional arguments are supported: | |
1701 | ||
1702 | .BI "ip link add link " DEVICE " name " NAME " type macsec" | |
5898bd66 DC |
1703 | [ [ |
1704 | .BI address " <lladdr>" | |
1705 | ] | |
b26fc590 SD |
1706 | .BI port " PORT" |
1707 | | | |
1708 | .BI sci " SCI" | |
1709 | ] [ | |
1710 | .BI cipher " CIPHER_SUITE" | |
1711 | ] [ | |
89bb6e67 DC |
1712 | .BR icvlen " { " |
1713 | .IR 8..16 " } ] [" | |
b26fc590 SD |
1714 | .BR encrypt " {" |
1715 | .BR on " | " off " } ] [ " | |
1716 | .BR send_sci " { " on " | " off " } ] [" | |
c0ab80a4 | 1717 | .BR end_station " { " on " | " off " } ] [" |
b26fc590 SD |
1718 | .BR scb " { " on " | " off " } ] [" |
1719 | .BR protect " { " on " | " off " } ] [" | |
1720 | .BR replay " { " on " | " off " }" | |
1721 | .BR window " { " | |
1722 | .IR 0..2^32-1 " } ] [" | |
1723 | .BR validate " { " strict " | " check " | " disabled " } ] [" | |
c0ab80a4 | 1724 | .BR encodingsa " { " |
b26fc590 SD |
1725 | .IR 0..3 " } ]" |
1726 | ||
1727 | .in +8 | |
1728 | .sp | |
5898bd66 DC |
1729 | .BI address " <lladdr> " |
1730 | - sets the system identifier component of secure channel for this MACsec device. | |
1731 | ||
1732 | .sp | |
1733 | .BI port " PORT " | |
f76ad635 SH |
1734 | - sets the port number component of secure channel for this MACsec |
1735 | device, in a range from 1 to 65535 inclusive. Numbers with a leading " | |
1736 | 0 " or " 0x " are interpreted as octal and hexadecimal, respectively. | |
b26fc590 SD |
1737 | |
1738 | .sp | |
1739 | .BI sci " SCI " | |
0330f49e DC |
1740 | - sets the secure channel identifier for this MACsec device. |
1741 | .I SCI | |
1742 | is a 64bit wide number in hexadecimal format. | |
b26fc590 SD |
1743 | |
1744 | .sp | |
1745 | .BI cipher " CIPHER_SUITE " | |
1746 | - defines the cipher suite to use. | |
1747 | ||
89bb6e67 DC |
1748 | .sp |
1749 | .BI icvlen " LENGTH " | |
1750 | - sets the length of the Integrity Check Value (ICV). | |
1751 | ||
b26fc590 SD |
1752 | .sp |
1753 | .BR "encrypt on " or " encrypt off" | |
1754 | - switches between authenticated encryption, or authenticity mode only. | |
1755 | ||
1756 | .sp | |
1757 | .BR "send_sci on " or " send_sci off" | |
f76ad635 SH |
1758 | - specifies whether the SCI is included in every packet, |
1759 | or only when it is necessary. | |
b26fc590 SD |
1760 | |
1761 | .sp | |
c0ab80a4 | 1762 | .BR "end_station on " or " end_station off" |
b26fc590 SD |
1763 | - sets the End Station bit. |
1764 | ||
1765 | .sp | |
1766 | .BR "scb on " or " scb off" | |
1767 | - sets the Single Copy Broadcast bit. | |
1768 | ||
1769 | .sp | |
1770 | .BR "protect on " or " protect off" | |
1771 | - enables MACsec protection on the device. | |
1772 | ||
1773 | .sp | |
1774 | .BR "replay on " or " replay off" | |
1775 | - enables replay protection on the device. | |
1776 | ||
1777 | .in +8 | |
1778 | ||
1779 | .sp | |
1780 | .BI window " SIZE " | |
1781 | - sets the size of the replay window. | |
1782 | ||
1783 | .in -8 | |
1784 | ||
1785 | .sp | |
1786 | .BR "validate strict " or " validate check " or " validate disabled" | |
1787 | - sets the validation mode on the device. | |
1788 | ||
1789 | .sp | |
c0ab80a4 | 1790 | .BI encodingsa " AN " |
b26fc590 SD |
1791 | - sets the active secure association for transmission. |
1792 | ||
1793 | .in -8 | |
1794 | ||
2a6f9cfa DA |
1795 | .TP |
1796 | VRF Type Support | |
1797 | For a link of type | |
1798 | .I VRF | |
1799 | the following additional arguments are supported: | |
1800 | ||
1801 | .BI "ip link add " DEVICE " type vrf table " TABLE | |
1802 | ||
1803 | .in +8 | |
1804 | .sp | |
1805 | .BR table " table id associated with VRF device" | |
1806 | ||
1807 | .in -8 | |
1808 | ||
46c16a5d DP |
1809 | .TP |
1810 | RMNET Type Support | |
1811 | For a link of type | |
1812 | .I RMNET | |
1813 | the following additional arguments are supported: | |
1814 | ||
1815 | .BI "ip link add link " DEVICE " name " NAME " type rmnet mux_id " MUXID | |
1816 | ||
1817 | .in +8 | |
1818 | .sp | |
1819 | .BI mux_id " MUXID " | |
1820 | - specifies the mux identifier for the rmnet device, possible values 1-254. | |
1821 | ||
1822 | .in -8 | |
1823 | ||
286446c1 ME |
1824 | .TP |
1825 | XFRM Type Support | |
1826 | For a link of type | |
1827 | .I XFRM | |
1828 | the following additional arguments are supported: | |
1829 | ||
1830 | .BI "ip link add " DEVICE " type xfrm dev " PHYS_DEV " [ if_id " IF_ID " ]" | |
1831 | ||
1832 | .in +8 | |
1833 | .sp | |
1834 | .BI dev " PHYS_DEV " | |
1835 | - specifies the underlying physical interface from which transform traffic is sent and received. | |
1836 | ||
1837 | .sp | |
1838 | .BI if_id " IF-ID " | |
1839 | - specifies the hexadecimal lookup key used to send traffic to and from specific xfrm | |
1840 | policies. Policies must be configured with the same key. If not set, the key defaults to | |
1841 | 0 and will match any policies which similarly do not have a lookup key configuration. | |
1842 | ||
1843 | .in -8 | |
1844 | ||
761a1e60 | 1845 | .SS ip link delete - delete virtual link |
761a1e60 CT |
1846 | |
1847 | .TP | |
1848 | .BI dev " DEVICE " | |
7f74cf6d VK |
1849 | specifies the virtual device to act operate on. |
1850 | ||
1851 | .TP | |
1852 | .BI group " GROUP " | |
1853 | specifies the group of virtual links to delete. Group 0 is not allowed to be | |
1854 | deleted since it is the default group. | |
1855 | ||
1856 | .TP | |
1857 | .BI type " TYPE " | |
1858 | specifies the type of the device. | |
761a1e60 CT |
1859 | |
1860 | .SS ip link set - change device attributes | |
1861 | ||
f9e9f928 PS |
1862 | .PP |
1863 | .B Warning: | |
1864 | If multiple parameter changes are requested, | |
1865 | .B ip | |
1866 | aborts immediately after any of the changes have failed. | |
1867 | This is the only case when | |
1868 | .B ip | |
1869 | can move the system to an unpredictable state. The solution | |
1870 | is to avoid changing several parameters with one | |
1871 | .B ip link set | |
1872 | call. | |
ab45d91d SH |
1873 | The modifier |
1874 | .B change | |
1875 | is equivalent to | |
1876 | .BR "set" . | |
1877 | ||
f9e9f928 | 1878 | |
761a1e60 CT |
1879 | .TP |
1880 | .BI dev " DEVICE " | |
1881 | .I DEVICE | |
f76ad635 SH |
1882 | specifies network device to operate on. When configuring SR-IOV |
1883 | Virtual Function (VF) devices, this keyword should specify the | |
1884 | associated Physical Function (PF) device. | |
761a1e60 CT |
1885 | |
1886 | .TP | |
1887 | .BI group " GROUP " | |
1888 | .I GROUP | |
1889 | has a dual role: If both group and dev are present, then move the device to the | |
a89d5329 | 1890 | specified group. If only a group is specified, then the command operates on |
761a1e60 CT |
1891 | all devices in that group. |
1892 | ||
1893 | .TP | |
1894 | .BR up " and " down | |
1895 | change the state of the device to | |
1896 | .B UP | |
1897 | or | |
1898 | .BR "DOWN" . | |
1899 | ||
1900 | .TP | |
1901 | .BR "arp on " or " arp off" | |
1902 | change the | |
1903 | .B NOARP | |
1904 | flag on the device. | |
1905 | ||
1906 | .TP | |
1907 | .BR "multicast on " or " multicast off" | |
1908 | change the | |
1909 | .B MULTICAST | |
1910 | flag on the device. | |
1911 | ||
18864827 AK |
1912 | .TP |
1913 | .BR "protodown on " or " protodown off" | |
1914 | change the | |
1915 | .B PROTODOWN | |
f76ad635 SH |
1916 | state on the device. Indicates that a protocol error has been detected |
1917 | on the port. Switch drivers can react to this error by doing a phys | |
1918 | down on the switch port. | |
18864827 | 1919 | |
761a1e60 CT |
1920 | .TP |
1921 | .BR "dynamic on " or " dynamic off" | |
1922 | change the | |
1923 | .B DYNAMIC | |
f76ad635 SH |
1924 | flag on the device. Indicates that address can change when interface |
1925 | goes down (currently | |
34c8a95c VK |
1926 | .B NOT |
1927 | used by the Linux). | |
761a1e60 CT |
1928 | |
1929 | .TP | |
1930 | .BI name " NAME" | |
a89d5329 | 1931 | change the name of the device. This operation is not |
761a1e60 CT |
1932 | recommended if the device is running or has some addresses |
1933 | already configured. | |
1934 | ||
1935 | .TP | |
1936 | .BI txqueuelen " NUMBER" | |
1937 | .TP | |
1938 | .BI txqlen " NUMBER" | |
1939 | change the transmit queue length of the device. | |
1940 | ||
1941 | .TP | |
1942 | .BI mtu " NUMBER" | |
1943 | change the | |
1944 | .I MTU | |
1945 | of the device. | |
1946 | ||
1947 | .TP | |
1948 | .BI address " LLADDRESS" | |
1949 | change the station address of the interface. | |
1950 | ||
1951 | .TP | |
1952 | .BI broadcast " LLADDRESS" | |
1953 | .TP | |
1954 | .BI brd " LLADDRESS" | |
1955 | .TP | |
1956 | .BI peer " LLADDRESS" | |
1957 | change the link layer broadcast address or the peer address when | |
1958 | the interface is | |
1959 | .IR "POINTOPOINT" . | |
1960 | ||
1961 | .TP | |
36324eba | 1962 | .BI netns " NETNSNAME " \fR| " PID" |
761a1e60 | 1963 | move the device to the network namespace associated with name |
36324eba VK |
1964 | .IR "NETNSNAME " or |
1965 | .RI process " PID". | |
1966 | ||
1967 | Some devices are not allowed to change network namespace: loopback, bridge, | |
130f5496 | 1968 | wireless. These are network namespace local devices. In such case |
36324eba | 1969 | .B ip |
f76ad635 SH |
1970 | tool will return "Invalid argument" error. It is possible to find out |
1971 | if device is local to a single network namespace by checking | |
36324eba VK |
1972 | .B netns-local |
1973 | flag in the output of the | |
1974 | .BR ethtool ":" | |
1975 | ||
1976 | .in +8 | |
1977 | .B ethtool -k | |
1978 | .I DEVICE | |
1979 | .in -8 | |
1980 | ||
1981 | To change network namespace for wireless devices the | |
1982 | .B iw | |
f76ad635 SH |
1983 | tool can be used. But it allows to change network namespace only for |
1984 | physical devices and by process | |
36324eba | 1985 | .IR PID . |
761a1e60 CT |
1986 | |
1987 | .TP | |
1988 | .BI alias " NAME" | |
1989 | give the device a symbolic name for easy reference. | |
1990 | ||
503aa4e2 PŠ |
1991 | .TP |
1992 | .BI group " GROUP" | |
1993 | specify the group the device belongs to. | |
1994 | The available groups are listed in file | |
1995 | .BR "@SYSCONFDIR@/group" . | |
1996 | ||
761a1e60 CT |
1997 | .TP |
1998 | .BI vf " NUM" | |
1999 | specify a Virtual Function device to be configured. The associated PF device | |
2000 | must be specified using the | |
2001 | .B dev | |
2002 | parameter. | |
2003 | ||
2004 | .in +8 | |
2005 | .BI mac " LLADDRESS" | |
2006 | - change the station address for the specified VF. The | |
2007 | .B vf | |
2008 | parameter must be specified. | |
2009 | ||
2010 | .sp | |
2011 | .BI vlan " VLANID" | |
2012 | - change the assigned VLAN for the specified VF. When specified, all traffic | |
2013 | sent from the VF will be tagged with the specified VLAN ID. Incoming traffic | |
2014 | will be filtered for the specified VLAN ID, and will have all VLAN tags | |
2015 | stripped before being passed to the VF. Setting this parameter to 0 disables | |
2016 | VLAN tagging and filtering. The | |
2017 | .B vf | |
2018 | parameter must be specified. | |
2019 | ||
2020 | .sp | |
2021 | .BI qos " VLAN-QOS" | |
2022 | - assign VLAN QOS (priority) bits for the VLAN tag. When specified, all VLAN | |
2023 | tags transmitted by the VF will include the specified priority bits in the | |
2024 | VLAN tag. If not specified, the value is assumed to be 0. Both the | |
2025 | .B vf | |
2026 | and | |
2027 | .B vlan | |
2028 | parameters must be specified. Setting both | |
2029 | .B vlan | |
2030 | and | |
2031 | .B qos | |
2032 | as 0 disables VLAN tagging and filtering for the VF. | |
2033 | ||
56e9f0ab MS |
2034 | .sp |
2035 | .BI proto " VLAN-PROTO" | |
2036 | - assign VLAN PROTOCOL for the VLAN tag, either 802.1Q or 802.1ad. | |
f76ad635 SH |
2037 | Setting to 802.1ad, all traffic sent from the VF will be tagged with |
2038 | VLAN S-Tag. Incoming traffic will have VLAN S-Tags stripped before | |
2039 | being passed to the VF. Setting to 802.1ad also enables an option to | |
2040 | concatenate another VLAN tag, so both S-TAG and C-TAG will be | |
2041 | inserted/stripped for outgoing/incoming traffic, respectively. If not | |
2042 | specified, the value is assumed to be 802.1Q. Both the | |
56e9f0ab MS |
2043 | .B vf |
2044 | and | |
2045 | .B vlan | |
2046 | parameters must be specified. | |
2047 | ||
761a1e60 CT |
2048 | .sp |
2049 | .BI rate " TXRATE" | |
f89a2a05 SC |
2050 | -- change the allowed transmit bandwidth, in Mbps, for the specified VF. |
2051 | Setting this parameter to 0 disables rate limiting. | |
2052 | .B vf | |
2053 | parameter must be specified. | |
2054 | Please use new API | |
2055 | .B "max_tx_rate" | |
2056 | option instead. | |
2057 | ||
2058 | .sp | |
2059 | .BI max_tx_rate " TXRATE" | |
f76ad635 SH |
2060 | - change the allowed maximum transmit bandwidth, in Mbps, for the |
2061 | specified VF. Setting this parameter to 0 disables rate limiting. | |
f89a2a05 SC |
2062 | .B vf |
2063 | parameter must be specified. | |
2064 | ||
2065 | .sp | |
2066 | .BI min_tx_rate " TXRATE" | |
2067 | - change the allowed minimum transmit bandwidth, in Mbps, for the specified VF. | |
2068 | Minimum TXRATE should be always <= Maximum TXRATE. | |
c7db3921 | 2069 | Setting this parameter to 0 disables rate limiting. |
761a1e60 CT |
2070 | .B vf |
2071 | parameter must be specified. | |
2072 | ||
2073 | .sp | |
2074 | .BI spoofchk " on|off" | |
2075 | - turn packet spoof checking on or off for the specified VF. | |
63f60e3a | 2076 | .sp |
8e45e44b | 2077 | .BI query_rss " on|off" |
f76ad635 SH |
2078 | - toggle the ability of querying the RSS configuration of a specific |
2079 | VF. VF RSS information like RSS hash key may be considered sensitive | |
2080 | on some devices where this information is shared between VF and PF | |
2081 | and thus its querying may be prohibited by default. | |
8e45e44b | 2082 | .sp |
63f60e3a | 2083 | .BI state " auto|enable|disable" |
f76ad635 SH |
2084 | - set the virtual link state as seen by the specified VF. Setting to |
2085 | auto means a reflection of the PF link state, enable lets the VF to | |
2086 | communicate with other VFs on this host even if the PF link state is | |
2087 | down, disable causes the HW to drop any packets sent by the VF. | |
b6d77d9e HS |
2088 | .sp |
2089 | .BI trust " on|off" | |
f76ad635 SH |
2090 | - trust the specified VF user. This enables that VF user can set a |
2091 | specific feature which may impact security and/or | |
2092 | performance. (e.g. VF multicast promiscuous mode) | |
d91fb3f4 EC |
2093 | .sp |
2094 | .BI node_guid " eui64" | |
5a3ec4ba | 2095 | - configure node GUID for Infiniband VFs. |
d91fb3f4 EC |
2096 | .sp |
2097 | .BI port_guid " eui64" | |
5a3ec4ba | 2098 | - configure port GUID for Infiniband VFs. |
761a1e60 CT |
2099 | .in -8 |
2100 | ||
c7272ca7 DB |
2101 | .TP |
2102 | .B xdp object "|" pinned "|" off | |
a872b870 | 2103 | set (or unset) a XDP ("eXpress Data Path") BPF program to run on every |
c7272ca7 | 2104 | packet at driver level. |
a872b870 DB |
2105 | .B ip link |
2106 | output will indicate a | |
2107 | .B xdp | |
2108 | flag for the networking device. If the driver does not have native XDP | |
2109 | support, the kernel will fall back to a slower, driver-independent "generic" | |
2110 | XDP variant. The | |
2111 | .B ip link | |
2112 | output will in that case indicate | |
2113 | .B xdpgeneric | |
2114 | instead of | |
2115 | .B xdp | |
2116 | only. If the driver does have native XDP support, but the program is | |
2117 | loaded under | |
2118 | .B xdpgeneric object "|" pinned | |
2119 | then the kernel will use the generic XDP variant instead of the native one. | |
14683814 JK |
2120 | .B xdpdrv |
2121 | has the opposite effect of requestsing that the automatic fallback to the | |
2122 | generic XDP variant be disabled and in case driver is not XDP-capable error | |
2123 | should be returned. | |
2124 | .B xdpdrv | |
2125 | also disables hardware offloads. | |
1b5e8094 JK |
2126 | .B xdpoffload |
2127 | in ip link output indicates that the program has been offloaded to hardware | |
2128 | and can also be used to request the "offload" mode, much like | |
2129 | .B xdpgeneric | |
2130 | it forces program to be installed specifically in HW/FW of the apater. | |
c7272ca7 DB |
2131 | |
2132 | .B off | |
2133 | (or | |
2134 | .B none | |
2135 | ) | |
2136 | - Detaches any currently attached XDP/BPF program from the given device. | |
2137 | ||
2138 | .BI object " FILE " | |
2139 | - Attaches a XDP/BPF program to the given device. The | |
2140 | .I FILE | |
2141 | points to a BPF ELF file (f.e. generated by LLVM) that contains the BPF | |
2142 | program code, map specifications, etc. If a XDP/BPF program is already | |
2143 | attached to the given device, an error will be thrown. If no XDP/BPF | |
2144 | program is currently attached, the device supports XDP and the program | |
2145 | from the BPF ELF file passes the kernel verifier, then it will be attached | |
2146 | to the device. If the option | |
2147 | .I -force | |
2148 | is passed to | |
2149 | .B ip | |
2150 | then any prior attached XDP/BPF program will be atomically overridden and | |
2151 | no error will be thrown in this case. If no | |
2152 | .B section | |
2153 | option is passed, then the default section name ("prog") will be assumed, | |
2154 | otherwise the provided section name will be used. If no | |
2155 | .B verbose | |
2156 | option is passed, then a verifier log will only be dumped on load error. | |
2157 | See also | |
2158 | .B EXAMPLES | |
2159 | section for usage examples. | |
2160 | ||
2161 | .BI section " NAME " | |
2162 | - Specifies a section name that contains the BPF program code. If no section | |
2163 | name is specified, the default one ("prog") will be used. This option is | |
2164 | to be passed with the | |
2165 | .B object | |
2166 | option. | |
2167 | ||
2168 | .BI verbose | |
2169 | - Act in verbose mode. For example, even in case of success, this will | |
2170 | print the verifier log in case a program was loaded from a BPF ELF file. | |
2171 | ||
2172 | .BI pinned " FILE " | |
2173 | - Attaches a XDP/BPF program to the given device. The | |
2174 | .I FILE | |
2175 | points to an already pinned BPF program in the BPF file system. The option | |
2176 | .B section | |
2177 | doesn't apply here, but otherwise semantics are the same as with the option | |
2178 | .B object | |
2179 | described already. | |
2180 | ||
761a1e60 CT |
2181 | .TP |
2182 | .BI master " DEVICE" | |
2183 | set master device of the device (enslave device). | |
2184 | ||
2185 | .TP | |
2186 | .BI nomaster | |
2187 | unset master device of the device (release device). | |
2188 | ||
503aa4e2 | 2189 | .TP |
8f0777a8 BM |
2190 | .BI addrgenmode " eui64|none|stable_secret|random" |
2191 | set the IPv6 address generation mode | |
2192 | ||
2193 | .I eui64 | |
2194 | - use a Modified EUI-64 format interface identifier | |
2195 | ||
2196 | .I none | |
2197 | - disable automatic address generation | |
2198 | ||
2199 | .I stable_secret | |
f76ad635 SH |
2200 | - generate the interface identifier based on a preset |
2201 | /proc/sys/net/ipv6/conf/{default,DEVICE}/stable_secret | |
8f0777a8 BM |
2202 | |
2203 | .I random | |
2204 | - like stable_secret, but auto-generate a new random secret if none is set | |
503aa4e2 PŠ |
2205 | |
2206 | .TP | |
2207 | .BR "link-netnsid " | |
2208 | set peer netnsid for a cross-netns interface | |
2209 | ||
3dd4b893 PS |
2210 | .TP |
2211 | .BI type " ETYPE TYPE_ARGS" | |
2212 | Change type-specific settings. For a list of supported types and arguments refer | |
2213 | to the description of | |
2214 | .B "ip link add" | |
2215 | above. In addition to that, it is possible to manipulate settings to slave | |
2216 | devices: | |
2217 | ||
2218 | .TP | |
2219 | Bridge Slave Support | |
2220 | For a link with master | |
2221 | .B bridge | |
2222 | the following additional arguments are supported: | |
2223 | ||
2224 | .B "ip link set type bridge_slave" | |
2225 | [ | |
e83435fc HL |
2226 | .B fdb_flush |
2227 | ] [ | |
3dd4b893 PS |
2228 | .BI state " STATE" |
2229 | ] [ | |
2230 | .BI priority " PRIO" | |
2231 | ] [ | |
2232 | .BI cost " COST" | |
2233 | ] [ | |
2234 | .BR guard " { " on " | " off " }" | |
2235 | ] [ | |
2236 | .BR hairpin " { " on " | " off " }" | |
2237 | ] [ | |
2238 | .BR fastleave " { " on " | " off " }" | |
2239 | ] [ | |
2240 | .BR root_block " { " on " | " off " }" | |
2241 | ] [ | |
2242 | .BR learning " { " on " | " off " }" | |
2243 | ] [ | |
2244 | .BR flood " { " on " | " off " }" | |
2245 | ] [ | |
2246 | .BR proxy_arp " { " on " | " off " }" | |
2247 | ] [ | |
2248 | .BR proxy_arp_wifi " { " on " | " off " }" | |
2249 | ] [ | |
2250 | .BI mcast_router " MULTICAST_ROUTER" | |
2251 | ] [ | |
9208b4e7 NA |
2252 | .BR mcast_fast_leave " { " on " | " off "}" |
2253 | ] [ | |
fdbdd356 NA |
2254 | .BR mcast_flood " { " on " | " off " }" |
2255 | ] [ | |
b5a754b1 TJ |
2256 | .BR mcast_to_unicast " { " on " | " off " }" |
2257 | ] [ | |
a5e3f41b NA |
2258 | .BR group_fwd_mask " MASK" |
2259 | ] [ | |
05001bcf | 2260 | .BR neigh_suppress " { " on " | " off " }" |
8cfde5c9 | 2261 | ] [ |
05001bcf NA |
2262 | .BR vlan_tunnel " { " on " | " off " }" |
2263 | ] [ | |
d13d52d0 NA |
2264 | .BR isolated " { " on " | " off " }" |
2265 | ] [ | |
2266 | .BR backup_port " DEVICE" | |
2267 | ] [ | |
2268 | .BR nobackup_port " ]" | |
3dd4b893 PS |
2269 | |
2270 | .in +8 | |
2271 | .sp | |
e83435fc HL |
2272 | .B fdb_flush |
2273 | - flush bridge slave's fdb dynamic entries. | |
2274 | ||
3dd4b893 PS |
2275 | .BI state " STATE" |
2276 | - Set port state. | |
2277 | .I STATE | |
2278 | is a number representing the following states: | |
2279 | .BR 0 " (disabled)," | |
2280 | .BR 1 " (listening)," | |
2281 | .BR 2 " (learning)," | |
2282 | .BR 3 " (forwarding)," | |
2283 | .BR 4 " (blocking)." | |
2284 | ||
2285 | .BI priority " PRIO" | |
058d28b4 | 2286 | - set port priority (allowed values are between 0 and 63, inclusively). |
3dd4b893 PS |
2287 | |
2288 | .BI cost " COST" | |
058d28b4 | 2289 | - set port cost (allowed values are between 1 and 65535, inclusively). |
3dd4b893 PS |
2290 | |
2291 | .BR guard " { " on " | " off " }" | |
2292 | - block incoming BPDU packets on this port. | |
2293 | ||
2294 | .BR hairpin " { " on " | " off " }" | |
2295 | - enable hairpin mode on this port. This will allow incoming packets on this | |
2296 | port to be reflected back. | |
2297 | ||
2298 | .BR fastleave " { " on " | " off " }" | |
2299 | - enable multicast fast leave on this port. | |
2300 | ||
2301 | .BR root_block " { " on " | " off " }" | |
2302 | - block this port from becoming the bridge's root port. | |
2303 | ||
2304 | .BR learning " { " on " | " off " }" | |
2305 | - allow MAC address learning on this port. | |
2306 | ||
2307 | .BR flood " { " on " | " off " }" | |
2308 | - open the flood gates on this port, i.e. forward all unicast frames to this | |
2309 | port also. Requires | |
2310 | .BR proxy_arp " and " proxy_arp_wifi | |
2311 | to be turned off. | |
2312 | ||
2313 | .BR proxy_arp " { " on " | " off " }" | |
2314 | - enable proxy ARP on this port. | |
2315 | ||
2316 | .BR proxy_arp_wifi " { " on " | " off " }" | |
2317 | - enable proxy ARP on this port which meets extended requirements by IEEE | |
2318 | 802.11 and Hotspot 2.0 specifications. | |
2319 | ||
2320 | .BI mcast_router " MULTICAST_ROUTER" | |
2321 | - configure this port for having multicast routers attached. A port with a | |
2322 | multicast router will receive all multicast traffic. | |
2323 | .I MULTICAST_ROUTER | |
2324 | may be either | |
2325 | .B 0 | |
2326 | to disable multicast routers on this port, | |
2327 | .B 1 | |
2328 | to let the system detect the presence of of routers (this is the default), | |
2329 | .B 2 | |
2330 | to permanently enable multicast traffic forwarding on this port or | |
2331 | .B 3 | |
2332 | to enable multicast routers temporarily on this port, not depending on incoming | |
2333 | queries. | |
2334 | ||
2335 | .BR mcast_fast_leave " { " on " | " off " }" | |
2336 | - this is a synonym to the | |
2337 | .B fastleave | |
2338 | option above. | |
2339 | ||
9208b4e7 | 2340 | .BR mcast_flood " { " on " | " off " }" |
f76ad635 SH |
2341 | - controls whether a given port will flood multicast traffic for which |
2342 | there is no MDB entry. | |
9208b4e7 | 2343 | |
b5a754b1 | 2344 | .BR mcast_to_unicast " { " on " | " off " }" |
f76ad635 SH |
2345 | - controls whether a given port will replicate packets using unicast |
2346 | instead of multicast. By default this flag is off. | |
b5a754b1 | 2347 | |
fdbdd356 | 2348 | .BI group_fwd_mask " MASK " |
f76ad635 SH |
2349 | - set the group forward mask. This is the bitmask that is applied to |
2350 | decide whether to forward incoming frames destined to link-local | |
2351 | addresses, ie addresses of the form 01:80:C2:00:00:0X (defaults to | |
2352 | 0, ie the bridge does not forward any link-local frames coming on | |
2353 | this port). | |
fdbdd356 | 2354 | |
a5e3f41b | 2355 | .BR neigh_suppress " { " on " | " off " }" |
f76ad635 SH |
2356 | - controls whether neigh discovery (arp and nd) proxy and suppression |
2357 | is enabled on the port. By default this flag is off. | |
8cfde5c9 RP |
2358 | |
2359 | .BR vlan_tunnel " { " on " | " off " }" | |
f76ad635 SH |
2360 | - controls whether vlan to tunnel mapping is enabled on the port. By |
2361 | default this flag is off. | |
d13d52d0 NA |
2362 | |
2363 | .BI backup_port " DEVICE" | |
f76ad635 SH |
2364 | - if the port loses carrier all traffic will be redirected to the |
2365 | configured backup port | |
d13d52d0 NA |
2366 | |
2367 | .BR nobackup_port | |
2368 | - removes the currently configured backup port | |
a5e3f41b | 2369 | |
3dd4b893 PS |
2370 | .in -8 |
2371 | ||
2372 | .TP | |
2373 | Bonding Slave Support | |
2374 | For a link with master | |
2375 | .B bond | |
2376 | the following additional arguments are supported: | |
2377 | ||
2378 | .B "ip link set type bond_slave" | |
2379 | [ | |
2380 | .BI queue_id " ID" | |
2381 | ] | |
2382 | ||
2383 | .in +8 | |
2384 | .sp | |
2385 | .BI queue_id " ID" | |
2386 | - set the slave's queue ID (a 16bit unsigned value). | |
2387 | ||
2388 | .in -8 | |
2389 | ||
aa1b44ca | 2390 | .TP |
2391 | MACVLAN and MACVTAP Support | |
2392 | Modify list of allowed macaddr for link in source mode. | |
2393 | ||
2394 | .B "ip link set type { macvlan | macvap } " | |
2395 | [ | |
2396 | .BI macaddr " " "" COMMAND " " MACADDR " ..." | |
2397 | ] | |
2398 | ||
2399 | Commands: | |
2400 | .in +8 | |
2401 | .B add | |
2402 | - add MACADDR to allowed list | |
2403 | .sp | |
2404 | .B set | |
2405 | - replace allowed list | |
2406 | .sp | |
2407 | .B del | |
2408 | - remove MACADDR from allowed list | |
2409 | .sp | |
2410 | .B flush | |
2411 | - flush whole allowed list | |
2412 | .sp | |
2413 | .in -8 | |
2414 | ||
2415 | ||
761a1e60 CT |
2416 | .SS ip link show - display device attributes |
2417 | ||
2418 | .TP | |
2419 | .BI dev " NAME " (default) | |
2420 | .I NAME | |
2421 | specifies the network device to show. | |
761a1e60 CT |
2422 | |
2423 | .TP | |
2424 | .BI group " GROUP " | |
2425 | .I GROUP | |
2426 | specifies what group of devices to show. | |
2427 | ||
2428 | .TP | |
2429 | .B up | |
2430 | only display running interfaces. | |
2431 | ||
1b944148 VK |
2432 | .TP |
2433 | .BI master " DEVICE " | |
2434 | .I DEVICE | |
2435 | specifies the master device which enslaves devices to show. | |
2436 | ||
104444c2 DA |
2437 | .TP |
2438 | .BI vrf " NAME " | |
2439 | .I NAME | |
2440 | speficies the VRF which enslaves devices to show. | |
2441 | ||
712249d8 VK |
2442 | .TP |
2443 | .BI type " TYPE " | |
2444 | .I TYPE | |
2445 | specifies the type of devices to show. | |
2446 | ||
3462c116 PS |
2447 | Note that the type name is not checked against the list of supported types - |
2448 | instead it is sent as-is to the kernel. Later it is used to filter the returned | |
2449 | interface list by comparing it with the relevant attribute in case the kernel | |
2450 | didn't filter already. Therefore any string is accepted, but may lead to empty | |
2451 | output. | |
2452 | ||
94f1a22a NA |
2453 | .SS ip link xstats - display extended statistics |
2454 | ||
2455 | .TP | |
2456 | .BI type " TYPE " | |
2457 | .I TYPE | |
2458 | specifies the type of devices to display extended statistics for. | |
2459 | ||
837552b4 RS |
2460 | .SS ip link afstats - display address-family specific statistics |
2461 | ||
2462 | .TP | |
2463 | .BI dev " DEVICE " | |
2464 | .I DEVICE | |
2465 | specifies the device to display address-family statistics for. | |
2466 | ||
1f299e92 | 2467 | .SS ip link help - display help |
2468 | ||
2469 | .PP | |
2470 | .I "TYPE" | |
2471 | specifies which help of link type to dislpay. | |
2472 | ||
032b4f4d VK |
2473 | .SS |
2474 | .I GROUP | |
2475 | may be a number or a string from the file | |
699589f6 | 2476 | .B @SYSCONFDIR@/group |
032b4f4d VK |
2477 | which can be manually filled. |
2478 | ||
761a1e60 CT |
2479 | .SH "EXAMPLES" |
2480 | .PP | |
2481 | ip link show | |
2482 | .RS 4 | |
2483 | Shows the state of all network interfaces on the system. | |
2484 | .RE | |
2485 | .PP | |
712249d8 VK |
2486 | ip link show type bridge |
2487 | .RS 4 | |
2488 | Shows the bridge devices. | |
2489 | .RE | |
2490 | .PP | |
2491 | ip link show type vlan | |
2492 | .RS 4 | |
2493 | Shows the vlan devices. | |
2494 | .RE | |
2495 | .PP | |
417b2180 VK |
2496 | ip link show master br0 |
2497 | .RS 4 | |
2498 | Shows devices enslaved by br0 | |
2499 | .RE | |
2500 | .PP | |
761a1e60 CT |
2501 | ip link set dev ppp0 mtu 1400 |
2502 | .RS 4 | |
2503 | Change the MTU the ppp0 device. | |
2504 | .RE | |
2505 | .PP | |
2506 | ip link add link eth0 name eth0.10 type vlan id 10 | |
2507 | .RS 4 | |
2508 | Creates a new vlan device eth0.10 on device eth0. | |
2509 | .RE | |
2510 | .PP | |
2511 | ip link delete dev eth0.10 | |
2512 | .RS 4 | |
2513 | Removes vlan device. | |
2514 | .RE | |
2515 | ||
1f299e92 | 2516 | ip link help gre |
2517 | .RS 4 | |
2518 | Display help for the gre link type. | |
90f1df71 TH |
2519 | .RE |
2520 | .PP | |
2521 | ip link add name tun1 type ipip remote 192.168.1.1 | |
2522 | local 192.168.1.2 ttl 225 encap gue encap-sport auto | |
2523 | encap-dport 5555 encap-csum encap-remcsum | |
2524 | .RS 4 | |
2525 | Creates an IPIP that is encapsulated with Generic UDP Encapsulation, | |
2526 | and the outer UDP checksum and remote checksum offload are enabled. | |
c7272ca7 DB |
2527 | .RE |
2528 | .PP | |
2529 | ip link set dev eth0 xdp obj prog.o | |
2530 | .RS 4 | |
2531 | Attaches a XDP/BPF program to device eth0, where the program is | |
2532 | located in prog.o, section "prog" (default section). In case a | |
2533 | XDP/BPF program is already attached, throw an error. | |
2534 | .RE | |
2535 | .PP | |
2536 | ip -force link set dev eth0 xdp obj prog.o sec foo | |
2537 | .RS 4 | |
2538 | Attaches a XDP/BPF program to device eth0, where the program is | |
2539 | located in prog.o, section "foo". In case a XDP/BPF program is | |
2540 | already attached, it will be overridden by the new one. | |
2541 | .RE | |
2542 | .PP | |
2543 | ip -force link set dev eth0 xdp pinned /sys/fs/bpf/foo | |
2544 | .RS 4 | |
2545 | Attaches a XDP/BPF program to device eth0, where the program was | |
2546 | previously pinned as an object node into BPF file system under | |
2547 | name foo. | |
2548 | .RE | |
2549 | .PP | |
2550 | ip link set dev eth0 xdp off | |
2551 | .RS 4 | |
2552 | If a XDP/BPF program is attached on device eth0, detach it and | |
2553 | effectively turn off XDP for device eth0. | |
2c0feda8 LB |
2554 | .RE |
2555 | .PP | |
2556 | ip link add link wpan0 lowpan0 type lowpan | |
2557 | .RS 4 | |
2558 | Creates a 6LoWPAN interface named lowpan0 on the underlying | |
2559 | IEEE 802.15.4 device wpan0. | |
1f299e92 | 2560 | .RE |
28976362 WT |
2561 | .PP |
2562 | ip link add dev ip6erspan11 type ip6erspan seq key 102 | |
2563 | local fc00:100::2 remote fc00:100::1 | |
2564 | erspan_ver 2 erspan_dir ingress erspan_hwid 17 | |
2565 | .RS 4 | |
2566 | Creates a IP6ERSPAN version 2 interface named ip6erspan00. | |
2567 | .RE | |
1f299e92 | 2568 | |
761a1e60 CT |
2569 | .SH SEE ALSO |
2570 | .br | |
d5910297 | 2571 | .BR ip (8), |
e612883c | 2572 | .BR ip-netns (8), |
ab872442 VK |
2573 | .BR ethtool (8), |
2574 | .BR iptables (8) | |
761a1e60 CT |
2575 | |
2576 | .SH AUTHOR | |
2577 | Original Manpage by Michail Litvak <mci@owl.openwall.com> |