New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
macvlan subinterface documentation does not work on Ubuntu 16.04 #5899
Comments
Hi, can you share your host routing table. |
This is my host's default routes:
The container I want the host to be able to talk to is at 10.11.12.144. |
The documented /etc/network/interfaces works for me, but since the mac0 network has a unique MAC each boot, it gets a new DHCP address each boot. I wonder if we should delete the current Working routes:
I have changed my /etc/network/interfaces to:
Note the addition of the mac address. |
@vidurous said he might be able to help update the docs with a more accurate example. |
Awesome thanks. I've got my system working after that slight modification to /etc/network/interfaces. Using pre-up/pre-down is a much better pattern then the other blogposts were using. |
We should also add a note about IPv6. I know needs to be disabled on the parent interface or else it will grab an address, but I think I'm missing routes still. I added this to /etc/sysctl.d/99-local.conf, but it isn't enough:
Before I had IPv6 working with:
I'm just happy that IPv4 host <-> container is working for my purposes so for now I'm disabling IPv6. |
The following ifcfg network interface adapter configurations have worked well concerning macvlans on RHEL variants and should work on Ubuntu as well. Macvlan 802.1q Trunk Bridge Mode example usage You'll need to create parent/slave interfaces specific to each vlan ontop of eth0 or whatever your network adapter is named. Something to the effect of eth0.1, eth0.2 where eth0.1 is vlan 1 and eth0.2 is vlan 2. You would also need to ensure the gateway lives on both vlan networks as well. Ensure to replace XXX.XXX.XXX.XXX fields with your specific values. Example configuration:
|
Hmm. Not surly about environment that you facing problem. But normally if you running macvlan feature on public cloud provider that will denied this communicate as baseline. And also if you running on your on-premise farm (Such as ESXi, OpenStack etc). You also need to set "promiscuous mode" before you operate on Host (Docker Host) inside |
Macvlan docs were written in #5936 so take a look. Also, yes, if you are on a cloud provider you probably can't use Macvlan. If you are still running into trouble, consider asking on https://forums.docker.com/. Thanks! |
Thank you!
… On Feb 7, 2018, at 11:36 AM, Misty Stanley-Jones ***@***.***> wrote:
Macvlan docs were written in #5936 so take a look. Also, yes, if you are on a cloud provider you probably can't use Macvlan. If you are still running into trouble, consider asking on https://forums.docker.com/. Thanks!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Closed issues are locked after 30 days of inactivity. If you have found a problem that seems similar to this, please open a new issue. /lifecycle locked |
File: engine/userguide/networking/get-started-macvlan.md, CC @mistyhacks
I have been using the macvlan adapter with great success for awhile now on Ubuntu 16.04 with Kernel 4.4.0. Today however, I needed my host and my container able to communicate.
Underneath "Communication with the Docker host over macvlan", it says:
This sounds like exactly what I need, but the command
ip link add mac0 link $PARENTDEV type macvlan mode bridge
is not enough for my system (Ubuntu 16.04). I still need commands for moving the IP address to the subinterface.This blogpost and moby/libnetwork#2008 and this question had more commands than the official docs, but I was still unable to ping after running them:
This blogpost looks the most complete with some route flushes, but it also failed to work for me.
What am I missing?
ip route flush
andip route add
maybe?For now I am just going to edit
/etc/network/interfaces
like the docs suggest and see how that goes.Also, there is a minor typo at the end of that section. "For more on Docker networking commands, see Working with Docker network commands](/engine/userguide/networking/work-with-networks/)." -> "For more on Docker networking commands, see Working with Docker network commands."
The text was updated successfully, but these errors were encountered: