I am trying to create two MACVLANs on the same adapter (eth0) in the same subnet (192.168.10.0/24) and the same gateway (192.168.10.1 - my router).
sudo docker network create -d macvlan -o parent=eth0 --subnet=192.168.10.0/24 --gateway=192.168.10.1 --ip-range=192.168.10.199/32 test1
this works well
sudo docker network create -d macvlan -o parent=eth0 --subnet=192.168.10.0/24 --gateway=192.168.10.1 --ip-range=192.168.10.200/32 test2
This produces errormessage
Error response from daemon: failed to allocate gateway (192.168.10.1): Address already in use
i found this problem a couple of times on the net but unfortunately no solution. I guess i should extend the ip-range (192.168.10.199/29) but i have no clue how to bind the two macvlans (test1 and test 2) then to a specific ip-adress.
I would appreciate your suggestions.