# Revision history [back]

So far, macvlan appears to be the only viable option.

It works more often than not but sometimes subscribers are unable to establish connection to a publisher. Restarting the subscriber container a couple of times seems to get things moving again. If you need to connect to the nodes in the containers from the host, you can add a bridge like so:

docker network create -d macvlan \
--subnet=192.168.1.0/24 \
--gateway=192.168.1.1 \
--ip-range=192.168.1.192/26 \
-o parent=eth0 macnet

sudo ip link set macnet-shim up

docker run --rm -d --network macnet <IMAGE>


So far, macvlan appears There appear to be the only viable option.two potential workarounds:

It works HOST:

If you want to use host networking, you also much share the pid space so that each DDS node can generate a unique GUID. ( All thanks go to @ruffsl, more detail here )

docker run --rm -d --net=host --pid=host <IMAGE>


MACVLAN:

This workaround seems to work more often than not but sometimes subscribers are unable the container needs to establish connection to a publisher. Restarting be restarted before it will see all nodes on the subscriber container a couple of times seems to get things moving again. If you need to connect to the nodes in the containers from the host, you can add a bridge like so:network.

docker network create -d macvlan \
--subnet=192.168.1.0/24 \
--gateway=192.168.1.1 \
--ip-range=192.168.1.192/26 --ip-range=192.168.1.64/27 \