Docker Community Forums

Share and learn in the Docker community.

Nework mode host + macvlan on same physical interface

docker

(Veslaoner) #1

Hello,

Environment
I have a docker-compose stack with several containers.
One of those containers is in network mode host.
One the other side, on a different docker-compose stack I have another container using macvlan.
Docker version is 18.06.1~ce~3-0~debian amd64.
System is Stretch 9.5.
OS is Debian.

Problem
The first container (network mode host) is delivering DHCP addresses on following host’s interface : eth2 which is working perfectly for all people connected to this interface.
The second container (macvlan parent eth2) have to get an IP from the first container.
When I make a tcpdump on eth2, I see the request from the second container and the response from the first.
When I make a tcpdump on eth0 inside the second container I can see only requests.
It’s same problem for all layer2 protocol, even the arp request are going from the second container and the responses doesn’t come back.

What I’ve tried

  • Remove all iptables rules
  • All macvlan_modes
  • Static arp entries
  • Used bridge on second container and added eth2 to the bridge
  • Arping each time the mac of the second container from the second container : doesn’t work

I can’t add the driver ipvlan because my current kernel doesn’t support it, but I can compile another one with the good config if necessary.

I really dont know what to do … someone already had this problem before.

Regards.