I want to use docker for some experiments with software-defined networking, running emulators (which use pcap in promiscuous mode with their own IP stack) and the like. For this I need to connect containers to one or more bridge(s) without assigning them an IP address and gateway.
I understand that I can use pipework (https://github.com/jpetazzo/pipework) for this, but I was wondering if there’s a native solution in Docker that I’m missing, as it would massively simplify the cleanup/teardown operation in my scripts, for example
I don’t think that a network driver will work since the network plugin will always expect (and receive from docker) an IP address and gateway specification as part of the API (see here under “create network”: https://github.com/docker/libnetwork/blob/master/docs/remote.md)
If it would be possible to omit the IP address somehow, then the regular docker bridges would already work just fine for my purposes, but as far as I know is that you cannot omit layer 3 configuration when creating a network. If I’m wrong, please point me in the right direction
Yes. With the current plugin specification, it isnt possible to omit IP Address. But with 1.11, we introduced a concept of --ipam-driver=nil. This will let the network plugin control the fate of container’s ip-address. I haven’t tried the case when the plugin deliberately omit the ip-address/gateway.
Any news on this topic?
I really would like to be able to connect containers using pure L2 bridging/switching.
I tried to use the ipam “null” driver but the network driver complains about empty ipv4 pool.