VMWare Workstation Configuring Docker Multi-Macvlan network method
The answer is ..... Change VirtualBox
Pop...
VMWare Workstation host-only Network, three virtual machines GW, HOST1, Host2
Build two Macvlan networks on three virtual machines, with VLAN IDs 10 and 20, according to the https://www.cnblogs.com/CloudMan6/p/7383919.html instructions
is now
The same host, the same VLAN under the container can be interconnected ping, it is good to understand, all Go enp0s8.10 interface (VLAN ID 10)
But different host, the container under the same VLAN, Ping does not pass, should be C1---> (host1) enp0s8.10---->802.1q encapsulation VLAN TAG----> (host1) enp0s8---> VMware Virtual Switch---> (HOST2) enp0s8---> Unlock vlan TAG---> (host2) enp0s8.1--->c3
Different host, different VLAN under the container, according to the instructions configured the third host of the two virtual VLAN network card as a gateway, with the iptables rules, but also ping does not pass.
A test found that when C1 ping C3, (host1) enp0s can catch the ICMP packet with VLAN tag , host windows in the Host-only network's network card grab packet, can catch without VLAN tag ICMP packet (promiscuous mode), but Host2, the other host of the same host-only network, cannot catch the ICMP packet.
C1 ping C3 because it belongs to the same VLAN, do not walk the gateway, C1 ping C4, different VLANs need to cross the gateway line, found that the network Sekiya Ping is different, the capture packet found that the gateway is located in the virtual machine GW, is also not catch the ICMP packet.
So I suspect that the VMware Workstation host-only Virtual Switch does not support the packet with VLAN tag? Or not supported? A packet with VLAN tag is sent to a port on the virtual switch, and the virtual switch does not forward the packet, and the other host does not receive it.
Google did not find a half day,,,,
I look at the tutorial with the VirtualBox, just change it to try, sure enough ....
VMWare Workstation Configuring Docker Multi-Macvlan network method