On 06/09/2010 09:15 PM, Bodhi Zazen wrote: > Is there a way to set the default gateway in a linux container ? > > If I set an ipaddress in the config file > > lxc.utsname = foo > lxc.network.type = veth > lxc.network.flags = up > lxc.network.link = br0 > lxc.network.name = eth0 > lxc.network.mtu = 1500 > lxc.network.ipv4 = 192.168.0.10/24 > > These lines set the ip address of the guest. > > Now if I use it either as a container (adding a rootfs , fstab, devices and > running lxc-start -n foo) or as an application (using the system / and > lxc-execute -n foo -f /lxc/foo.config /bin/bash) , everything starts as > expected, I can enter the container with lxc-console, etc ... > > The "problem" is the default gw is not set. I have to either add the gw > manually (when running /bin/bash) or adding it to the init scripts (if > running a container) > > route add default gw 192.168.0.1 eth0 > > after running the route command everything works as expected. > > So, what I am asking, is there a way of setting the default route / gw in the > config file, foo.config ? >
Unfortunately, no yet. It is in the TODO list :/ ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Lxc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/lxc-users
