0

I need to measure the performance of a linux network bridge (https://wiki.archlinux.org/title/Network_bridge) on a particular machine (machine A). My initial idea for a setup looked like this:

                              +-------------+
                              |  machine A  |
                              +-------------+
                              | eth0 | eth1 |
                              +-------------+
                                 ^       ^
+--------------+                 |       |               +--------------+
|   machine B  |<----------------+       +-------------->|   machine C  |
+--------------+                                         +--------------+

With machine A acting as the switch (bridging eth0 and eth1), I'd measure the link between machine B and machine C using something like iperf. The trouble is, I don't have access to any suitable machines to play the roles of machine B and machine C. Someone suggested the following setup instead, using machine A as a stand-in for both (as it has more than enough physical interfaces):

                        +---------------------------+
                        |          machine A        |
                        +---------------------------+
                        | eth0 | eth1 | eth2 | eth3 |
                        +---------------------------+
                            ^      ^      ^      ^
                            |      |      |      |
                            +------+      +------+

this time bridging eth1 and eth2, and then measuring the performance between eth0 and eth3. To me, this seems a bit silly at first, but I can't say with certainty that it wouldn't work. My concern is that machine A would figure out that the traffic between eth0 and eth3 can be routed internally, bypassing the bridge and physical links.

Am I right or wrong, will this setup work?

  • Note: I posted this to network engineering first, but it was deemed off topic. I was suggested to post here. – mortelsson Jan 03 '23 at 15:52
  • Which connection speeds are we talking about? – Massimo Jan 03 '23 at 16:08
  • The bridge is supposed to replace a single 100 Mbit link (all interfaces in the pic are 1 Gbps ). So anything near or above 100 Mbit is fine. But it would be interesting to see what speeds can be achieved. @Massimo – mortelsson Jan 03 '23 at 16:18

1 Answers1

3

You can, but you need to put those three instances in different network namespaces or different VRFs so they won't figure out the "shorter" path. Also you can check was the shorter path really taken by observing the counters on the bridge physical ports (and by looking at NIC LEDs — they usually blink when passing traffic).

Nikita Kipriyanov
  • 10,947
  • 2
  • 24
  • 45