Docker Community Forums

Share and learn in the Docker community.

Connecting containers back to back for direct packet injection

Hi,
I am a newbie in Docker and I have been struggling to find a solution for my issue, without success so far. I have the following:

2 Docker networks:
docker network create --driver=bridge -o parent=eth0 Mgmt
docker network create --driver=bridge hub

2 Docker containers on the same host, CentOS7:
docker1 - docker run --net Mgmt --cap-add NET_ADMIN …
docker network connect hub <docker1_id>
docker2 - docker network connect hub <docker2_id>

On the host, I found the bridge between the 2 dockers(brctl show) and ran:
brctl stp <bridge_name> off;brctl setageing <bridge_name> 0;brctl setfd <bridge_name> 0

I found that containers are connected via their eth1 interfaces (IPs: 172.20.0.2, 172.20.0.3 )

Here’s the problem: When I run a tcpreplay on docker2 , I don’t see the packets coming on interface eth1 of docker1:
docker2: tcpreplay-edit -i eth1 -t -l 0 dhcp.pcap
tcpdump -ni eth1 port 68 (Packets are captured here)
docker1: tcpdump -ni eth1 port 68 (Packets not captured here)

However, if I am running on docker1 “tcpdump -ni any port 68”, packets are captured.
For my purposes, the packets need to be seen on interface eth1 of docker1.
Any ideas?

Thanks