for-mac icon indicating copy to clipboard operation
for-mac copied to clipboard

macvlan driver doesn't work in MacOS

Open ajoldham opened this issue 5 years ago • 133 comments

Continuation of : https://github.com/docker/for-mac/issues/3447 as it was auto-closed. This isn't fixed in the latest Docker Edge 19.03.2 with MacOS 10.14.6.


$ ifconfig en9 en9: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=4<VLAN_MTU> ether 58:ef:68:7d:06:05 inet6 fe80::1028:71b1:5694:b4bf%en9 prefixlen 64 secured scopeid 0x12 inet 10.42.34.91 netmask 0xfffffc00 broadcast 10.42.35.255 nd6 options=201<PERFORMNUD,DAD> media: autoselect (1000baseT ) status: active $ docker network create -d macvlan --subnet=10.42.32.0/22 --gateway=10.42.32.1 -o parent=en9 pub_net Error response from daemon: invalid subinterface vlan name en9, example formatting is eth0.10

ajoldham avatar Sep 26 '19 07:09 ajoldham

+1

If you specify eth0 in parent, it will get created, but won't work =)

maxpavlov avatar Oct 01 '19 20:10 maxpavlov

same problem here with en0

ViperRNMC avatar Nov 28 '19 15:11 ViperRNMC

I've been losing my mind in various attempts in getting macvlan working, and this is why. Blindly using eth0 instead of the actual en0 interface appears to work when it shouldn't.

adocehic avatar Dec 28 '19 01:12 adocehic

Any workarounds for this?

obmuc avatar Jan 07 '20 22:01 obmuc

following

HunterDG avatar Feb 24 '20 04:02 HunterDG

Still not working in Docker 2.2.0.4.

amaisano avatar Mar 31 '20 17:03 amaisano

I ended up buying a Dell R620. It was easier to actually set up a whole linux server to really take advantage of Docker than it was to waste time working around this bug or waiting for it to get fixed.

It's rather annoying as this is a very clear and reproducible bug that on the surface appears to be simple.

On Jan 7, 2020, at 2:19 PM, obmuc [email protected] wrote:

Any workarounds for this?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/docker/for-mac/issues/3926?email_source=notifications&email_token=ABUXDOJHGHKJO523LWEJ7NLQ4T5VPA5CNFSM4I2V6M62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIKPQFA#issuecomment-571799572, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUXDOKNKYUF7D7JAQ6RSP3Q4T5VPANCNFSM4I2V6M6Q.

adocehic avatar Mar 31 '20 17:03 adocehic

@adocehic are you saying typing eth0 actually works with en0 (even though it shouldn't)?

amaisano avatar Mar 31 '20 18:03 amaisano

I can confirm that it's still not working with Docker Desktop 2.2.0.5 & Docker 19.03.8.

mastix avatar Apr 13 '20 10:04 mastix

@mikeparker I think we would really wish for this to be implemented for Mac OS, this is stopping me from using Docker in my home lab.

rfoltz avatar Jun 23 '20 02:06 rfoltz

Still not working with Docker Desktop 2.3.0.4 & macOS 10.15.6

dciancu avatar Aug 03 '20 08:08 dciancu

docker network create -d macvlan \
  --subnet=192.168.2.0/24 \
  --gateway=192.168.2.1 \
  -o parent=eth0 \
  my-macvlan-net

I have tested above command on my macOSX 10.15.6. This seems to be a lie. It works. But ifconfig does not show eth0, but en0

dinhkk avatar Oct 01 '20 12:10 dinhkk

Thanks. It seems to configure, but when I run a container using that network, I can't seem to ping or communicate out of it.

ajoldham avatar Oct 01 '20 14:10 ajoldham

Yes, macOS Docker allows configuring macvlan bound to parent eth0 interface (which doesn't exist on the host). Multiple Containers placed in that macvlan can communicate with each out, but not out of the host.. which is what I would expect when binding a network to a phony adapter.

Any thoughts on when we can actually see this fixed? Disappointing that core Docker feature like this doesn't work on macOS.

ctyrider avatar Oct 13 '20 14:10 ctyrider

This would be such a useful feature... I can confirm that on my Mac I can't configure a macvlan network interface with Docker version 19.03.13, build 4484c46d9d.

Alexivia avatar Oct 25 '20 00:10 Alexivia

It's looking like this bug might not be getting fixed for a while. What are other options? How else can we configure and launch a set of containers via 'docker-compose up' to make them accessible to other machines on a LAN?

michaelprescott avatar Nov 15 '20 03:11 michaelprescott

And, same failure for ipvlan. I wish Docker docs made this bold and clear that both are broken on macOS. I learned a lot trying to solve it, but ultimately it was a waste of time for me.

It takes a little longer to setup what I need with VMs and VMWare Fusion, but it works. Interestingly, in Fusion it's categorized under the "Bridged Networking" configuration. Noting that, I circled back to Docker and tried setting up a bridged network. Still no luck. The containers still don't appear on the LAN. Anyhow, if you are free to move to a linux development machine where macvlan and ipvlan work, here are some really great articles about macvlan https://hicu.be/tag/macvlan

michaelprescott avatar Nov 15 '20 08:11 michaelprescott

Confirmed.

mminks avatar Dec 04 '20 09:12 mminks

Confirmed.

waiting

onlinefchen avatar Jan 01 '21 00:01 onlinefchen

Issues go stale after 90 days of inactivity. Mark the issue as fresh with /remove-lifecycle stale comment. Stale issues will be closed after an additional 30 days of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle stale

docker-robott avatar Apr 01 '21 01:04 docker-robott

/lifecycle frozen

barinet avatar Apr 29 '21 18:04 barinet

/remove-lifecycle stale

barinet avatar Apr 29 '21 18:04 barinet

/remove-lifecycle stale

Rubberduck1971 avatar Jun 17 '21 10:06 Rubberduck1971

/lifecycle frozen

Rubberduck1971 avatar Jun 17 '21 10:06 Rubberduck1971

+1

fdevans avatar Jul 28 '21 21:07 fdevans

+1

pkishino avatar Sep 20 '21 23:09 pkishino

+1

thueske avatar Sep 22 '21 16:09 thueske

+1

arrrgi avatar Sep 26 '21 07:09 arrrgi

+1

joaoceron avatar Sep 30 '21 17:09 joaoceron

+1

Edisonliiii avatar Oct 14 '21 12:10 Edisonliiii