I already have networking setup in the container: root@thinkweb:/# cat /etc/network/interfaces auto lo iface lo inet loopback
auto eth0 iface eth0 inet static address 192.168.54.110 netmask 255.255.255.128 gateway 192.168.54.1 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. On Sat, Oct 24, 2015 at 12:50 AM, Fajar A. Nugraha <[email protected]> wrote: > On Sat, Oct 24, 2015 at 5:34 AM, Joshua Schaeffer < > [email protected]> wrote: > >> 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: >> >> > >> Is this because of my routing table on the container? >> >> Container: >>>>> root@thinkweb:~# route -n >>>>> Kernel IP routing table >>>>> Destination Gateway Genmask Flags Metric Ref >>>>> Use Iface >>>>> 192.168.54.0 0.0.0.0 255.255.255.128 U 0 0 >>>>> 0 eth0 >>>>> >>>>> > > >> lxc.network.ipv4 = 192.168.54.110/25 >>>>>> <http://lxc.network.name> >>>>>> >>>>> > > Obviously. > > You either need "lxc.network.ipv4.gateway" (see "man lxc.container.conf"), > or setup networking inside the container (e.g on /etc/network/interfaces) > > -- > Fajar > > _______________________________________________ > lxc-users mailing list > [email protected] > http://lists.linuxcontainers.org/listinfo/lxc-users >
_______________________________________________ lxc-users mailing list [email protected] http://lists.linuxcontainers.org/listinfo/lxc-users
