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