On Sun, May 22, 2011 at 01:48:12AM +0200, Benjamin Kiessling wrote:
> Indeed this is not a virtualization specific problem. You want your host to 
> operate as a router for
> the other two IP addresses and, depending on the configuration of OVH, 
> ARP-Proxy the whole stuff.

Since the hoster is thankfully routing the second and third IP address
to the first, Proxy ARP is not needed. I would use "simple" routing
like this:

Be the official addresse, and
This is deliberately chosen so that the second and third addresses are
not in the same IP network as the first.

The host has eth0 to connect to the outside, and br0 to connect to the
guests. eth0 and br0 are _NOT_ bridged together. This is what, for
example, VMware, calls "host only networking". The guests are
configured to have their local eth0 bridged to the hosts's br0.

Configure the host:

ip addr add dev eth0 brd +
ip route add default via <defaultgw>
ip addr add dev br0 brd +
ip route add to via
ip route add to via
echo 1 > /proc/sys/net/ipv4/ip_forward

Configure guest1:

ip addr add dev eth0 brd +
ip addr add dev eth0
ip route add default via

Configure guest2:

ip addr add dev eth0 brd +
ip addr add dev eth0
ip route add default via

This basically builds an RFC1918-numbered transfer network between the
host and the guests (thus saving an IP address which would be needed
for the host's "internal" interface otherwise) and instructs the host
to forward packets for the guest's "official" IPs to their site local
IP addresses. The second "ip addr add" statement on the guests tells
them that they need to accept packets for their official IP addresses
as well.

Have you considered IPv6?


Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things."    Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature |  How to make an American Quilt | Fax: *49 3221 2323190

What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
Lxc-users mailing list

Reply via email to