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