Macvlan and container to container communication

Yep.

Think of it as if the parant interface of the macvlan will act as if you plug another switch into the network and the macvlan child interfaces will be connected to that switch.

Of course this is not true for macvlan. The macvlan child interfaces can communicate with all other devices in the same subnet, except the parent interface. A workaround to fix this behavior exists: it will introduce a macvlan child interface to the host, which can be used to set a route for the macvlan subnet from the host. Though containers will need to talk to the hosts child interface’s ip, instead of the parent interfaces ip.

There are plenty of blog posts that describe what needs to be done.

2 Likes