I have one simple server with a bunch of docker containers running on an ipvlan network, which uses as it's net. In there is a gateway and everything is working great.

I need to run one container in a different vlan, so I created an interface called "vlan41" on my host and I'm trying to create a second ipvlan network on it :

# docker network  create  -d ipvlan --subnet= --gateway= --ip-range= -o ipvlan_mode=l2 -o parent=vlan41 mynet
Error response from daemon: failed to allocate gateway ( Address already in use

I've tried everything I could think of, I cannot make it work. I thought it might be a poor error message caused by the fact that the vlan is sharing the same raw device as the existing ipvlan network, but changing the mac address of the vlan doesn't seem to solve it.

Any way to make this work ? Thanks

  • Why is the address already in use? Mar 6, 2021 at 18:41
  • Well it's the gateway IP but strangely changing the gateway doesn't seem to do solve this, it really has something against that IP specifically. As far as I can the only place this address is used is in the host's routing table for the vlan41 interface, nowhere else (ip route add default via table vlan41 && ip rule from table vlan41)
    – Ulrar
    Mar 6, 2021 at 19:17
  • Well, trhat's why it isn't working. Mar 6, 2021 at 19:19
  • What do you mean ?
    – Ulrar
    Mar 6, 2021 at 19:26
  • You specified an IP address that already exists, when it is expecting a network that does not already exist. Mar 6, 2021 at 19:57


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.