<div dir="ltr"><div>>>>>Looks like a Routing Problem. Show me the output off route -n<br><i><span style="color:rgb(102,102,102)"><br>root@vm0:~# route -n<br>Kernel IP routing table<br>Destination     Gateway         Genmask         Flags Metric Ref    Use Iface<br>

0.0.0.0         10.0.2.2        0.0.0.0         UG    100    0        0 eth0<br>
10.0.2.0        0.0.0.0         255.255.255.0   U     0      0        0 eth0<br><br><br>root@host:~# route -n<br>Kernel IP routing table<br>Destination     Gateway         Genmask         Flags Metric Ref    Use Iface<br>


0.0.0.0         10.0.2.2        0.0.0.0         UG    100    0        0 eth0<br>10.0.2.0        0.0.0.0         255.255.255.0   U     0      0        0 eth0<br>10.0.2.0        0.0.0.0         255.255.255.0   U     0      0        0 lxcbr0<br>


192.168.56.0    0.0.0.0         255.255.255.0   U     0      0        0 eth1<br>192.168.122.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0</span></i><br><br><br>Thank you Chris for identifying the problem, The problem got solved.<br>

<br></div>Since there were two entries for 10.0.2.0 in the host machine. i deleted the eth0 entry<br>route del -net 10.0.2.0 netmask 255.255.255.0 gw 0.0.0.0 dev eth0<br><br>, now all the nodes are communicating with each other. Thank you for the help.<br>

</div><div class="gmail_extra"><br><br><div class="gmail_quote">On 11 January 2013 15:51, Sujay M <span dir="ltr"><<a href="mailto:sujay.m17@gmail.com" target="_blank">sujay.m17@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">Containers are able to ping other containers but container to host and host to container is not working. Please help me.<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">

On 11 January 2013 14:20, Sujay M <span dir="ltr"><<a href="mailto:sujay.m17@gmail.com" target="_blank">sujay.m17@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi all,<br><br></div>I am using Ubuntu 12.04 as Host OS. I have 4 LXC containers setup namely vm0, vm1, vm2, vm3. I want to establish a network between these so that the containers and host can communicate with each other. How can i do this? I have pasted some of the outputs which may be useful.<br>



<br><i><span style="color:rgb(68,68,68)">root@host:~# cat /etc/network/interfaces <br># This file describes the network interfaces available on your system<br># and how to activate them. For more information, see interfaces(5).<br>



<br># The loopback network interface<br>auto lo<br>iface lo inet loopback<br><br># The primary network interface (VirtualBox Adapter 1 - NAT)<br>auto eth0<br>iface eth0 inet dhcp<br><br></span></i></div><div><i><span style="color:rgb(68,68,68)"># To to ssh to the ubuntu host (VirtualBox Adapter 2 - Host only)<br>



</span></i></div><div><i><span style="color:rgb(68,68,68)">auto eth1<br>iface eth1 inet static<br>address 192.168.56.2<br>netmask 255.255.255.0<br><br>auto lxcbr0<br>iface lxcbr0 inet dhcp<br>bridge_ports eth0<br>bridge_stp off<br>



bridge_maxwait 5<br>post-up /usr/sbin/brtcl setfd lxcbr0 0<br><br><br>root@host:~# ifconfig<br>eth0      Link encap:Ethernet  HWaddr 08:00:27:93:1c:ac  <br>          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0<br>



          inet6 addr: fe80::a00:27ff:fe93:1cac/64 Scope:Link<br>          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1<br>          RX packets:2877 errors:0 dropped:0 overruns:0 frame:0<br>          TX packets:2584 errors:0 dropped:0 overruns:0 carrier:0<br>



          collisions:0 txqueuelen:1000 <br>          RX bytes:1691148 (1.6 MB)  TX bytes:141792 (141.7 KB)<br><br>eth1      Link encap:Ethernet  HWaddr 08:00:27:6c:2e:6a  <br>          inet addr:192.168.56.2  Bcast:192.168.56.255  Mask:255.255.255.0<br>



          inet6 addr: fe80::a00:27ff:fe6c:2e6a/64 Scope:Link<br>          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1<br>          RX packets:5684 errors:0 dropped:0 overruns:0 frame:0<br>          TX packets:4444 errors:0 dropped:0 overruns:0 carrier:0<br>



          collisions:0 txqueuelen:1000 <br>          RX bytes:481447 (481.4 KB)  TX bytes:648016 (648.0 KB)<br><br>lo        Link encap:Local Loopback  <br>          inet addr:127.0.0.1  Mask:255.0.0.0<br>          inet6 addr: ::1/128 Scope:Host<br>



          UP LOOPBACK RUNNING  MTU:16436  Metric:1<br>          RX packets:671 errors:0 dropped:0 overruns:0 frame:0<br>          TX packets:671 errors:0 dropped:0 overruns:0 carrier:0<br>          collisions:0 txqueuelen:0 <br>



          RX bytes:113342 (113.3 KB)  TX bytes:113342 (113.3 KB)<br><br>lxcbr0    Link encap:Ethernet  HWaddr 08:00:27:93:1c:ac  <br>          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0<br>          inet6 addr: fe80::a00:27ff:fe93:1cac/64 Scope:Link<br>



          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1<br>          RX packets:1262 errors:0 dropped:0 overruns:0 frame:0<br>          TX packets:23 errors:0 dropped:0 overruns:0 carrier:0<br>          collisions:0 txqueuelen:0 <br>



          RX bytes:60342 (60.3 KB)  TX bytes:2442 (2.4 KB)<br><br>veth08H1r9 Link encap:Ethernet  HWaddr ba:9b:26:18:6c:83  <br>          inet6 addr: fe80::b89b:26ff:fe18:6c83/64 Scope:Link<br>          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1<br>



          RX packets:1365 errors:0 dropped:0 overruns:0 frame:0<br>          TX packets:1803 errors:0 dropped:0 overruns:0 carrier:0<br>          collisions:0 txqueuelen:1000 <br>          RX bytes:81055 (81.0 KB)  TX bytes:1622144 (1.6 MB)<br>



