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