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