Subject: Re: [vserver] DHCP
From: Nirmal Guhan <vavatutu@gmail.com>
Date: Fri, 25 Jun 2010 09:42:31 -0700

On Wed, Jun 23, 2010 at 8:28 PM, Herbert Poetzl <herbert@13thfloor.at> wrote:
> 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 :)

That was a copy/paste error.

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

You mean guest cannot get its address through DHCP ?

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

I should have clarified this. Does the guest have its own IP stack?
How does with destination IP address that of the guest routed to the
guest ? Does it happen within kernel (that kernel identifies it is
some sort of virtual interface and sends to it) ?

>
>> - in other words is the guest IP visible outside the host ?
>
> if you make it visible then yes ...
> (usually this is a good idea :)

Sorry not clear. How do I make it "invisible"?

>
> best,
> Herbert
>
>> --Nirmal
>