1
1
To recreate a mesh network topology, I like to connect multiple network namespaces. Each connection end is an interface in such a namespace.
Now I need to connect all end point interfaces in a namespace into one. Bridges come into mind, but they do not behave the way I need to, because the do routing on their own.
So I need to need to make the bridge to act as a hub and block communication between the interfaces of the bridge.
To configure the bridge to act as a hub:
ip link set "br0" type bridge stp_state 0
ip link set "br0" type bridge ageing_time 0
ip link set "br0" type bridge forward_delay 0
(this should cause all packets to be flooded to all other interfaces, except the sender)
But how do I block any traffic between the interfaces of the bridge?
Is there other interfaces besides eth0 and eth1? If not, then why are you bridging them if you don't want them to talk? – LawrenceC – 2019-10-08T16:24:26.713
It's for testing mesh routing software. I want to create a network topology. This means that packets need to be resend by applications and not to be forwarded by the bridge between eth0 and eth1. – mwarning – 2019-10-08T20:18:42.847
Then don't put them in a bridge. – LawrenceC – 2019-10-08T20:21:34.240
but the packets have to arrive on the same interface (which is the bridge interface) – mwarning – 2019-10-08T20:41:55.290
Bridges take multiple interfaces and make them act as one. They are like the software version of Ethernet switches. If you don't want traffic to move between them then you don't want a bridge. You may be wanting to do VLANs or tunnels which is something different. Update your question to include the mesh routing software you're working with because at the moment what you're asking doesn't make much sense. :) – LawrenceC – 2019-10-08T21:22:44.377
@LawrenceC ok, I rewrote pretext of the question. – mwarning – 2019-10-08T21:39:11.397