root@node-1:~# ip a s
root@node-1:~# ip r s
root@node-1:~# brctl show
root@node-1:~# ovs-vsctl show
root@node-1:~# ping <other host>
root@node-1:~# ping <other host bridge>
Last active
December 29, 2023 07:07
-
-
Save noteed/8656989 to your computer and use it in GitHub Desktop.
Docker - Open vSwitch setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For lxc-docker. | |
echo deb http://get.docker.io/ubuntu docker main \ | |
> /etc/apt/sources.list.d/docker.list | |
apt-key adv \ | |
--keyserver keyserver.ubuntu.com \ | |
--recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
apt-get update | |
apt-get install -q -y vim openvswitch-switch bridge-utils lxc-docker | |
echo 'DOCKER_OPTS="--bridge=docker0"' >> /etc/default/docker | |
service docker restart | |
# This Gist. | |
wget https://gist.githubusercontent.com/noteed/8656989/raw/711136057df062be4543b098e227615a89dd80ee/shared-docker-network.sh | |
echo Edit shared-docker-network.sh and run it. |
Recently got a mail from Caleb Crane who faced the same issue and apparently has solved the issue. Am quoting it here, so that the rest of us can use it if faced with the issue. The solution and all credits go to Caleb Crane.
"
I got it working in my environment. It turned out to be necessary to set the MTU to 1420 in the containers. GRE doesn’t support fragmentation so when ssh tried to send a frame at 1500 bytes the client wasn’t receiving the entire thing.
"
I can confirm that --mtu=1420 is required.
see this great tutorial for setting up a "MULTI-HOST DOCKER NETWORK" : https://wiredcraft.com/blog/multi-host-docker-network/
It is also being specific about MTU.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am trying to get a multiple host docker setup and have followed you blog post "http://goldmann.pl/blog/2014/01/21/connecting-docker-containers-on-multiple-hosts/" and also this gist
Based on that I am able to ping the containers from each host [and across the host], so network connectivity between the different containers spread over the 2 hosts seems to work properly. [PS: My Host is Ubuntu 14.04 and my docker version is Docker version 1.0.1, build 990021a
After that I setup some containers and here is what I observe, kindly let me know if I am missing something or is this a limitation of the setup.
When I try ssh from one container from Host A to another container on Host B, or just try to ssh from Host A to any container on Host B, the ssh seems to be stuck. A typical output looks like this
After that it is stuck at that point.
More importantly I see the same issues on different application similar to SSH.
you response and any feedback/guideline would be really great and appreciated.