I added a macvlan docker network on my Ubuntu instance at GCP. However I cannot access to/from instance. I thought maybe there is a restriction which enforces exactly one MAC per instance.
Anyone knows about this or is there a workaround? Is there a way to see how the arp/mac table looks like on the gateway side at GCP?
My intention was to use a macvlan network for a docker which uses a secondary IP address from the instance primary network.
More details: I assigned a secondary IP range to a VM instance. e.g. VM Internal IP (Primary): 10.10.10.2/24, VM Secondary IP Range: 10.10.11.0/24
GCP routes VM secondary range to the VM IP address. I tested this by creating a test loopback with IP 10.10.11.2 and accessing to this IP from a different VM in the same VPC. It worked.
In the next step I removed that bogus loopback and installed a standalone docker container using a macvlan network with IP address 10.10.11.2.
I was expecting that new container attached to this macvlan network will be reachable through the VM ens4 interface with container`s MAC and IP address(10.10.11.2).
According to documentation this is what macvlan network does. It completely isolates the macvlan network from the host network by using a new MAC address for each container in the macvlan network.
The only difference between an IP from secondary range on the host VM and on the docket container residing in the macvlan network is that the container is using a different MAC than the host VM.