I am sorry if this has been posted before and answered. I was unable to locate my exact scenario with a working solution provided.
I currently have a Synology NAS with docker installed. I created a macVLAN with the following configurations.
Network 192.168.1.0/24
DHCP Range 192.168.1.10-192.168.1.239
Docker Host / Synology 192.168.1.215
macVLAN
Subnet 192.168.1.0/24
IP Range 192.168.1.240/28
Gateway 192.168.1.1
I have 3 containers on this macvlan and all are able to communicate with each other. They are also able to access my gateway and access the internet. However when I try and ping 192.168.1.215 I am getting a route issue. I noticed in my ARP table 215 did not have a mac address it was listed as unknown.
What is the cleanest solution to have my containers access my host?
I am trying to create a reverse proxy to some applications on the Synology NAS that are not docker containers.
So are you saying i have to do this as an addition
ip link add foobar link ovs_eth0 type macvlan mode bridge
ip addr add 192.168.1.215/32 dev foobar
ip link set foobar up
ip route add 192.168.1.241/32 dev foobar
or even better
ip route add 192.168.1.240/28 dev foobar?
So the docker create network is permanent but the links and routes are not?
Basicly it creates a new macvlan client interface on the host side and adds routing for the macvlan subnet using the hosts’s macvlan client inteface. This will allow host to container communication. Though, for container to host communication you will have to use the new macvlan client interfaces ip (the one from the ip addr add line!).
Since this configuration will not survive a reboot, you will need to put those command in a startup task.