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