]> git.proxmox.com Git - mirror_iproute2.git/blame_incremental - man/man8/bridge.8
bridge: add support for isolated option
[mirror_iproute2.git] / man / man8 / bridge.8
... / ...
CommitLineData
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 " := { "
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\fB\-b\fR[\fIatch\fR] filename |
25\fB\-c\fR[\folor\fR] |
26\fB\-p\fR[\fIretty\fR] |
27\fB\-j\fR[\fIson\fR] }
28
29.ti -8
30.BR "bridge link set"
31.B dev
32.IR DEV
33.IR " [ "
34.B cost
35.IR COST " ] [ "
36.B priority
37.IR PRIO " ] [ "
38.B state
39.IR STATE "] ["
40.BR guard " { " on " | " off " } ] [ "
41.BR hairpin " { " on " | " off " } ] [ "
42.BR fastleave " { " on " | " off " } ] [ "
43.BR root_block " { " on " | " off " } ] [ "
44.BR learning " { " on " | " off " } ] [ "
45.BR learning_sync " { " on " | " off " } ] [ "
46.BR flood " { " on " | " off " } ] [ "
47.BR hwmode " { " vepa " | " veb " } ] [ "
48.BR mcast_flood " { " on " | " off " } ] [ "
49.BR neigh_suppress " { " on " | " off " } ] [ "
50.BR vlan_tunnel " { " on " | " off " } ] [ "
51.BR isolated " { " on " | " off " } ] [ "
52.BR self " ] [ " master " ]"
53
54.ti -8
55.BR "bridge link" " [ " show " ] [ "
56.B dev
57.IR DEV " ]"
58
59.ti -8
60.BR "bridge fdb" " { " add " | " append " | " del " | " replace " } "
61.I LLADDR
62.B dev
63.IR DEV " { "
64.BR local " | " static " | " dynamic " } [ "
65.BR self " ] [ " master " ] [ " router " ] [ " use " ] [ " extern_learn " ] [ "
66.B dst
67.IR IPADDR " ] [ "
68.B vni
69.IR VNI " ] ["
70.B port
71.IR PORT " ] ["
72.B via
73.IR DEVICE " ]"
74
75.ti -8
76.BR "bridge fdb" " [ " show " ] [ "
77.B dev
78.IR DEV " ] [ "
79.B br
80.IR BRDEV " ] [ "
81.B brport
82.IR DEV " ] [ "
83.B vlan
84.IR VID " ] [ "
85.B state
86.IR STATE " ]"
87
88.ti -8
89.BR "bridge mdb" " { " add " | " del " } "
90.B dev
91.IR DEV
92.B port
93.IR PORT
94.B grp
95.IR GROUP " [ "
96.BR permanent " | " temp " ] [ "
97.B vid
98.IR VID " ] "
99
100.ti -8
101.BR "bridge mdb show " [ "
102.B dev
103.IR DEV " ]"
104
105.ti -8
106.BR "bridge vlan" " { " add " | " del " } "
107.B dev
108.IR DEV
109.B vid
110.IR VID " [ "
111.BR tunnel_info
112.IR TUNNEL_ID " ] [ "
113.BR pvid " ] [ " untagged " ] [ "
114.BR self " ] [ " master " ] "
115
116.ti -8
117.BR "bridge vlan" " [ " show " | " tunnelshow " ] [ "
118.B dev
119.IR DEV " ]"
120
121.ti -8
122.BR "bridge monitor" " [ " all " | " neigh " | " link " | " mdb " ]"
123
124.SH OPTIONS
125
126.TP
127.BR "\-V" , " -Version"
128print the version of the
129.B bridge
130utility and exit.
131
132.TP
133.BR "\-s" , " \-stats", " \-statistics"
134output more information. If this option
135is given multiple times, the amount of information increases.
136As a rule, the information is statistics or some time values.
137
138.TP
139.BR "\-d" , " \-details"
140print detailed information about MDB router ports.
141
142.TP
143.BR "\-n" , " \-net" , " \-netns " <NETNS>
144switches
145.B bridge
146to the specified network namespace
147.IR NETNS .
148Actually it just simplifies executing of:
149
150.B ip netns exec
151.IR NETNS
152.B bridge
153.RI "[ " OPTIONS " ] " OBJECT " { " COMMAND " | "
154.BR help " }"
155
156to
157
158.B bridge
159.RI "-n[etns] " NETNS " [ " OPTIONS " ] " OBJECT " { " COMMAND " | "
160.BR help " }"
161
162.TP
163.BR "\-b", " \-batch " <FILENAME>
164Read commands from provided file or standard input and invoke them.
165First failure will cause termination of bridge command.
166
167.TP
168.BR "\-force"
169Don't terminate bridge command on errors in batch mode.
170If there were any errors during execution of the commands, the application
171return code will be non zero.
172
173.TP
174.BR "\-c" , " -color"
175Use color output.
176
177.TP
178.BR "\-j", " \-json"
179Output results in JavaScript Object Notation (JSON).
180
181.TP
182.BR "\-p", " \-pretty"
183When combined with -j generate a pretty JSON output.
184
185
186.SH BRIDGE - COMMAND SYNTAX
187
188.SS
189.I OBJECT
190
191.TP
192.B link
193- Bridge port.
194
195.TP
196.B fdb
197- Forwarding Database entry.
198
199.TP
200.B mdb
201- Multicast group database entry.
202
203.TP
204.B vlan
205- VLAN filter list.
206
207.SS
208.I COMMAND
209
210Specifies the action to perform on the object.
211The set of possible actions depends on the object type.
212As a rule, it is possible to
213.BR "add" , " delete"
214and
215.B show
216(or
217.B list
218) objects, but some objects do not allow all of these operations
219or have some additional commands. The
220.B help
221command is available for all objects. It prints
222out a list of available commands and argument syntax conventions.
223.sp
224If no command is given, some default command is assumed.
225Usually it is
226.B list
227or, if the objects of this class cannot be listed,
228.BR "help" .
229
230.SH bridge link - bridge port
231
232.B link
233objects correspond to the port devices of the bridge.
234
235.P
236The corresponding commands set and display port status and bridge specific
237attributes.
238
239.SS bridge link set - set bridge specific attributes on a port
240
241.TP
242.BI dev " NAME "
243interface name of the bridge port
244
245.TP
246.BI cost " COST "
247the STP path cost of the specified port.
248
249.TP
250.BI priority " PRIO "
251the STP port priority. The priority value is an unsigned 8-bit quantity
252(number between 0 and 255). This metric is used in the designated port an
253droot port selectio algorithms.
254
255.TP
256.BI state " STATE "
257the operation state of the port. This is primarily used by user space STP/RSTP
258implementation. One may enter a lowercased port state name, or one of the
259numbers below. Negative inputs are ignored, and unrecognized names return an
260error.
261
262.B 0
263- port is DISABLED. Make this port completely inactive.
264.sp
265
266.B 1
267- STP LISTENING state. Only valid if STP is enabled on the bridge. In this
268state the port listens for STP BPDUs and drops all other traffic frames.
269.sp
270
271.B 2
272- STP LEARNING state. Only valid if STP is enabled on the bridge. In this
273state the port will accept traffic only for the purpose of updating MAC
274address tables.
275.sp
276
277.B 3
278- STP FORWARDING state. Port is fully active.
279.sp
280
281.B 4
282- STP BLOCKING state. Only valid if STP is enabled on the bridge. This state
283is used during the STP election process. In this state, port will only process
284STP BPDUs.
285.sp
286
287.TP
288.BR "guard on " or " guard off "
289Controls whether STP BPDUs will be processed by the bridge port. By default,
290the flag is turned off allowed BPDU processing. Turning this flag on will
291cause the port to stop processing STP BPDUs.
292
293.TP
294.BR "hairpin on " or " hairpin off "
295Controls whether traffic may be send back out of the port on which it was
296received. By default, this flag is turned off and the bridge will not forward
297traffic back out of the receiving port.
298
299.TP
300.BR "fastleave on " or " fastleave off "
301This flag allows the bridge to immediately stop multicast traffic on a port
302that receives IGMP Leave message. It is only used with IGMP snooping is
303enabled on the bridge. By default the flag is off.
304
305.TP
306.BR "root_block on " or " root_block off "
307Controls whether a given port is allowed to become root port or not. Only used
308when STP is enabled on the bridge. By default the flag is off.
309
310.TP
311.BR "learning on " or " learning off "
312Controls whether a given port will learn MAC addresses from received traffic or
313not. If learning if off, the bridge will end up flooding any traffic for which
314it has no FDB entry. By default this flag is on.
315
316.TP
317.BR "learning_sync on " or " learning_sync off "
318Controls whether a given port will sync MAC addresses learned on device port to
319bridge FDB.
320
321.TP
322.BR "flooding on " or " flooding off "
323Controls whether a given port will flood unicast traffic for which there is no FDB entry. By default this flag is on.
324
325.TP
326.BI hwmode
327Some network interface cards support HW bridge functionality and they may be
328configured in different modes. Currently support modes are:
329
330.B vepa
331- Data sent between HW ports is sent on the wire to the external
332switch.
333
334.B veb
335- bridging happens in hardware.
336
337.TP
338.BR "mcast_flood on " or " mcast_flood off "
339Controls whether a given port will be flooded with multicast traffic for which there is no MDB entry. By default this flag is on.
340
341.TP
342.BR "neigh_suppress on " or " neigh_suppress off "
343Controls whether neigh discovery (arp and nd) proxy and suppression is enabled on the port. By default this flag is off.
344
345.TP
346.BR "vlan_tunnel on " or " vlan_tunnel off "
347Controls whether vlan to tunnel mapping is enabled on the port. By default this flag is off.
348
349.TP
350.BR "isolated on " or " isolated off "
351Controls whether a given port will be isolated, which means it will be able to communicate with non-isolated ports only.
352By default this flag is off.
353
354.TP
355.BI self
356link setting is configured on specified physical device
357
358.TP
359.BI master
360link setting is configured on the software bridge (default)
361
362.TP
363.BR "\-t" , " \-timestamp"
364display current time when using monitor option.
365
366.SS bridge link show - list bridge port configuration.
367
368This command displays the current bridge port configuration and flags.
369
370.SH bridge fdb - forwarding database management
371
372.B fdb
373objects contain known Ethernet addresses on a link.
374
375.P
376The corresponding commands display fdb entries, add new entries,
377append entries,
378and delete old ones.
379
380.SS bridge fdb add - add a new fdb entry
381
382This command creates a new fdb entry.
383
384.TP
385.BI "LLADDR"
386the Ethernet MAC address.
387
388.TP
389.BI dev " DEV"
390the interface to which this address is associated.
391
392.B local
393- is a local permanent fdb entry
394.sp
395
396.B static
397- is a static (no arp) fdb entry
398.sp
399
400.B dynamic
401- is a dynamic reachable age-able fdb entry
402.sp
403
404.B self
405- the address is associated with the port drivers fdb. Usually hardware.
406.sp
407
408.B master
409- the address is associated with master devices fdb. Usually software (default).
410.sp
411
412.B router
413- the destination address is associated with a router.
414Valid if the referenced device is a VXLAN type device and has
415route shortcircuit enabled.
416.sp
417
418.B use
419- the address is in use. User space can use this option to
420indicate to the kernel that the fdb entry is in use.
421.sp
422
423.B extern_learn
424- this entry was learned externally. This option can be used to
425indicate to the kernel that an entry was hardware or user-space
426controller learnt dynamic entry. Kernel will not age such an entry.
427.sp
428
429.in -8
430The next command line parameters apply only
431when the specified device
432.I DEV
433is of type VXLAN.
434.TP
435.BI dst " IPADDR"
436the IP address of the destination
437VXLAN tunnel endpoint where the Ethernet MAC ADDRESS resides.
438
439.TP
440.BI vni " VNI"
441the VXLAN VNI Network Identifier (or VXLAN Segment ID)
442to use to connect to the remote VXLAN tunnel endpoint.
443If omitted the value specified at vxlan device creation
444will be used.
445
446.TP
447.BI port " PORT"
448the UDP destination PORT number to use to connect to the
449remote VXLAN tunnel endpoint.
450If omitted the default value is used.
451
452.TP
453.BI via " DEVICE"
454device name of the outgoing interface for the
455VXLAN device driver to reach the
456remote VXLAN tunnel endpoint.
457
458.SS bridge fdb append - append a forwarding database entry
459This command adds a new fdb entry with an already known
460.IR LLADDR .
461Valid only for multicast link layer addresses.
462The command adds support for broadcast and multicast
463Ethernet MAC addresses.
464The Ethernet MAC address is added multiple times into
465the forwarding database and the vxlan device driver
466sends a copy of the data packet to each entry found.
467
468.PP
469The arguments are the same as with
470.BR "bridge fdb add" .
471
472.SS bridge fdb delete - delete a forwarding database entry
473This command removes an existing fdb entry.
474
475.PP
476The arguments are the same as with
477.BR "bridge fdb add" .
478
479.SS bridge fdb replace - replace a forwarding database entry
480If no matching entry is found, a new one will be created instead.
481
482.PP
483The arguments are the same as with
484.BR "bridge fdb add" .
485
486.SS bridge fdb show - list forwarding entries.
487
488This command displays the current forwarding table.
489
490.PP
491With the
492.B -statistics
493option, the command becomes verbose. It prints out the last updated
494and last used time for each entry.
495
496.SH bridge mdb - multicast group database management
497
498.B mdb
499objects contain known IP multicast group addresses on a link.
500
501.P
502The corresponding commands display mdb entries, add new entries,
503and delete old ones.
504
505.SS bridge mdb add - add a new multicast group database entry
506
507This command creates a new mdb entry.
508
509.TP
510.BI dev " DEV"
511the interface where this group address is associated.
512
513.TP
514.BI port " PORT"
515the port whose link is known to have members of this multicast group.
516
517.TP
518.BI grp " GROUP"
519the IP multicast group address whose members reside on the link connected to
520the port.
521
522.B permanent
523- the mdb entry is permanent
524.sp
525
526.B temp
527- the mdb entry is temporary (default)
528.sp
529
530.TP
531.BI vid " VID"
532the VLAN ID which is known to have members of this multicast group.
533
534.in -8
535.SS bridge mdb delete - delete a multicast group database entry
536This command removes an existing mdb entry.
537
538.PP
539The arguments are the same as with
540.BR "bridge mdb add" .
541
542.SS bridge mdb show - list multicast group database entries
543
544This command displays the current multicast group membership table. The table
545is populated by IGMP and MLD snooping in the bridge driver automatically. It
546can be altered by
547.B bridge mdb add
548and
549.B bridge mdb del
550commands manually too.
551
552.TP
553.BI dev " DEV"
554the interface only whose entries should be listed. Default is to list all
555bridge interfaces.
556
557.PP
558With the
559.B -details
560option, the command becomes verbose. It prints out the ports known to have
561a connected router.
562
563.PP
564With the
565.B -statistics
566option, the command displays timer values for mdb and router port entries.
567
568.SH bridge vlan - VLAN filter list
569
570.B vlan
571objects contain known VLAN IDs for a link.
572
573.P
574The corresponding commands display vlan filter entries, add new entries,
575and delete old ones.
576
577.SS bridge vlan add - add a new vlan filter entry
578
579This command creates a new vlan filter entry.
580
581.TP
582.BI dev " NAME"
583the interface with which this vlan is associated.
584
585.TP
586.BI vid " VID"
587the VLAN ID that identifies the vlan.
588
589.TP
590.BI tunnel_info " TUNNEL_ID"
591the TUNNEL ID that maps to this vlan. The tunnel id is set in dst_metadata for
592every packet that belongs to this vlan (applicable to bridge ports with vlan_tunnel
593flag set).
594
595.TP
596.BI pvid
597the vlan specified is to be considered a PVID at ingress.
598Any untagged frames will be assigned to this VLAN.
599
600.TP
601.BI untagged
602the vlan specified is to be treated as untagged on egress.
603
604.TP
605.BI self
606the vlan is configured on the specified physical device. Required if the
607device is the bridge device.
608
609.TP
610.BI master
611the vlan is configured on the software bridge (default).
612
613.SS bridge vlan delete - delete a vlan filter entry
614This command removes an existing vlan filter entry.
615
616.PP
617The arguments are the same as with
618.BR "bridge vlan add".
619The
620.BR "pvid " and " untagged"
621flags are ignored.
622
623.SS bridge vlan show - list vlan configuration.
624
625This command displays the current VLAN filter table.
626
627.PP
628With the
629.B -statistics
630option, the command displays per-vlan traffic statistics.
631
632.SS bridge vlan tunnelshow - list vlan tunnel mapping.
633
634This command displays the current vlan tunnel info mapping.
635
636.SH bridge monitor - state monitoring
637
638The
639.B bridge
640utility can monitor the state of devices and addresses
641continuously. This option has a slightly different format.
642Namely, the
643.B monitor
644command is the first in the command line and then the object list follows:
645
646.BR "bridge monitor" " [ " all " |"
647.IR OBJECT-LIST " ]"
648
649.I OBJECT-LIST
650is the list of object types that we want to monitor.
651It may contain
652.BR link ", " fdb ", and " mdb "."
653If no
654.B file
655argument is given,
656.B bridge
657opens RTNETLINK, listens on it and dumps state changes in the format
658described in previous sections.
659
660.P
661If a file name is given, it does not listen on RTNETLINK,
662but opens the file containing RTNETLINK messages saved in binary format
663and dumps them.
664
665.SH NOTES
666This command uses facilities added in Linux 3.0.
667
668Although the forwarding table is maintained on a per-bridge device basis
669the bridge device is not part of the syntax. This is a limitation of the
670underlying netlink neighbour message protocol. When displaying the
671forwarding table, entries for all bridges are displayed.
672Add/delete/modify commands determine the underlying bridge device
673based on the bridge to which the corresponding ethernet device is attached.
674
675
676.SH SEE ALSO
677.BR ip (8)
678.SH BUGS
679.RB "Please direct bugreports and patches to: " <netdev@vger.kernel.org>
680
681.SH AUTHOR
682Original Manpage by Stephen Hemminger