How do I access container from different host on same network when using macvlan driver

I’ve created my macvlan network as follows:

docker network create -d macvlan -o parent=eth0 \
--subnet \
--gateway \
--ip-range \
--aux-address 'host=' \

I run my container as follows:

docker run --name nginx -d --net mynet nginx

The container’s IP is

I have two hosts that can ping each other both ways:

Host A: (where Docker engine is running)

Host B:

Because macvlan by definition doesn’t allow host-to-container communication, I have created a sub-interface as follows to allow this communication:

ip link add mynet-shim link eth0 type macvlan  mode bridge

ip addr add dev mynet-shim

ip link set mynet-shim up

ip route add dev mynet-shim

I’m able to access the container from host A as when I run:

curl , I receive the nginx default html

I’m also able to ping the container from host A.

When I run docker logs nginx , it says: - - [02/Nov/2018:16:19:32 +0000] "GET / HTTP/1.1" 200 612 "-" "curl/7.29.0" "-"

So it is working with the mynet-shim sub-interface.

However, I’m unable to access the container from host B as both the curl and ping commands to the container fail from host B, even though it’s in the same subnet as host A and the container

Is there any additional configuration that I may have missed on host B?