Connecting containers to a network without allocating IPs

I’m working on a network application that manages IPs/ARP tables etc.
Currently my application works by opening a raw socket ( on relevant interfaces. The application handles all ingress/egress traffic on each “bound” interface.

I want to deploy my application as part of a swarm cluster. In this cluster I want to have a single network that is managed by my application. My initial though was that all I will need to do is to set the network IPAM driver to some null driver. Without a IPAM driver that will allocate IPs the network will be created, i.e the all the namespaces/veths etc will be created and connected to all the relevant the containers. Now that I have all the networks I can allocate IPs manually, manipulate the ARP table as I please etc.

Sadly I wasn’t able to achieve this goal. From what I could find in the documentation only one IPAM driver is available - the default driver, which doesn’t support the behavior that I want. More than that it seems like if docker is unable to allocate an IP for a container in a network it will refuse to connect the container to that network.

Currently I’m using pipework ( to achieve the wanted behavior. Is there a better way to do this?


I could not fully understand why you dont want default ipam driver. You mentioned abt allocating IP manually. We can specify custom subnets when creating docker network and static ips when creating container. Would that not help your case.
There are other Docker ipam plugins like infoblox( Other option is to write your own ipam plugin.


I wanted to know if I can do this with something that is built into docker.
If I need to use an external plugin or write an IPAM driver of my own than I just rather use pipework…

Thanks for the help though