<br>virbr0    Link encap:Ethernet  HWaddr 8a:3b:79:38:63:9e  <br>          inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0<br>          UP BROADCAST MULTICAST  MTU:1500  Metric:1<br>          RX packets:0 errors:0 dropped:0 overruns:0 frame:0<br>



          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0<br>          collisions:0 txqueuelen:0 <br>          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)<br><br><br></span></i><br><i><span style="color:rgb(68,68,68)"><i><span style="color:rgb(68,68,68)"><br>



<br></span></i></span></i><div>All vm0, vm1, vm2, vm3 have same config, IP address and all produce the same output</div><i><span style="color:rgb(68,68,68)"><br></span></i></div><div><i><span style="color:rgb(68,68,68)">root@vm0:~# ifconfig<br>



eth0      Link encap:Ethernet  HWaddr 00:16:3e:4b:89:83  <br>          inet addr:10.0.2.29  Bcast:10.0.2.255  Mask:255.255.255.0<br>          inet6 addr: fe80::216:3eff:fe4b:8983/64 Scope:Link<br>          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1<br>



          RX packets:1850 errors:0 dropped:0 overruns:0 frame:0<br>          TX packets:1370 errors:0 dropped:0 overruns:0 carrier:0<br>          collisions:0 txqueuelen:1000 <br>          RX bytes:1625024 (1.6 MB)  TX bytes:81485 (81.4 KB)<br>



<br>lo        Link encap:Local Loopback  <br>          inet addr:127.0.0.1  Mask:255.0.0.0<br>          inet6 addr: ::1/128 Scope:Host<br>          UP LOOPBACK RUNNING  MTU:16436  Metric:1<br>          RX packets:6 errors:0 dropped:0 overruns:0 frame:0<br>



          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0<br>          collisions:0 txqueuelen:0 <br>          RX bytes:672 (672.0 B)  TX bytes:672 (672.0 B)<br></span></i><br><span style="color:rgb(68,68,68)"><br></span></div>



<div><i><span style="color:rgb(68,68,68)">root@vm0:~# cat /etc/network/interfaces <br># This file describes the network interfaces available on your system<br># and how to activate them. For more information, see interfaces(5).<br>



<br># The loopback network interface<br>auto lo<br>iface lo inet loopback<br><br>auto eth0<br>iface eth0 inet dhcp<br><br><br>root@vm0:~# ping 192.168.56.2<br>PING 192.168.56.2 (192.168.56.2) 56(84) bytes of data.<br>64 bytes from <a href="http://192.168.56.2" target="_blank">192.168.56.2</a>: icmp_req=1 ttl=63 time=1.63 ms<br>



<br>root@vm0:~# ping <a href="http://google.com" target="_blank">google.com</a>  <br>PING <a href="http://google.com" target="_blank">google.com</a> (173.194.36.4) 56(84) bytes of data.<br>64 bytes from <a href="http://bom04s01-in-f4.1e100.net" target="_blank">bom04s01-in-f4.1e100.net</a> (173.194.36.4): icmp_req=1 ttl=63 time=172 ms<br clear="all">



</span></i></div><div><div><div><i><span style="color:rgb(68,68,68)"><br>root@vm0:~# ping 10.0.2.15<br>PING 10.0.2.15 (10.0.2.15) 56(84) bytes of data.<br>From 10.0.2.29 icmp_seq=1 Destination Host Unreachable</span><br>


<br>
<br></i></div><div>also,<br><span style="color:rgb(68,68,68)"><i><br>root@ubuntu:~# ping 10.0.2.29<br>PING 10.0.2.29 (10.0.2.29) 56(84) bytes of data.<br>From 10.0.2.15 icmp_seq=1 Destination Host Unreachable</i></span><br>



</div><div><br><br></div><div>Please Help. Thanks in advance.<span><font color="#888888"><br><br><br></font></span></div><span><font color="#888888"><div>-- <br><div dir="ltr">Best Regards,<br>
<br>Sujay M<br>Final year B.Tech<br>Computer Engineering<br>NITK Surathkal<br><br>contact: +918971897571<br>
</div>
</div></font></span></div></div></div>
</blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">Best Regards,<br><br>Sujay M<br>Final year B.Tech<br>Computer Engineering<br>NITK Surathkal<br><br>contact: +918971897571<br></div>
</div>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">Best Regards,<br><br>Sujay M<br>Final year B.Tech<br>Computer Engineering<br>NITK Surathkal<br><br>contact: +918971897571<br></div>
</div>