On my local network, my DHCP server will not assign any addressesĪbove 192.168.1.190. Task is accomplished with the -ip-range option to docker network create. Infrastructure and is beyond the scope of this document. How you accomplish the former depends entirely on your local network You must tell Docker about that reserved range of addresses. Will not assign addresses in a given range. You must configure any DHCP service on your network such that it You can avoid this by reserving a portion of the subnet range for useīy Docker. This leads to the potential for conflicts: if Docker picksĪn address that has already been assigned to another host on your Will select an address from the subnet range and assign it to yourĬontainer. When you create a container attached to your macvlan network, Docker You might run something like this: docker network create -d macvlan -o parent=eno1 \ To create a macvlan network named mynet attached to that interface, Valid_lft 73303sec preferred_lft 73303sec
Iįor the purpose of this example, let’s say we have a host interfaceĮno1 that looks like this: 2: eno1: mtu 1500 qdisc fq_codel state UP group default qlen 1000 Great, but it does come with some minor caveats and limitations. “clones” of a physical interface on your host and use that to attachĬontainers directly to your local network. Question is the macvlan network type, which lets you create A question that crops up regularly on #docker is “How do I attachĪ container directly to my local network?” One possible answer to that