I am having some problems with Docker MacVLAN. When I create a network with Docker MacVLAN and two containers, the two containers can ping each other but neither one can ping any machine on the internet. The Internet is unreachable.
I also tried this very simple example:
sudo docker network create -d macvlan --subnet=192.168.1.xx/26 --gateway=192.168.1.yy --aux-address="exclude_host=192.168.1.zz" -o parent=eth0 mynet sudo docker run --net=mynet -it --rm image/centosbase:v1 ping -c 4 22.214.171.124
this also fails.
When I do, from within a container,
ip a show eth1 I get:
35: eth1@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc noqueue state UNKNOWN link/ether 02:42:c0:a8:01:42 brd ff:ff:ff:ff:ff:ff link-netnsid 0 inet 192.168.1.xx/26 scope global eth1 valid_lft forever preferred_lft forever inet6 fe80::42:c0ff:fea8:142/64 scope link valid_lft forever preferred_lft forever
Is it normal that the state is UNKNOWN?
Docker using the default bridge mode works with no problems.
I am using Docker version 1.13.0, build 49bf474 on a CentOS7 VM.
Any idea on what I may be doing wrong? Or perhaps is AWS that does not allow the use of the macvlan driver?