devplayer0 / docker-net-dhcp

Docker network driver for networking on a host bridge with DHCP-allocated IP addresses
GNU General Public License v3.0
202 stars 55 forks source link

IPAM driver ? #15

Closed blop closed 3 years ago

blop commented 3 years ago

Hello,

First of all thank you for the new implementation ! Many dreamed of it and you've delivered something working ;-)

I was wondering why do you need a whole network plugin in order to perform the DHCP requests, instead of having only an IPAM driver. Or is this not pluggable/mixable within Docker ?

The thing is, we already have the bridge driver working and the macvlan bridge supported as well. And all the interfaces setup are already working, all we needed was the IP assignment.

This could allow having DHCP over both normal and macvlan bridges and also allow having some services with a static user defined IP address and some with a DHCP lease.

What do you think of that? ;-)

Regards,

Olivier

devplayer0 commented 3 years ago

Hi Olivier, many thanks :) Unfortunately it's not really practical to implement this as an IPAM driver alone. Docker's IPAM model (described in detail here) is based on Docker itself having authority over IP address ranges and requesting specific addresses, which doesn't really translate well to DHCP.