]>
Commit | Line | Data |
---|---|---|
d04bc300 SH |
1 | .TH BRIDGE 8 "1 August 2012" "iproute2" "Linux" |
2 | .SH NAME | |
3 | bridge \- show / manipulate bridge addresses and devices | |
4 | .SH SYNOPSIS | |
5 | ||
6 | .ad l | |
7 | .in +8 | |
8 | .ti -8 | |
9 | .B bridge | |
10 | .RI "[ " OPTIONS " ] " OBJECT " { " COMMAND " | " | |
11 | .BR help " }" | |
12 | .sp | |
13 | ||
14 | .ti -8 | |
15 | .IR OBJECT " := { " | |
54e9c3a3 | 16 | .BR link " | " fdb " | " mdb " | " vlan " | " monitor " }" |
d04bc300 SH |
17 | .sp |
18 | ||
19 | .ti -8 | |
20 | .IR OPTIONS " := { " | |
21 | \fB\-V\fR[\fIersion\fR] | | |
527910c8 | 22 | \fB\-s\fR[\fItatistics\fR] | |
db726379 RP |
23 | \fB\-n\fR[\fIetns\fR] name | |
24 | \fB\-b\fR[\fIatch\fR] filename | | |
3a1ca9a5 | 25 | \fB\-c\fR[\folor\fR] | |
01842eb5 | 26 | \fB\-p\fR[\fIretty\fR] | |
05758f5c PS |
27 | \fB\-j\fR[\fIson\fR] | |
28 | \fB\-o\fR[\fIneline\fr] } | |
aa2f1335 VY |
29 | |
30 | .ti -8 | |
31 | .BR "bridge link set" | |
fc31817d | 32 | .B dev |
aa2f1335 VY |
33 | .IR DEV |
34 | .IR " [ " | |
fc31817d | 35 | .B cost |
aa2f1335 | 36 | .IR COST " ] [ " |
fc31817d PS |
37 | .B priority |
38 | .IR PRIO " ] [ " | |
39 | .B state | |
d13d52d0 | 40 | .IR STATE " ] [ " |
aa2f1335 VY |
41 | .BR guard " { " on " | " off " } ] [ " |
42 | .BR hairpin " { " on " | " off " } ] [ " | |
43 | .BR fastleave " { " on " | " off " } ] [ " | |
44 | .BR root_block " { " on " | " off " } ] [ " | |
f0f4ab60 | 45 | .BR learning " { " on " | " off " } ] [ " |
674bb438 | 46 | .BR learning_sync " { " on " | " off " } ] [ " |
f0f4ab60 | 47 | .BR flood " { " on " | " off " } ] [ " |
22a98f51 | 48 | .BR hwmode " { " vepa " | " veb " } ] [ " |
9208b4e7 | 49 | .BR mcast_flood " { " on " | " off " } ] [ " |
b5a754b1 | 50 | .BR mcast_to_unicast " { " on " | " off " } ] [ " |
8cfde5c9 RP |
51 | .BR neigh_suppress " { " on " | " off " } ] [ " |
52 | .BR vlan_tunnel " { " on " | " off " } ] [ " | |
05001bcf | 53 | .BR isolated " { " on " | " off " } ] [ " |
d13d52d0 NA |
54 | .B backup_port |
55 | .IR DEVICE " ] [" | |
56 | .BR nobackup_port " ] [ " | |
9208b4e7 | 57 | .BR self " ] [ " master " ]" |
aa2f1335 VY |
58 | |
59 | .ti -8 | |
60 | .BR "bridge link" " [ " show " ] [ " | |
fc31817d | 61 | .B dev |
aa2f1335 | 62 | .IR DEV " ]" |
d04bc300 SH |
63 | |
64 | .ti -8 | |
6e2e2cf0 | 65 | .BR "bridge fdb" " { " add " | " append " | " del " | " replace " } " |
d04bc300 | 66 | .I LLADDR |
fc31817d | 67 | .B dev |
d04bc300 | 68 | .IR DEV " { " |
c6d0cfb5 | 69 | .BR local " | " static " | " dynamic " } [ " |
c3ded6e4 | 70 | .BR self " ] [ " master " ] [ " router " ] [ " use " ] [ " extern_learn " ] [ " sticky " ] [ " |
fc31817d | 71 | .B dst |
7578ae88 | 72 | .IR IPADDR " ] [ " |
c5b176e5 | 73 | .B src_vni |
df126215 | 74 | .IR VNI " ] [" |
7578ae88 TR |
75 | .B vni |
76 | .IR VNI " ] [" | |
77 | .B port | |
78 | .IR PORT " ] [" | |
79 | .B via | |
80 | .IR DEVICE " ]" | |
d04bc300 SH |
81 | |
82 | .ti -8 | |
83 | .BR "bridge fdb" " [ " show " ] [ " | |
fc31817d | 84 | .B dev |
7f10090b NA |
85 | .IR DEV " ] [ " |
86 | .B br | |
87 | .IR BRDEV " ] [ " | |
88 | .B brport | |
89 | .IR DEV " ] [ " | |
90 | .B vlan | |
91 | .IR VID " ] [ " | |
92 | .B state | |
93 | .IR STATE " ]" | |
d04bc300 | 94 | |
4ed5ad7b RP |
95 | .ti -8 |
96 | .B bridge fdb get | |
97 | .I LLADDR " [ " | |
98 | .B dev | |
99 | .IR DEV " ] [ " | |
100 | .B br | |
101 | .IR BRDEV " ] [ " | |
102 | .B vlan | |
103 | .IR VID " ] [" | |
104 | .BR self " ] [ " master " ]" | |
105 | ||
54e9c3a3 PP |
106 | .ti -8 |
107 | .BR "bridge mdb" " { " add " | " del " } " | |
fc31817d | 108 | .B dev |
54e9c3a3 PP |
109 | .IR DEV |
110 | .B port | |
111 | .IR PORT | |
112 | .B grp | |
113 | .IR GROUP " [ " | |
6aac8617 NA |
114 | .BR permanent " | " temp " ] [ " |
115 | .B vid | |
116 | .IR VID " ] " | |
54e9c3a3 PP |
117 | |
118 | .ti -8 | |
119 | .BR "bridge mdb show " [ " | |
fc31817d | 120 | .B dev |
54e9c3a3 PP |
121 | .IR DEV " ]" |
122 | ||
ab938710 VY |
123 | .ti -8 |
124 | .BR "bridge vlan" " { " add " | " del " } " | |
fc31817d | 125 | .B dev |
ab938710 | 126 | .IR DEV |
fc31817d | 127 | .B vid |
ab938710 | 128 | .IR VID " [ " |
8652eeb3 RP |
129 | .BR tunnel_info |
130 | .IR TUNNEL_ID " ] [ " | |
fc31817d PS |
131 | .BR pvid " ] [ " untagged " ] [ " |
132 | .BR self " ] [ " master " ] " | |
ab938710 VY |
133 | |
134 | .ti -8 | |
8652eeb3 | 135 | .BR "bridge vlan" " [ " show " | " tunnelshow " ] [ " |
fc31817d | 136 | .B dev |
ab938710 VY |
137 | .IR DEV " ]" |
138 | ||
d04bc300 | 139 | .ti -8 |
54e9c3a3 | 140 | .BR "bridge monitor" " [ " all " | " neigh " | " link " | " mdb " ]" |
d04bc300 SH |
141 | |
142 | .SH OPTIONS | |
143 | ||
144 | .TP | |
145 | .BR "\-V" , " -Version" | |
146 | print the version of the | |
147 | .B bridge | |
148 | utility and exit. | |
149 | ||
150 | .TP | |
151 | .BR "\-s" , " \-stats", " \-statistics" | |
a89d5329 | 152 | output more information. If this option |
49572501 | 153 | is given multiple times, the amount of information increases. |
d04bc300 SH |
154 | As a rule, the information is statistics or some time values. |
155 | ||
ba037267 NA |
156 | .TP |
157 | .BR "\-d" , " \-details" | |
158 | print detailed information about MDB router ports. | |
159 | ||
527910c8 VK |
160 | .TP |
161 | .BR "\-n" , " \-net" , " \-netns " <NETNS> | |
162 | switches | |
163 | .B bridge | |
164 | to the specified network namespace | |
165 | .IR NETNS . | |
166 | Actually it just simplifies executing of: | |
167 | ||
168 | .B ip netns exec | |
169 | .IR NETNS | |
170 | .B bridge | |
171 | .RI "[ " OPTIONS " ] " OBJECT " { " COMMAND " | " | |
172 | .BR help " }" | |
173 | ||
174 | to | |
175 | ||
176 | .B bridge | |
177 | .RI "-n[etns] " NETNS " [ " OPTIONS " ] " OBJECT " { " COMMAND " | " | |
178 | .BR help " }" | |
179 | ||
9de8c6d9 WK |
180 | .TP |
181 | .BR "\-b", " \-batch " <FILENAME> | |
182 | Read commands from provided file or standard input and invoke them. | |
183 | First failure will cause termination of bridge command. | |
184 | ||
185 | .TP | |
186 | .BR "\-force" | |
187 | Don't terminate bridge command on errors in batch mode. | |
188 | If there were any errors during execution of the commands, the application | |
189 | return code will be non zero. | |
d04bc300 | 190 | |
db726379 | 191 | .TP |
ff1ab8ed PS |
192 | .BR \-c [ color ][ = { always | auto | never } |
193 | Configure color output. If parameter is omitted or | |
194 | .BR always , | |
195 | color output is enabled regardless of stdout state. If parameter is | |
196 | .BR auto , | |
197 | stdout is checked to be a terminal before enabling color output. If parameter is | |
198 | .BR never , | |
199 | color output is disabled. If specified multiple times, the last one takes | |
200 | precedence. This flag is ignored if | |
201 | .B \-json | |
202 | is also given. | |
db726379 | 203 | |
01842eb5 | 204 | .TP |
3a1ca9a5 SH |
205 | .BR "\-j", " \-json" |
206 | Output results in JavaScript Object Notation (JSON). | |
207 | ||
208 | .TP | |
209 | .BR "\-p", " \-pretty" | |
01842eb5 SH |
210 | When combined with -j generate a pretty JSON output. |
211 | ||
05758f5c PS |
212 | .TP |
213 | .BR "\-o", " \-oneline" | |
214 | output each record on a single line, replacing line feeds | |
215 | with the | |
216 | .B '\e' | |
217 | character. This is convenient when you want to count records | |
218 | with | |
219 | .BR wc (1) | |
220 | or to | |
221 | .BR grep (1) | |
222 | the output. | |
223 | ||
01842eb5 | 224 | |
d04bc300 SH |
225 | .SH BRIDGE - COMMAND SYNTAX |
226 | ||
227 | .SS | |
228 | .I OBJECT | |
229 | ||
aa2f1335 VY |
230 | .TP |
231 | .B link | |
232 | - Bridge port. | |
233 | ||
d04bc300 | 234 | .TP |
5699275b | 235 | .B fdb |
d04bc300 SH |
236 | - Forwarding Database entry. |
237 | ||
54e9c3a3 PP |
238 | .TP |
239 | .B mdb | |
240 | - Multicast group database entry. | |
241 | ||
ab938710 VY |
242 | .TP |
243 | .B vlan | |
244 | - VLAN filter list. | |
245 | ||
d04bc300 SH |
246 | .SS |
247 | .I COMMAND | |
248 | ||
249 | Specifies the action to perform on the object. | |
250 | The set of possible actions depends on the object type. | |
251 | As a rule, it is possible to | |
252 | .BR "add" , " delete" | |
253 | and | |
254 | .B show | |
255 | (or | |
256 | .B list | |
257 | ) objects, but some objects do not allow all of these operations | |
a89d5329 | 258 | or have some additional commands. The |
d04bc300 | 259 | .B help |
a89d5329 | 260 | command is available for all objects. It prints |
d04bc300 SH |
261 | out a list of available commands and argument syntax conventions. |
262 | .sp | |
263 | If no command is given, some default command is assumed. | |
264 | Usually it is | |
265 | .B list | |
266 | or, if the objects of this class cannot be listed, | |
267 | .BR "help" . | |
268 | ||
aa2f1335 VY |
269 | .SH bridge link - bridge port |
270 | ||
271 | .B link | |
272 | objects correspond to the port devices of the bridge. | |
273 | ||
274 | .P | |
275 | The corresponding commands set and display port status and bridge specific | |
276 | attributes. | |
277 | ||
278 | .SS bridge link set - set bridge specific attributes on a port | |
279 | ||
280 | .TP | |
281 | .BI dev " NAME " | |
282 | interface name of the bridge port | |
283 | ||
284 | .TP | |
285 | .BI cost " COST " | |
286 | the STP path cost of the specified port. | |
287 | ||
288 | .TP | |
289 | .BI priority " PRIO " | |
a89d5329 PŠ |
290 | the STP port priority. The priority value is an unsigned 8-bit quantity |
291 | (number between 0 and 255). This metric is used in the designated port an | |
b831c5ff | 292 | droot port selection algorithms. |
aa2f1335 VY |
293 | |
294 | .TP | |
295 | .BI state " STATE " | |
8d5d91fd | 296 | the operation state of the port. Except state 0 (disable STP or BPDU filter feature), |
420febf9 | 297 | this is primarily used by user space STP/RSTP |
8d5d91fd | 298 | implementation. One may enter port state name (case insensitive), or one of the |
a89d5329 | 299 | numbers below. Negative inputs are ignored, and unrecognized names return an |
6b8c871d | 300 | error. |
aa2f1335 VY |
301 | |
302 | .B 0 | |
8d5d91fd | 303 | - port is in STP |
420febf9 | 304 | .B DISABLED |
8d5d91fd | 305 | state. Make this port completely inactive for STP. This is also called |
420febf9 BR |
306 | BPDU filter and could be used to disable STP on an untrusted port, like |
307 | a leaf virtual devices. | |
aa2f1335 VY |
308 | .sp |
309 | ||
310 | .B 1 | |
8d5d91fd | 311 | - port is in STP |
420febf9 BR |
312 | .B LISTENING |
313 | state. Only valid if STP is enabled on the bridge. In this | |
3aa8f8cb | 314 | state the port listens for STP BPDUs and drops all other traffic frames. |
aa2f1335 VY |
315 | .sp |
316 | ||
317 | .B 2 | |
8d5d91fd | 318 | - port is in STP |
420febf9 BR |
319 | .B LEARNING |
320 | state. Only valid if STP is enabled on the bridge. In this | |
aa2f1335 | 321 | state the port will accept traffic only for the purpose of updating MAC |
ac0817ef | 322 | address tables. |
aa2f1335 VY |
323 | .sp |
324 | ||
325 | .B 3 | |
8d5d91fd | 326 | - port is in STP |
420febf9 BR |
327 | .B FORWARDING |
328 | state. Port is fully active. | |
aa2f1335 VY |
329 | .sp |
330 | ||
331 | .B 4 | |
8d5d91fd | 332 | - port is in STP |
420febf9 BR |
333 | .B BLOCKING |
334 | state. Only valid if STP is enabled on the bridge. This state | |
a89d5329 | 335 | is used during the STP election process. In this state, port will only process |
aa2f1335 VY |
336 | STP BPDUs. |
337 | .sp | |
338 | ||
339 | .TP | |
340 | .BR "guard on " or " guard off " | |
400b5404 | 341 | Controls whether STP BPDUs will be processed by the bridge port. By default, |
a89d5329 | 342 | the flag is turned off allowed BPDU processing. Turning this flag on will |
19bbebc4 BR |
343 | disables |
344 | the bridge port if a STP BPDU packet is received. | |
345 | ||
346 | If running Spanning Tree on bridge, hostile devices on the network | |
347 | may send BPDU on a port and cause network failure. Setting | |
348 | .B guard on | |
349 | will detect and stop this by disabling the port. | |
350 | The port will be restarted if link is brought down, or | |
351 | removed and reattached. For example if guard is enable on | |
352 | eth0: | |
353 | ||
354 | .B ip link set dev eth0 down; ip link set dev eth0 up | |
aa2f1335 VY |
355 | |
356 | .TP | |
357 | .BR "hairpin on " or " hairpin off " | |
358 | Controls whether traffic may be send back out of the port on which it was | |
1cad8f8d BR |
359 | received. This option is also called reflective relay mode, and is used to support |
360 | basic VEPA (Virtual Ethernet Port Aggregator) capabilities. | |
361 | By default, this flag is turned off and the bridge will not forward | |
aa2f1335 VY |
362 | traffic back out of the receiving port. |
363 | ||
364 | .TP | |
365 | .BR "fastleave on " or " fastleave off " | |
366 | This flag allows the bridge to immediately stop multicast traffic on a port | |
a89d5329 PŠ |
367 | that receives IGMP Leave message. It is only used with IGMP snooping is |
368 | enabled on the bridge. By default the flag is off. | |
aa2f1335 VY |
369 | |
370 | .TP | |
371 | .BR "root_block on " or " root_block off " | |
a89d5329 PŠ |
372 | Controls whether a given port is allowed to become root port or not. Only used |
373 | when STP is enabled on the bridge. By default the flag is off. | |
aa2f1335 | 374 | |
498883a0 BR |
375 | This feature is also called root port guard. |
376 | If BPDU is received from a leaf (edge) port, it should not | |
377 | be elected as root port. This could be used if using STP on a bridge and the downstream bridges are not fully | |
378 | trusted; this prevents a hostile guest from rerouting traffic. | |
379 | ||
f0f4ab60 VY |
380 | .TP |
381 | .BR "learning on " or " learning off " | |
382 | Controls whether a given port will learn MAC addresses from received traffic or | |
a89d5329 PŠ |
383 | not. If learning if off, the bridge will end up flooding any traffic for which |
384 | it has no FDB entry. By default this flag is on. | |
f0f4ab60 | 385 | |
674bb438 SF |
386 | .TP |
387 | .BR "learning_sync on " or " learning_sync off " | |
388 | Controls whether a given port will sync MAC addresses learned on device port to | |
389 | bridge FDB. | |
390 | ||
f0f4ab60 | 391 | .TP |
02723cf2 | 392 | .BR "flood on " or " flood off " |
a89d5329 | 393 | Controls whether a given port will flood unicast traffic for which there is no FDB entry. By default this flag is on. |
f0f4ab60 | 394 | |
aa2f1335 VY |
395 | .TP |
396 | .BI hwmode | |
397 | Some network interface cards support HW bridge functionality and they may be | |
a89d5329 | 398 | configured in different modes. Currently support modes are: |
aa2f1335 VY |
399 | |
400 | .B vepa | |
401 | - Data sent between HW ports is sent on the wire to the external | |
402 | switch. | |
403 | ||
404 | .B veb | |
405 | - bridging happens in hardware. | |
406 | ||
9208b4e7 NA |
407 | .TP |
408 | .BR "mcast_flood on " or " mcast_flood off " | |
f76ad635 SH |
409 | Controls whether a given port will flood multicast traffic for which |
410 | there is no MDB entry. By default this flag is on. | |
9208b4e7 | 411 | |
b5a754b1 TJ |
412 | .TP |
413 | .BR "mcast_to_unicast on " or " mcast_to_unicast off " | |
f76ad635 SH |
414 | Controls whether a given port will replicate packets using unicast |
415 | instead of multicast. By default this flag is off. | |
b5a754b1 | 416 | |
706f7d35 BR |
417 | This is done by copying the packet per host and |
418 | changing the multicast destination MAC to a unicast one accordingly. | |
419 | ||
420 | .BR mcast_to_unicast | |
421 | works on top of the multicast snooping feature of | |
422 | the bridge. Which means unicast copies are only delivered to hosts which | |
423 | are interested in it and signalized this via IGMP/MLD reports | |
424 | previously. | |
425 | ||
426 | This feature is intended for interface types which have a more reliable | |
427 | and/or efficient way to deliver unicast packets than broadcast ones | |
428 | (e.g. WiFi). | |
429 | ||
430 | However, it should only be enabled on interfaces where no IGMPv2/MLDv1 | |
431 | report suppression takes place. IGMP/MLD report suppression issue is usually | |
432 | overcome by the network daemon (supplicant) enabling AP isolation and | |
433 | by that separating all STAs. | |
434 | ||
b831c5ff | 435 | Delivery of STA-to-STA IP multicast is made possible again by |
706f7d35 BR |
436 | enabling and utilizing the bridge hairpin mode, which considers the |
437 | incoming port as a potential outgoing port, too (see | |
438 | .B hairpin | |
439 | option). | |
440 | Hairpin mode is performed after multicast snooping, therefore leading to | |
441 | only deliver reports to STAs running a multicast router. | |
442 | ||
41973a47 RP |
443 | .TP |
444 | .BR "neigh_suppress on " or " neigh_suppress off " | |
f76ad635 SH |
445 | Controls whether neigh discovery (arp and nd) proxy and suppression is |
446 | enabled on the port. By default this flag is off. | |
41973a47 | 447 | |
8cfde5c9 RP |
448 | .TP |
449 | .BR "vlan_tunnel on " or " vlan_tunnel off " | |
f76ad635 SH |
450 | Controls whether vlan to tunnel mapping is enabled on the port. By |
451 | default this flag is off. | |
8cfde5c9 | 452 | |
05001bcf NA |
453 | .TP |
454 | .BR "isolated on " or " isolated off " | |
f76ad635 SH |
455 | Controls whether a given port will be isolated, which means it will be |
456 | able to communicate with non-isolated ports only. By default this | |
457 | flag is off. | |
05001bcf | 458 | |
d13d52d0 NA |
459 | .TP |
460 | .BI backup_port " DEVICE" | |
f76ad635 SH |
461 | If the port loses carrier all traffic will be redirected to the |
462 | configured backup port | |
d13d52d0 NA |
463 | |
464 | .TP | |
465 | .BR nobackup_port | |
466 | Removes the currently configured backup port | |
467 | ||
22a98f51 RP |
468 | .TP |
469 | .BI self | |
470 | link setting is configured on specified physical device | |
471 | ||
472 | .TP | |
473 | .BI master | |
474 | link setting is configured on the software bridge (default) | |
475 | ||
25bc3d3d SA |
476 | .TP |
477 | .BR "\-t" , " \-timestamp" | |
478 | display current time when using monitor option. | |
22a98f51 | 479 | |
0641bed8 | 480 | .SS bridge link show - list ports configuration for all bridges. |
aa2f1335 | 481 | |
0641bed8 AC |
482 | This command displays port configuration and flags for all bridges. |
483 | ||
484 | To display port configuration and flags for a specific bridge, use the | |
485 | "ip link show master <bridge_device>" command. | |
aa2f1335 | 486 | |
d04bc300 SH |
487 | .SH bridge fdb - forwarding database management |
488 | ||
489 | .B fdb | |
fc31817d | 490 | objects contain known Ethernet addresses on a link. |
d04bc300 SH |
491 | |
492 | .P | |
493 | The corresponding commands display fdb entries, add new entries, | |
7578ae88 | 494 | append entries, |
d04bc300 SH |
495 | and delete old ones. |
496 | ||
d611682a | 497 | .SS bridge fdb add - add a new fdb entry |
d04bc300 | 498 | |
d611682a | 499 | This command creates a new fdb entry. |
d04bc300 SH |
500 | |
501 | .TP | |
7578ae88 | 502 | .BI "LLADDR" |
d04bc300 SH |
503 | the Ethernet MAC address. |
504 | ||
505 | .TP | |
7578ae88 | 506 | .BI dev " DEV" |
d04bc300 SH |
507 | the interface to which this address is associated. |
508 | ||
c6d0cfb5 RP |
509 | .B local |
510 | - is a local permanent fdb entry | |
511 | .sp | |
512 | ||
513 | .B static | |
514 | - is a static (no arp) fdb entry | |
515 | .sp | |
516 | ||
517 | .B dynamic | |
518 | - is a dynamic reachable age-able fdb entry | |
519 | .sp | |
520 | ||
d611682a | 521 | .B self |
cd8df30b RP |
522 | - the address is associated with the port drivers fdb. Usually hardware. |
523 | .sp | |
524 | ||
525 | .B master | |
526 | - the address is associated with master devices fdb. Usually software (default). | |
d611682a JF |
527 | .sp |
528 | ||
7578ae88 TR |
529 | .B router |
530 | - the destination address is associated with a router. | |
531 | Valid if the referenced device is a VXLAN type device and has | |
b831c5ff | 532 | route short circuit enabled. |
7578ae88 TR |
533 | .sp |
534 | ||
cd8df30b RP |
535 | .B use |
536 | - the address is in use. User space can use this option to | |
537 | indicate to the kernel that the fdb entry is in use. | |
538 | .sp | |
539 | ||
b4f84bf8 RP |
540 | .B extern_learn |
541 | - this entry was learned externally. This option can be used to | |
542 | indicate to the kernel that an entry was hardware or user-space | |
543 | controller learnt dynamic entry. Kernel will not age such an entry. | |
544 | .sp | |
545 | ||
c3ded6e4 NA |
546 | .B sticky |
547 | - this entry will not change its port due to learning. | |
548 | .sp | |
549 | ||
d04bc300 | 550 | .in -8 |
7578ae88 TR |
551 | The next command line parameters apply only |
552 | when the specified device | |
553 | .I DEV | |
554 | is of type VXLAN. | |
555 | .TP | |
556 | .BI dst " IPADDR" | |
557 | the IP address of the destination | |
558 | VXLAN tunnel endpoint where the Ethernet MAC ADDRESS resides. | |
559 | ||
c5b176e5 | 560 | .TP |
df126215 | 561 | .BI src_vni " VNI" |
c5b176e5 RP |
562 | the src VNI Network Identifier (or VXLAN Segment ID) |
563 | this entry belongs to. Used only when the vxlan device is in | |
564 | external or collect metadata mode. If omitted the value specified at | |
565 | vxlan device creation will be used. | |
566 | ||
7578ae88 TR |
567 | .TP |
568 | .BI vni " VNI" | |
569 | the VXLAN VNI Network Identifier (or VXLAN Segment ID) | |
570 | to use to connect to the remote VXLAN tunnel endpoint. | |
571 | If omitted the value specified at vxlan device creation | |
572 | will be used. | |
573 | ||
574 | .TP | |
575 | .BI port " PORT" | |
576 | the UDP destination PORT number to use to connect to the | |
577 | remote VXLAN tunnel endpoint. | |
578 | If omitted the default value is used. | |
579 | ||
580 | .TP | |
581 | .BI via " DEVICE" | |
582 | device name of the outgoing interface for the | |
583 | VXLAN device driver to reach the | |
5699275b | 584 | remote VXLAN tunnel endpoint. |
7578ae88 TR |
585 | |
586 | .SS bridge fdb append - append a forwarding database entry | |
587 | This command adds a new fdb entry with an already known | |
588 | .IR LLADDR . | |
589 | Valid only for multicast link layer addresses. | |
590 | The command adds support for broadcast and multicast | |
591 | Ethernet MAC addresses. | |
592 | The Ethernet MAC address is added multiple times into | |
593 | the forwarding database and the vxlan device driver | |
594 | sends a copy of the data packet to each entry found. | |
595 | ||
596 | .PP | |
597 | The arguments are the same as with | |
fc31817d | 598 | .BR "bridge fdb add" . |
d04bc300 SH |
599 | |
600 | .SS bridge fdb delete - delete a forwarding database entry | |
601 | This command removes an existing fdb entry. | |
602 | ||
603 | .PP | |
604 | The arguments are the same as with | |
fc31817d | 605 | .BR "bridge fdb add" . |
d04bc300 | 606 | |
6e2e2cf0 PS |
607 | .SS bridge fdb replace - replace a forwarding database entry |
608 | If no matching entry is found, a new one will be created instead. | |
609 | ||
610 | .PP | |
611 | The arguments are the same as with | |
fc31817d | 612 | .BR "bridge fdb add" . |
6e2e2cf0 | 613 | |
d04bc300 SH |
614 | .SS bridge fdb show - list forwarding entries. |
615 | ||
49572501 | 616 | This command displays the current forwarding table. |
d04bc300 SH |
617 | |
618 | .PP | |
619 | With the | |
620 | .B -statistics | |
a89d5329 | 621 | option, the command becomes verbose. It prints out the last updated |
d04bc300 SH |
622 | and last used time for each entry. |
623 | ||
4ed5ad7b RP |
624 | .SS bridge fdb get - get bridge forwarding entry. |
625 | ||
626 | lookup a bridge forwarding table entry. | |
627 | ||
628 | .TP | |
629 | .BI "LLADDR" | |
630 | the Ethernet MAC address. | |
631 | ||
632 | .TP | |
633 | .BI dev " DEV" | |
634 | the interface to which this address is associated. | |
635 | ||
636 | .TP | |
637 | .BI brport " DEV" | |
638 | the bridge port to which this address is associated. same as dev above. | |
639 | ||
640 | .TP | |
641 | .BI br " DEV" | |
642 | the bridge to which this address is associated. | |
643 | ||
644 | .TP | |
645 | .B self | |
646 | - the address is associated with the port drivers fdb. Usually hardware. | |
647 | ||
648 | .TP | |
649 | .B master | |
650 | - the address is associated with master devices fdb. Usually software (default). | |
651 | .sp | |
652 | ||
54e9c3a3 PP |
653 | .SH bridge mdb - multicast group database management |
654 | ||
655 | .B mdb | |
656 | objects contain known IP multicast group addresses on a link. | |
657 | ||
658 | .P | |
659 | The corresponding commands display mdb entries, add new entries, | |
660 | and delete old ones. | |
661 | ||
662 | .SS bridge mdb add - add a new multicast group database entry | |
663 | ||
664 | This command creates a new mdb entry. | |
665 | ||
666 | .TP | |
667 | .BI dev " DEV" | |
668 | the interface where this group address is associated. | |
669 | ||
670 | .TP | |
671 | .BI port " PORT" | |
672 | the port whose link is known to have members of this multicast group. | |
673 | ||
674 | .TP | |
675 | .BI grp " GROUP" | |
676 | the IP multicast group address whose members reside on the link connected to | |
677 | the port. | |
678 | ||
679 | .B permanent | |
680 | - the mdb entry is permanent | |
681 | .sp | |
682 | ||
683 | .B temp | |
684 | - the mdb entry is temporary (default) | |
685 | .sp | |
686 | ||
6aac8617 NA |
687 | .TP |
688 | .BI vid " VID" | |
689 | the VLAN ID which is known to have members of this multicast group. | |
690 | ||
54e9c3a3 PP |
691 | .in -8 |
692 | .SS bridge mdb delete - delete a multicast group database entry | |
693 | This command removes an existing mdb entry. | |
694 | ||
695 | .PP | |
696 | The arguments are the same as with | |
697 | .BR "bridge mdb add" . | |
698 | ||
699 | .SS bridge mdb show - list multicast group database entries | |
700 | ||
701 | This command displays the current multicast group membership table. The table | |
702 | is populated by IGMP and MLD snooping in the bridge driver automatically. It | |
703 | can be altered by | |
704 | .B bridge mdb add | |
705 | and | |
706 | .B bridge mdb del | |
707 | commands manually too. | |
708 | ||
709 | .TP | |
710 | .BI dev " DEV" | |
711 | the interface only whose entries should be listed. Default is to list all | |
712 | bridge interfaces. | |
713 | ||
714 | .PP | |
715 | With the | |
716 | .B -details | |
a89d5329 | 717 | option, the command becomes verbose. It prints out the ports known to have |
54e9c3a3 PP |
718 | a connected router. |
719 | ||
05d4f64d NA |
720 | .PP |
721 | With the | |
722 | .B -statistics | |
ba037267 | 723 | option, the command displays timer values for mdb and router port entries. |
05d4f64d | 724 | |
ab938710 VY |
725 | .SH bridge vlan - VLAN filter list |
726 | ||
727 | .B vlan | |
728 | objects contain known VLAN IDs for a link. | |
729 | ||
730 | .P | |
731 | The corresponding commands display vlan filter entries, add new entries, | |
732 | and delete old ones. | |
733 | ||
734 | .SS bridge vlan add - add a new vlan filter entry | |
735 | ||
736 | This command creates a new vlan filter entry. | |
737 | ||
738 | .TP | |
739 | .BI dev " NAME" | |
740 | the interface with which this vlan is associated. | |
741 | ||
742 | .TP | |
743 | .BI vid " VID" | |
744 | the VLAN ID that identifies the vlan. | |
745 | ||
8652eeb3 RP |
746 | .TP |
747 | .BI tunnel_info " TUNNEL_ID" | |
f76ad635 SH |
748 | the TUNNEL ID that maps to this vlan. The tunnel id is set in |
749 | dst_metadata for every packet that belongs to this vlan (applicable to | |
750 | bridge ports with vlan_tunnel flag set). | |
8652eeb3 | 751 | |
ab938710 VY |
752 | .TP |
753 | .BI pvid | |
754 | the vlan specified is to be considered a PVID at ingress. | |
755 | Any untagged frames will be assigned to this VLAN. | |
756 | ||
757 | .TP | |
758 | .BI untagged | |
759 | the vlan specified is to be treated as untagged on egress. | |
760 | ||
761 | .TP | |
762 | .BI self | |
a89d5329 | 763 | the vlan is configured on the specified physical device. Required if the |
ab938710 VY |
764 | device is the bridge device. |
765 | ||
766 | .TP | |
767 | .BI master | |
6274b0b7 | 768 | the vlan is configured on the software bridge (default). |
ab938710 | 769 | |
296cee6f VD |
770 | .SS bridge vlan delete - delete a vlan filter entry |
771 | This command removes an existing vlan filter entry. | |
ab938710 VY |
772 | |
773 | .PP | |
774 | The arguments are the same as with | |
775 | .BR "bridge vlan add". | |
776 | The | |
777 | .BR "pvid " and " untagged" | |
778 | flags are ignored. | |
779 | ||
780 | .SS bridge vlan show - list vlan configuration. | |
781 | ||
782 | This command displays the current VLAN filter table. | |
783 | ||
7abf5de6 NA |
784 | .PP |
785 | With the | |
786 | .B -statistics | |
787 | option, the command displays per-vlan traffic statistics. | |
788 | ||
8652eeb3 RP |
789 | .SS bridge vlan tunnelshow - list vlan tunnel mapping. |
790 | ||
791 | This command displays the current vlan tunnel info mapping. | |
792 | ||
d04bc300 SH |
793 | .SH bridge monitor - state monitoring |
794 | ||
795 | The | |
796 | .B bridge | |
fc31817d | 797 | utility can monitor the state of devices and addresses |
a89d5329 | 798 | continuously. This option has a slightly different format. |
d04bc300 SH |
799 | Namely, the |
800 | .B monitor | |
801 | command is the first in the command line and then the object list follows: | |
802 | ||
803 | .BR "bridge monitor" " [ " all " |" | |
49572501 | 804 | .IR OBJECT-LIST " ]" |
d04bc300 SH |
805 | |
806 | .I OBJECT-LIST | |
807 | is the list of object types that we want to monitor. | |
808 | It may contain | |
fc31817d | 809 | .BR link ", " fdb ", and " mdb "." |
d04bc300 SH |
810 | If no |
811 | .B file | |
812 | argument is given, | |
813 | .B bridge | |
814 | opens RTNETLINK, listens on it and dumps state changes in the format | |
815 | described in previous sections. | |
816 | ||
817 | .P | |
818 | If a file name is given, it does not listen on RTNETLINK, | |
819 | but opens the file containing RTNETLINK messages saved in binary format | |
efb16971 | 820 | and dumps them. |
d04bc300 SH |
821 | |
822 | .SH NOTES | |
823 | This command uses facilities added in Linux 3.0. | |
824 | ||
825 | Although the forwarding table is maintained on a per-bridge device basis | |
826 | the bridge device is not part of the syntax. This is a limitation of the | |
827 | underlying netlink neighbour message protocol. When displaying the | |
828 | forwarding table, entries for all bridges are displayed. | |
829 | Add/delete/modify commands determine the underlying bridge device | |
6274b0b7 | 830 | based on the bridge to which the corresponding ethernet device is attached. |
d04bc300 SH |
831 | |
832 | ||
833 | .SH SEE ALSO | |
834 | .BR ip (8) | |
49572501 | 835 | .SH BUGS |
d04bc300 SH |
836 | .RB "Please direct bugreports and patches to: " <netdev@vger.kernel.org> |
837 | ||
838 | .SH AUTHOR | |
839 | Original Manpage by Stephen Hemminger |