Subject: Re: [vserver] vserver + virtual interfaces
From: Herbert Poetzl <herbert@13thfloor.at>
Date: Sat, 15 Nov 2008 12:58:51 +0100

On Fri, Nov 14, 2008 at 04:30:34PM -0300, Tomás de Barros Correia wrote:

> First of all, thanks for the help. :)

> Later some searchs on the net, I configured the server and the
> services that I want.

> Now, I have another doubt: Is it possible to have differents 
> loopback interfaces for each VM?

there are no VM(s) in Linux-VServer, everything
happens on the one and only Real Machine (RM)

> My problem now is to configurate my VMs for use NIS. I've 
> observed that the NIS listen on all availiable interfaces - 
> included the loopback interface

the loopback interface is not necessarily available
(i.e. you can configure that)

> that is the same of loopback interface of host machine. 

sharing the lo interface with the host is not a good
idea, unless you know what you are doing ...
(note that this also isn't the default for Linux-VServer)

> NIS was an example... I was realizing if I want to install 
> other services that run on the same port. 

various services on the same port (but with different
guest IPs) do not interfere with eachother, regardless
of the service configuration (that is part of the
network isolation), of course, if you 'share' some IPs
between the guests (that includes 127.0.0.1) then you
will get collisions

> Does anybody know some way to do it?

use a default Linux-VServer install/config, do not
add any IPs (like 127.0.0.1) except for the guest IP
(which is not shared with other guests)

on recent kernels you can also provide a fully isolated
lo to each guest, utilizing the remapping feature

HTC,
Herbert

> Best regards,
> 
>   Tomás.
> 
> On Wed, Nov 12, 2008 at 10:30 AM, Peter Sabaini <peter@sabaini.at> wrote:
> 
> > On Wednesday 12 November 2008 14:07:11 Herbert Poetzl wrote:
> > > On Tue, Nov 11, 2008 at 05:33:44PM -0300, Tomás de Barros Correia wrote:
> > > >  Hi all,
> > > >
> > > > I'd like to create about 5 virtual machines wich one with real IPs on
> > > > my machine (with just one physical network interface - eth0). I've
> > > > tried to create 5 virtual network interfaces (eth0:0, eth0:1 ...)
> >
> >  -- snip --
> >
> > > > There's something wrong or something missing in my configuration
> > > > an I would like to know the way to do it (tutorial, how to,
> > > > articles etc).
> > >
> > > the basic (and probably best) way to use a single IP
> > > for several guests is to assigne private addresses to
> > > the guest (e.g. 192.168.0.*) and S/DNAT them for the
> > > ports you want to be mapped.
> >
> > What worked for me was either
> >
> > a) setting up a dummy interface (dummy0), and use S/DNAT as you said or
> > b) use a VLAN device, eg. eth0.10 and assign a separate network to this
> >
> > This of course depends on the circumstances but I'd be curious what other
> > people think of the merits of each scenario. I kind of prefer b) if
> > possible,
> > seems simpler to me.
> >
> > bye,
> > peter.
> >
> >
> > > > Can anybody help me?
> > >
> > > very likely, but we all need more information about
> > > your system/setup ...
> > >
> > > > Thanks in advance!
> > >
> > > best,
> > > Herbert
> >
> >
> >
> 
> 
> -- 
> Tomás de Barros Correia
> 
> Ciência da Computação - UFCG
> 
> http://www.dsc.ufcg.edu.br/~tomas/