3

I have a bare metal server on Hetzner with IP 5.6.7.8 and 8 additional IPs reserved for me.

IPs: 1.2.3.144 to 1.2.3.151

subnet: 1.2.3.144/29

netmask: 255.255.255.248

broadcast: 1.2.3.151

gateway: 5.6.7.8

Now I want to create Docker network with type macvlan

docker network create macvlan --subnet=1.2.3.144/29 --gateway=5.6.7.8 -o parent=enp0s31f6 macvlan1

But this command causes an error

no matching subnet for gateway 5.6.7.8

Note when I set for example IP 1.2.3.150 and gateway 5.6.7.8 on a virtual machine on the host, it works correctly! but I can't set this none matching gateway in Docker network create command.

Community
  • 1
  • 1
Omidreza Bagheri
  • 781
  • 1
  • 11
  • 22

0 Answers0