]> git.proxmox.com Git - mirror_iproute2.git/blob - man/man8/bridge.8
Merge branch 'master' into net-next
[mirror_iproute2.git] / man / man8 / bridge.8
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 " := { "
16 .BR link " | " fdb " | " mdb " | " vlan " | " monitor " }"
17 .sp
18
19 .ti -8
20 .IR OPTIONS " := { "
21 \fB\-V\fR[\fIersion\fR] |
22 \fB\-s\fR[\fItatistics\fR] |
23 \fB\-n\fR[\fIetns\fR] name }
24
25 .ti -8
26 .BR "bridge link set"
27 .B dev
28 .IR DEV
29 .IR " [ "
30 .B cost
31 .IR COST " ] [ "
32 .B priority
33 .IR PRIO " ] [ "
34 .B state
35 .IR STATE "] ["
36 .BR guard " { " on " | " off " } ] [ "
37 .BR hairpin " { " on " | " off " } ] [ "
38 .BR fastleave " { " on " | " off " } ] [ "
39 .BR root_block " { " on " | " off " } ] [ "
40 .BR learning " { " on " | " off " } ] [ "
41 .BR learning_sync " { " on " | " off " } ] [ "
42 .BR flood " { " on " | " off " } ] [ "
43 .BR hwmode " { " vepa " | " veb " } ] [ "
44 .BR self " ] [ " master " ] "
45
46 .ti -8
47 .BR "bridge link" " [ " show " ] [ "
48 .B dev
49 .IR DEV " ]"
50
51 .ti -8
52 .BR "bridge fdb" " { " add " | " append " | " del " } "
53 .I LLADDR
54 .B dev
55 .IR DEV " { "
56 .BR local " | " temp " } [ "
57 .BR self " ] [ " master " ] [ " router " ] [ " use " ] [ "
58 .B dst
59 .IR IPADDR " ] [ "
60 .B vni
61 .IR VNI " ] ["
62 .B port
63 .IR PORT " ] ["
64 .B via
65 .IR DEVICE " ]"
66
67 .ti -8
68 .BR "bridge fdb" " [ " show " ] [ "
69 .B dev
70 .IR DEV " ]"
71
72 .ti -8
73 .BR "bridge mdb" " { " add " | " del " } "
74 .B dev
75 .IR DEV
76 .B port
77 .IR PORT
78 .B grp
79 .IR GROUP " [ "
80 .BR permanent " | " temp " ] [ "
81 .B vid
82 .IR VID " ] "
83
84 .ti -8
85 .BR "bridge mdb show " [ "
86 .B dev
87 .IR DEV " ]"
88
89 .ti -8
90 .BR "bridge vlan" " { " add " | " del " } "
91 .B dev
92 .IR DEV
93 .B vid
94 .IR VID " [ "
95 .BR pvid " ] [ " untagged " ] [ "
96 .BR self " ] [ " master " ] "
97
98 .ti -8
99 .BR "bridge vlan" " [ " show " ] [ "
100 .B dev
101 .IR DEV " ]"
102
103 .ti -8
104 .BR "bridge monitor" " [ " all " | " neigh " | " link " | " mdb " ]"
105
106 .SH OPTIONS
107
108 .TP
109 .BR "\-V" , " -Version"
110 print the version of the
111 .B bridge
112 utility and exit.
113
114 .TP
115 .BR "\-s" , " \-stats", " \-statistics"
116 output more information. If this option
117 is given multiple times, the amount of information increases.
118 As a rule, the information is statistics or some time values.
119
120 .TP
121 .BR "\-n" , " \-net" , " \-netns " <NETNS>
122 switches
123 .B bridge
124 to the specified network namespace
125 .IR NETNS .
126 Actually it just simplifies executing of:
127
128 .B ip netns exec
129 .IR NETNS
130 .B bridge
131 .RI "[ " OPTIONS " ] " OBJECT " { " COMMAND " | "
132 .BR help " }"
133
134 to
135
136 .B bridge
137 .RI "-n[etns] " NETNS " [ " OPTIONS " ] " OBJECT " { " COMMAND " | "
138 .BR help " }"
139
140
141 .SH BRIDGE - COMMAND SYNTAX
142
143 .SS
144 .I OBJECT
145
146 .TP
147 .B link
148 - Bridge port.
149
150 .TP
151 .B fdb
152 - Forwarding Database entry.
153
154 .TP
155 .B mdb
156 - Multicast group database entry.
157
158 .TP
159 .B vlan
160 - VLAN filter list.
161
162 .SS
163 .I COMMAND
164
165 Specifies the action to perform on the object.
166 The set of possible actions depends on the object type.
167 As a rule, it is possible to
168 .BR "add" , " delete"
169 and
170 .B show
171 (or
172 .B list
173 ) objects, but some objects do not allow all of these operations
174 or have some additional commands. The
175 .B help
176 command is available for all objects. It prints
177 out a list of available commands and argument syntax conventions.
178 .sp
179 If no command is given, some default command is assumed.
180 Usually it is
181 .B list
182 or, if the objects of this class cannot be listed,
183 .BR "help" .
184
185 .SH bridge link - bridge port
186
187 .B link
188 objects correspond to the port devices of the bridge.
189
190 .P
191 The corresponding commands set and display port status and bridge specific
192 attributes.
193
194 .SS bridge link set - set bridge specific attributes on a port
195
196 .TP
197 .BI dev " NAME "
198 interface name of the bridge port
199
200 .TP
201 .BI cost " COST "
202 the STP path cost of the specified port.
203
204 .TP
205 .BI priority " PRIO "
206 the STP port priority. The priority value is an unsigned 8-bit quantity
207 (number between 0 and 255). This metric is used in the designated port an
208 droot port selectio algorithms.
209
210 .TP
211 .BI state " STATE "
212 the operation state of the port. This is primarily used by user space STP/RSTP
213 implementation. One may enter a lowercased port state name, or one of the
214 numbers below. Negative inputs are ignored, and unrecognized names return an
215 error.
216
217 .B 0
218 - port is DISABLED. Make this port completely inactive.
219 .sp
220
221 .B 1
222 - STP LISTENING state. Only valid if STP is enabled on the brige. In this
223 state the port for list for STP BPDUs and drop all other traffic.
224 .sp
225
226 .B 2
227 - STP LEARNING state. Only valid if STP is enabled on the bridge. In this
228 state the port will accept traffic only for the purpose of updating MAC
229 adress tables.
230 .sp
231
232 .B 3
233 - STP FORWARDING state. Port is fully active.
234 .sp
235
236 .B 4
237 - STP BLOCKING state. Only valid if STP is enabled on the bridge. This state
238 is used during the STP election process. In this state, port will only process
239 STP BPDUs.
240 .sp
241
242 .TP
243 .BR "guard on " or " guard off "
244 Controls whether STP BPUDs will be processed by the bridge port. By default,
245 the flag is turned off allowed BPDU processing. Turning this flag on will
246 cause the port to stop processing STP BPDUs.
247
248 .TP
249 .BR "hairpin on " or " hairpin off "
250 Controls whether traffic may be send back out of the port on which it was
251 received. By default, this flag is turned off and the bridge will not forward
252 traffic back out of the receiving port.
253
254 .TP
255 .BR "fastleave on " or " fastleave off "
256 This flag allows the bridge to immediately stop multicast traffic on a port
257 that receives IGMP Leave message. It is only used with IGMP snooping is
258 enabled on the bridge. By default the flag is off.
259
260 .TP
261 .BR "root_block on " or " root_block off "
262 Controls whether a given port is allowed to become root port or not. Only used
263 when STP is enabled on the bridge. By default the flag is off.
264
265 .TP
266 .BR "learning on " or " learning off "
267 Controls whether a given port will learn MAC addresses from received traffic or
268 not. If learning if off, the bridge will end up flooding any traffic for which
269 it has no FDB entry. By default this flag is on.
270
271 .TP
272 .BR "learning_sync on " or " learning_sync off "
273 Controls whether a given port will sync MAC addresses learned on device port to
274 bridge FDB.
275
276 .TP
277 .BR "flooding on " or " flooding off "
278 Controls whether a given port will flood unicast traffic for which there is no FDB entry. By default this flag is on.
279
280 .TP
281 .BI hwmode
282 Some network interface cards support HW bridge functionality and they may be
283 configured in different modes. Currently support modes are:
284
285 .B vepa
286 - Data sent between HW ports is sent on the wire to the external
287 switch.
288
289 .B veb
290 - bridging happens in hardware.
291
292 .TP
293 .BI self
294 link setting is configured on specified physical device
295
296 .TP
297 .BI master
298 link setting is configured on the software bridge (default)
299
300
301 .SS bridge link show - list bridge port configuration.
302
303 This command displays the current bridge port configuration and flags.
304
305 .SH bridge fdb - forwarding database management
306
307 .B fdb
308 objects contain known Ethernet addresses on a link.
309
310 .P
311 The corresponding commands display fdb entries, add new entries,
312 append entries,
313 and delete old ones.
314
315 .SS bridge fdb add - add a new fdb entry
316
317 This command creates a new fdb entry.
318
319 .TP
320 .BI "LLADDR"
321 the Ethernet MAC address.
322
323 .TP
324 .BI dev " DEV"
325 the interface to which this address is associated.
326
327 .B self
328 - the address is associated with the port drivers fdb. Usually hardware.
329 .sp
330
331 .B master
332 - the address is associated with master devices fdb. Usually software (default).
333 .sp
334
335 .B router
336 - the destination address is associated with a router.
337 Valid if the referenced device is a VXLAN type device and has
338 route shortcircuit enabled.
339 .sp
340
341 .B use
342 - the address is in use. User space can use this option to
343 indicate to the kernel that the fdb entry is in use.
344 .sp
345
346 .in -8
347 The next command line parameters apply only
348 when the specified device
349 .I DEV
350 is of type VXLAN.
351 .TP
352 .BI dst " IPADDR"
353 the IP address of the destination
354 VXLAN tunnel endpoint where the Ethernet MAC ADDRESS resides.
355
356 .TP
357 .BI vni " VNI"
358 the VXLAN VNI Network Identifier (or VXLAN Segment ID)
359 to use to connect to the remote VXLAN tunnel endpoint.
360 If omitted the value specified at vxlan device creation
361 will be used.
362
363 .TP
364 .BI port " PORT"
365 the UDP destination PORT number to use to connect to the
366 remote VXLAN tunnel endpoint.
367 If omitted the default value is used.
368
369 .TP
370 .BI via " DEVICE"
371 device name of the outgoing interface for the
372 VXLAN device driver to reach the
373 remote VXLAN tunnel endpoint.
374
375 .SS bridge fdb append - append a forwarding database entry
376 This command adds a new fdb entry with an already known
377 .IR LLADDR .
378 Valid only for multicast link layer addresses.
379 The command adds support for broadcast and multicast
380 Ethernet MAC addresses.
381 The Ethernet MAC address is added multiple times into
382 the forwarding database and the vxlan device driver
383 sends a copy of the data packet to each entry found.
384
385 .PP
386 The arguments are the same as with
387 .BR "bridge fdb add" ,
388
389 .SS bridge fdb delete - delete a forwarding database entry
390 This command removes an existing fdb entry.
391
392 .PP
393 The arguments are the same as with
394 .BR "bridge fdb add" ,
395
396 .SS bridge fdb show - list forwarding entries.
397
398 This command displays the current forwarding table.
399
400 .PP
401 With the
402 .B -statistics
403 option, the command becomes verbose. It prints out the last updated
404 and last used time for each entry.
405
406 .SH bridge mdb - multicast group database management
407
408 .B mdb
409 objects contain known IP multicast group addresses on a link.
410
411 .P
412 The corresponding commands display mdb entries, add new entries,
413 and delete old ones.
414
415 .SS bridge mdb add - add a new multicast group database entry
416
417 This command creates a new mdb entry.
418
419 .TP
420 .BI dev " DEV"
421 the interface where this group address is associated.
422
423 .TP
424 .BI port " PORT"
425 the port whose link is known to have members of this multicast group.
426
427 .TP
428 .BI grp " GROUP"
429 the IP multicast group address whose members reside on the link connected to
430 the port.
431
432 .B permanent
433 - the mdb entry is permanent
434 .sp
435
436 .B temp
437 - the mdb entry is temporary (default)
438 .sp
439
440 .TP
441 .BI vid " VID"
442 the VLAN ID which is known to have members of this multicast group.
443
444 .in -8
445 .SS bridge mdb delete - delete a multicast group database entry
446 This command removes an existing mdb entry.
447
448 .PP
449 The arguments are the same as with
450 .BR "bridge mdb add" .
451
452 .SS bridge mdb show - list multicast group database entries
453
454 This command displays the current multicast group membership table. The table
455 is populated by IGMP and MLD snooping in the bridge driver automatically. It
456 can be altered by
457 .B bridge mdb add
458 and
459 .B bridge mdb del
460 commands manually too.
461
462 .TP
463 .BI dev " DEV"
464 the interface only whose entries should be listed. Default is to list all
465 bridge interfaces.
466
467 .PP
468 With the
469 .B -details
470 option, the command becomes verbose. It prints out the ports known to have
471 a connected router.
472
473 .SH bridge vlan - VLAN filter list
474
475 .B vlan
476 objects contain known VLAN IDs for a link.
477
478 .P
479 The corresponding commands display vlan filter entries, add new entries,
480 and delete old ones.
481
482 .SS bridge vlan add - add a new vlan filter entry
483
484 This command creates a new vlan filter entry.
485
486 .TP
487 .BI dev " NAME"
488 the interface with which this vlan is associated.
489
490 .TP
491 .BI vid " VID"
492 the VLAN ID that identifies the vlan.
493
494 .TP
495 .BI pvid
496 the vlan specified is to be considered a PVID at ingress.
497 Any untagged frames will be assigned to this VLAN.
498
499 .TP
500 .BI untagged
501 the vlan specified is to be treated as untagged on egress.
502
503 .TP
504 .BI self
505 the vlan is configured on the specified physical device. Required if the
506 device is the bridge device.
507
508 .TP
509 .BI master
510 the vlan is configured on the software bridge (default).
511
512 .SS bridge vlan delete - delete a forwarding database entry
513 This command removes an existing fdb entry.
514
515 .PP
516 The arguments are the same as with
517 .BR "bridge vlan add".
518 The
519 .BR "pvid " and " untagged"
520 flags are ignored.
521
522 .SS bridge vlan show - list vlan configuration.
523
524 This command displays the current VLAN filter table.
525
526 .SH bridge monitor - state monitoring
527
528 The
529 .B bridge
530 utility can monitor the state of devices and addresses
531 continuously. This option has a slightly different format.
532 Namely, the
533 .B monitor
534 command is the first in the command line and then the object list follows:
535
536 .BR "bridge monitor" " [ " all " |"
537 .IR OBJECT-LIST " ]"
538
539 .I OBJECT-LIST
540 is the list of object types that we want to monitor.
541 It may contain
542 .BR link ", " fdb ", and " mdb "."
543 If no
544 .B file
545 argument is given,
546 .B bridge
547 opens RTNETLINK, listens on it and dumps state changes in the format
548 described in previous sections.
549
550 .P
551 If a file name is given, it does not listen on RTNETLINK,
552 but opens the file containing RTNETLINK messages saved in binary format
553 and dumps them.
554
555 .SH NOTES
556 This command uses facilities added in Linux 3.0.
557
558 Although the forwarding table is maintained on a per-bridge device basis
559 the bridge device is not part of the syntax. This is a limitation of the
560 underlying netlink neighbour message protocol. When displaying the
561 forwarding table, entries for all bridges are displayed.
562 Add/delete/modify commands determine the underlying bridge device
563 based on the bridge to which the corresponding ethernet device is attached.
564
565
566 .SH SEE ALSO
567 .BR ip (8)
568 .SH BUGS
569 .RB "Please direct bugreports and patches to: " <netdev@vger.kernel.org>
570
571 .SH AUTHOR
572 Original Manpage by Stephen Hemminger