Hallo, Maybe I misunderstand your question, please tell me so. It seems to me you want to just script this routing stuff, this is possible in lxc on the host (use lxc.network.script.up), then all you need is configure properly the network interface in the guest os (in debian /etc/network/interfaces) hth John
ps. I don't want to seem to be agressively advertising my site, but i have a similar setup described on http://j.9souldier.org/trunk/lxc/net/ -- The Excuse: TCP/IP UDP alarm threshold is set too low. On Wed, 11 May 2011 14:40:05 +0200 Ulli Horlacher <[email protected]> wrote: > On Wed 2011-05-11 (11:29), Daniel Lezcano wrote: > > > If you create a bridge, attach the physical interface to it, give > > the bridge the ip address you usually give to eth0, (make sure > > ifconfig eth0 0.0.0.0) and then give an IP address to the container > > on the same network than eth0, that will allow to have your > > container to communicate on the network and the host without > > passing through a gateway. > > This is already working. Example (vms2 is the host): > > root@vms2:~# lxc -l > container size (MB) start-PID status > flupp 33202 5251 running > ubuntu 490 0 stopped > vmtest8 490 5664 running > > root@vms2:~# host vms2 > vms2.rus.uni-stuttgart.de has address 129.69.1.68 > > root@vms2:~# host flupp > flupp.rus.uni-stuttgart.de has address 129.69.1.219 > > root@vms2:~# traceroute flupp > traceroute to flupp (129.69.1.219), 30 hops max, 60 byte packets > 1 flupp.rus.uni-stuttgart.de (129.69.1.219) 16.533 ms 16.537 ms > 16.538 ms > > > But I have other containers on other networks, too. Example: > > root@vms2:~# host vmtest8 > vmtest8.rus.uni-stuttgart.de has address 129.69.8.6 > > root@vms2:~# traceroute vmtest8 > traceroute to vmtest8 (129.69.8.6), 30 hops max, 60 byte packets > 1 ar30a-y2g-rus-1.rus.uni-stuttgart.de (129.69.1.251) 0.674 ms > 0.734 ms 0.793 ms 2 * * * > > vmtest8 has no internet connection so far, because the VLAN setup is > not correct. But this is another problem :-} > > Nevertheless the host vms2 should reach the container vmtest8 directly > (internaly) without using an external router. > > I can obtain this by setting host routes on vms2 and vmtest8, as I > have described in my first mail. Then host and container can reach > each other directly. What I now want is some kind of automatism. I do > not want to set such host routes manually, every time I use lxc-start. > > > > > ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Lxc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/lxc-users
