Docker Community Forums

Share and learn in the Docker community.

Docker macvlan driver query - Amazon Web Service

(Mohanestack) #1


I am testing the possibilities of using macvlan driver in aws platform.

All my instance are getting IP address from the subnet & gateway

set up 2 EC2 instances in the same subnet( with below configuration.

EC2 Instance A
Docker version 18.06.1-ce, build e68fc7a
IP address:

Created a macvlan network.
docker network create -d macvlan --subnet --gateway -o parent=eth0 pub_net

Start a container with IP address from macvlan network.
docker run -d --network pub_net --ip testperf/testapp

Could verify container started successfully with given mac vlan ip address.

“Name”: “pub_net”,
“Id”: “1f98a3d2a7a3f0432b22947aa3073489929ace1dee5c48a745f6a7c2c5d1ecb1”,
“Created”: “2018-09-03T10:16:14.642803689Z”,
“Scope”: “local”,
“Driver”: “macvlan”,
“EnableIPv6”: false,
“IPAM”: {
“Driver”: “default”,
“Options”: {},
“Config”: [
“Subnet”: “”,
“Gateway”: “”
“Internal”: false,
“Attachable”: false,
“Ingress”: false,
“ConfigFrom”: {
“Network”: “”
“ConfigOnly”: false,
“Containers”: {
“6e38bf7534d173b4c61cab6d0901b7d82eb68d2e15427b0a9ee14788875ed0c3”: {
“Name”: “focused_saha”,
“EndpointID”: “3d06b5db5e8deb76c8d929528d4458cf7ssdb9b5f7c2a7965889e92653dd23226”,
“MacAddress”: “02:42:ac:1f:50:0a”,
“IPv4Address”: “”,
“IPv6Address”: “”
“Options”: {
“parent”: “eth0”
“Labels”: {}

EC2 Instance B
IP address:

Tried to ping the docker container( launched in EC2 instance A from EC2 Instance B, host unreachable error throws.

How to make the EC2 instance B ping the container IP(macvlan network) in EC2 Instance A?
Do AWS support macvlan network driver?

Thanks in advance.