Configure network bridge parameters
Syntax:
brconfig -a
or:
brconfig bridge [command [args ...]]
Options:
- -a
- Display the status of all bridge devices present on the system.
This flag is mutually exclusive with all other subcommands.
All other operations require that a bridge be specified.
If a bridge is specified with no subcommands, the status of that bridge is displayed.
The following subcommands are available:
- up
- Start forwarding packets on the bridge.
- down
- Stop forwarding packets on the bridge.
- add interface
- Add the interface named by interface as a member of the bridge.
The interface is put into promiscuous mode so that it can receive every packet sent on the network.
- addr
- Display the addresses that the bridge has learned.
- delete interface
- Remove the interface named by interface from the bridge.
Promiscuous mode is disabled on the interface when it's removed from the bridge.
- maxaddr size
- Set the size of the bridge address cache to size. The default is 100 entries.
- timeout seconds
- Set the timeout of address cache entries to the given number of seconds.
If seconds is zero, then address cache entries don't expire.
The default is 1200 seconds.
- static interface address
- Add a static entry into the address cache pointing to interface.
Static entries are never aged out of the cache or replaced, even
if the address is seen on a different interface.
- deladdr address
- Delete address from the address cache.
- flush
- Delete all dynamically-learned addresses from the address cache.
- flushall
- Delete all addresses, including static addresses, from the address cache.
- discover interface
- Mark an interface as a discovering interface.
When the bridge has no address cache entry (either dynamic or static) for the destination address of a packet, the
bridge forwards the packet to all member interfaces marked as discovering.
This is the default for all interfaces added to a bridge.
- -discover interface
- Clear the discovering attribute on a member interface.
For packets without the discovering attribute, the only packets
forwarded on the interface are broadcast or multicast packets and
packets for which the destination address is known to be on the interface's segment.
- learn interface
- Mark an interface as a learning interface.
When a packet arrives on such an interface, the source address of the packet is entered into
the address cache as being a destination address on the interface's segment.
This is the default for all interfaces added to a bridge.
- -learn interface
- Clear the learning attribute on a member interface.
- mcf
-
Enable multicast filtering. This option allows you to create static routes for multicast traffic
so you don't have to broadcast the traffic to all bridge members.
-
To create static routes, use the static
option. For example, the following commands create a static route for the MLD (Multicast Listener
Discovery) group 1 address through the vp0 and vp1 interfaces—no other interfaces will receive
this multicast traffic:
brconfig bridge0 mcf
brconfig bridge0 static vp0 33:33:00:00:00:01
brconfig bridge0 static vp1 33:33:00:00:00:01
-
Using mcf and static together this way should work with any
multicast MAC address; that is, any MAC address in which bit 0 of the first octet is set to 1.
- -mcf
-
Disable multicast filtering. This option also deletes any static routes for
multicast addresses created with the static option.
- nohost address
- Don’t process IP packets for the specified multicast address. This option applies to
multicast routes when multicast filtering
(mcf option) is enabled.
It prevents packets from being queued for processing on the host.
- Example:
brconfig bridge0 nohost 01:00:5e:00:37:38
- -nohost address
- Disable the nohost option for the specified multicast address.
- Example:
brconfig bridge0 -nohost 01:00:5e:00:37:38
- stp interface
- Enable the IEEE 802.1D Spanning Tree Protocol (STP) on the interface.
Spanning Tree is used to detect and remove loops in a network topology.
- -stp interface
- Disable the Spanning Tree Protocol on the interface.
This is the default for all interfaces added to a bridge.
- maxage seconds
- Set the time that a Spanning Tree Protocol configuration is valid.
The default is 20 seconds, the minimum 1 second, and the maximum 255 seconds.
- fwddelay seconds
- Set the time that must pass before an interface begins forwarding packets when Spanning Tree is enabled.
The default is 15 seconds, the minimum 1 second, and the maximum 255 seconds.
- hellotime seconds
- Set the time between broadcasting of Spanning Tree protocol configuration messages.
The default is 2 seconds, the minimum 1 second, and the maximum 255 seconds.
- priority value
- Set the bridge priority for Spanning Tree. The default is 32768.
Allowed numerical values range from 0 (highest priority) to 65535 (lowest priority).
- ifpriority interface value
- Set the Spanning Tree priority of the interface to value.
The default is 128, the minimum 0, and the maximum 255.
- ifpathcost interface value
- Set the Spanning Tree path cost of the interface to value.
The default is 55, the minimum 0, and the maximum 65535.
Description:
The brconfig utility is used to configure network bridge
parameters and retrieve network bridge parameters and status from io-pkt.
A network bridge creates a logical link between two or more IEEE 802 networks
that use the same (or similar enough) framing format.
For example, it's possible to bridge Ethernet and 802.11 networks together,
but it isn't possible to bridge Ethernet and Token Ring networks together.
To create a bridge interface, use the
ifconfig
command's create subcommand.
Perform all other bridge configuration using the brconfig utility.
Examples:
The following code creates a
bridge called bridge0, adds the interfaces ray0 and
fxp0 to the bridge, and then enables packet forwarding.
You could use such a configuration to implement a
simple 802.11-to-Ethernet bridge (assuming the 802.11 interface is in ad hoc mode).
ifconfig bridge0 create
brconfig bridge0 add ray0 add fxp0 up
Consider a system with two 4-port Ethernet boards. The following code, when placed
in the file /etc/ifconfig.bridge0 causes a bridge consisting
of all eight ports to be created with Spanning Tree enabled:
ifconfig bridge0 create
brconfig bridge0 \
add tlp0 stp tlp0 \
add tlp1 stp tlp1 \
add tlp2 stp tlp2 \
add tlp3 stp tlp3 \
add tlp4 stp tlp4 \
add tlp5 stp tlp5 \
add tlp6 stp tlp6 \
add tlp7 stp tlp7 \
up