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.





-- 
Ullrich Horlacher              Server- und Arbeitsplatzsysteme
Rechenzentrum                  E-Mail: [email protected]
Universitaet Stuttgart         Tel:    ++49-711-685-65868
Allmandring 30                 Fax:    ++49-711-682357
70550 Stuttgart (Germany)      WWW:    http://www.rus.uni-stuttgart.de/

------------------------------------------------------------------------------
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

Reply via email to