Subject: Re: [vserver] DHCP
From: Herbert Poetzl <herbert@13thfloor.at>
Date: Thu, 24 Jun 2010 05:28:44 +0200

On Wed, Jun 23, 2010 at 07:19:05PM -0700, Nirmal Guhan wrote:
> Trying to configure eth0 for dhco. 

> I added NET_ADMIN to bcapabilities
> (Not secure but NET_RAW and NET_BROADCAST didn't help).

the guest can now mess with arbitrary host interfaces

> Doing dhclient eth0 on the guest,

> #dhclient eth0
> Cannot find device "etho"

your dhclient is broken, otherwise it would say eth0 :)

> eth0 is now lost.

removing the guest IP from eth0 makes it invisibe
for the guest ..

> From one of the earlier mails on the list, it appears that dhcp does
> not give real advantage. But in my case, I would have to automate
> stuff (for instance, host gets it address through dhcp and hence the
> address of guest is not fixed). 

so the guest is supposed to share the host IP?
if so, I'd suggest to use a private IP and do S/DNAT

> Also I have to avoid address conflicts

what should conflict and where?

> - can two VPS on the same subnet have a common IP 

what is a VPS here, what is the subnet?
in general, normal Linux network rules apply

> - in other words is the guest IP visible outside the host ?

if you make it visible then yes ...
(usually this is a good idea :)

best,
Herbert

> --Nirmal