(TL;DR: Avoid bridges whenever possible.)
On 02. 06. 2015 13:19, Mitar wrote:
Cannot you simply prevent broadcasting over this
switch and this is it?
Then Babel will not detect that nanobridges can directly talk to each
other, but will create routes for each hop.
No, this is not entirely ok. It is not enough that you just drop
"broadcast" traffic. What you should do is to prevent any data
forwarding on L2 (layer 2). All data forwarding should only happen on
L3, where you (the routing protocol) can control it via the routing tables.
You can do this using ebtables (eg. "br0" is the bridge interface):
ebtables -A FORWARD --logical-in br0 -j DROP
This will effectively make the bridge no longer be a bridge, but just a
bunch of ports which all come together under the same interface.
The only strange thing now is that traffic on L3 will now come from the
bridge (br0) and will have to also be routed back into the bridge (br0).
But underneath it will actually be routed into the proper port based on
the MAC address of the next hop. I think this should work, but to me it
doesn't seem right, so I would rather avoid it.
So why use the bridge at all? You should just use the distinct
interfaces instead. If there is a design that avoids the bridge, use it.