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