Subject: Re: [vserver] alias for the loopback device
From: Herbert Poetzl <herbert@13thfloor.at>
Date: Tue, 13 Oct 2009 03:13:19 +0200

On Mon, Oct 12, 2009 at 06:20:42PM +0200, Matthias Teege wrote:
> Moin,

> I need ip aliases on the loopback device to bind multiple instances
> of the same service to its own ip. 

I don't think you _need_ aliases for that, very likely
you can get away with 'modern' secondaries as well :)

> As I understand the documentation the lo device is redirected to the
> real (hidden) lo device of the vserver instance and there is no entry
> in vservers/interfaces/...

nope, that's wrong: first, no network devices are redirected 
or modified by Linux-VServer, as it uses IP isolation, which
actually happens above the 'device' layer. what we do is
to hide interfaces (and aliases) which do not carry IPs
assigned to the guest, and also a (re)mapping of 127.a.b.c
to lback (can default to 127.x.y.1) happens if selected

> Is it possible to setup aliases on the lo device? 

sure, as it is possible to setup secondaries on lo for
a guest

> If so, how do I configure the aliases?

the very same you do for eth0, except that you use lo
instead of eth0, e.g.:

 --interface test=lo:10.0.0.1/24

or in the config tree with:

 ../interfaces/1/name=test
 ../interfaces/1/dev=lo
 ../interfaces/1/ip=10.0.0.1
 ../interfaces/1/prefix=24

note: if you want to set it up yourself, just replace
the dev entry with nodev (and remove the 'name')

HTH,
Herbert

if you or your company use and like the Linux-VServer project, 
why not consider donating hardware or money, or getting a
service contract with the developers to ensure that it will
live on and continue to provide high quality free software?

> Many thanks
> Matthias