multi container ping failed
moluzhui opened this issue · 1 comments
moluzhui commented
My project requires multiple container environments, and each lxc
needs to be able to ping with each other. I use settings similar to the following
config.vm.define :"lxc1" do |node_conf|
node_conf.vm.network "private_network", ip: "192.168.45.2",lxc__bridge_name: "project"
...
end
config.vm.define :"lex2" do |node_conf|
node_conf.vm.network "private_network", ip: "192.168.42.3",lxc__bridge_name: "project"
...
end
Host can ping each container,
root@lxc:~/lxc/vagrantlxcTest# ping 192.168.42.3
PING 192.168.42.3 (192.168.42.3) 56(84) bytes of data.
64 bytes from 192.168.42.3: icmp_seq=1 ttl=64 time=0.059 ms
64 bytes from 192.168.42.3: icmp_seq=2 ttl=64 time=0.037 ms
but I can't ping from one container to another,
vagrant@lxc1:~$ ping 192.168.42.3
PING 192.168.42.3 (192.168.42.3) 56(84) bytes of data.
Do I need to add other settings to do that?
I did not do any settings for the
project
bridge, which is directly used.
I use default
lxcbr0
and match the appropriate IP allows the containers to ping each other
I would very appreciate it if you guys can give me some advice or solutions.