Switching traffic through a docker container

I am trying to test some switching software that I have virtualized into a docker container. This is the topology I am trying to achieve:

Topology

When I try to set this up the Iperf client times out as opposed to saying that it can’t find the server.

Right now I’m using bridged networks for Anetwork and Bnetwork.

Should I be using a different network type?