<div dir="ltr">I already have networking setup in the container:<div><br></div><div><div>root@thinkweb:/# cat /etc/network/interfaces</div><div>auto lo</div><div>iface lo inet loopback</div><div><br></div><div>auto eth0</div><div>iface eth0 inet static</div><div> address 192.168.54.110</div><div> netmask 255.255.255.128</div><div> gateway 192.168.54.1</div></div><div><br></div><div>When I add lxc.network.ipv4.gateway to the config it now works. Why would adding the gateway to the config work, but not in interfaces. I've never needed to add the gateway to the config before.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Oct 24, 2015 at 12:50 AM, Fajar A. Nugraha <span dir="ltr"><<a href="mailto:list@fajar.net" target="_blank">list@fajar.net</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 class="gmail_extra"><div class="gmail_quote"><span class="">On Sat, Oct 24, 2015 at 5:34 AM, Joshua Schaeffer <span dir="ltr"><<a href="mailto:jschaeffer0922@gmail.com" target="_blank">jschaeffer0922@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>I set the virtual switch that the host uses to promiscuous mode and I can ping the gateway and other machines on my subnet from the container, however I still cannot get to the outside world:</div><div><br></div></div></blockquote><div> </div></span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>Is this because of my routing table on the container?</div><div><br></div></div></blockquote><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:rgb(0,0,0)"><div><div><div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>Container:</div><div>root@thinkweb:~# route -n</div><div>Kernel IP routing table</div><div>Destination Gateway Genmask Flags Metric Ref Use Iface</div><div>192.168.54.0 0.0.0.0 255.255.255.128 U 0 0 0 eth0</div><br></div></blockquote></div></div></div></div></div></div></div></blockquote></div></div></div></div></blockquote></div></div></div></div></blockquote><div><br></div><div> </div></span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:rgb(0,0,0)"><div><div><div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:rgb(0,0,0)"><div><div><div><div dir="ltr"><div>lxc.network.ipv4 = <a href="http://192.168.54.110/25" target="_blank">192.168.54.110/25</a></div><div><a href="http://lxc.network.name" target="_blank"></a></div></div></div></div></div></div></div></blockquote></div></div></div></div></div></blockquote></div></div></div></div></div></div></div></blockquote></div></div></div></div></blockquote></div></div></div></div></blockquote><div><br></div><div><br></div><div>Obviously.</div><div><br></div><div>You either need "lxc.network.ipv4.gateway" (see "man lxc.container.conf"), or setup networking inside the container (e.g on /etc/network/interfaces)</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-- </div><div>Fajar</div></font></span></div></div></div>
<br>_______________________________________________<br>
lxc-users mailing list<br>
<a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a><br>
<a href="http://lists.linuxcontainers.org/listinfo/lxc-users" rel="noreferrer" target="_blank">http://lists.linuxcontainers.org/listinfo/lxc-users</a><br></blockquote></div><br></div>