You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Ram Ganesh <Ra...@citrix.com> on 2012/07/24 16:53:07 UTC

will IP assigned to a guest VM(via DHCP) ever expiry or will need renewal...?

Hi All,

Would like to know if an IP assigned by CloudStack via its DHCP server to a guest VM will ever expire? Or is it ok to assume the IP will be assigned to a guest VM as long as it is not destroyed. We are exploring means to enhance our load balancer to support DHCP and once we acquire an IP we would assign it statically to the load balancer device. Please let me know

Thanks,
Ram


Re: will IP assigned to a guest VM(via DHCP) ever expiry or will need renewal...?

Posted by prasanna <sr...@gmail.com>.
On 24 July 2012 20:23, Ram Ganesh <Ra...@citrix.com> wrote:
>
> Hi All,
>
> Would like to know if an IP assigned by CloudStack via its DHCP server to a guest VM will ever expire? Or is it ok to assume the IP will be assigned to a guest VM as long as it is not destroyed. We are exploring means to enhance our load balancer to support DHCP and once we acquire an IP we would assign it statically to the load balancer device. Please let me know
>
> Thanks,
> Ram
>

AFAIK, the DHCP lease is infinite and only released back when the VM
is destroyed.

--
Prasanna.,

RE: will IP assigned to a guest VM(via DHCP) ever expiry or will need renewal...?

Posted by Ram Ganesh <Ra...@citrix.com>.
Thanks Alena\Sheng\Alex. So it is ok to assume that the IP being used as a static one as long as the network is not shutdown/re-implemented.

Thanks,
Ram


> -----Original Message-----
> From: Sheng Yang [mailto:Sheng.Yang@citrix.com]
> Sent: 24 July 2012 23:55
> To: Alena Prokharchyk; cloudstack-dev@incubator.apache.org
> Subject: RE: will IP assigned to a guest VM(via DHCP) ever expiry or
> will need renewal...?
> 
> Yes. And the reason of recalculating the CIDR of network for external
> devices because we allocate the CIDR based on VLAN, which would be
> recycled after network shutdown.
> 
> --Sheng
> 
> -----Original Message-----
> From: Alena Prokharchyk
> Sent: Tuesday, July 24, 2012 9:51 AM
> To: cloudstack-dev@incubator.apache.org; Sheng Yang
> Subject: Re: will IP assigned to a guest VM(via DHCP) ever expiry or
> will need renewal...?
> 
> On 7/24/12 7:53 AM, "Ram Ganesh" <Ra...@citrix.com> wrote:
> 
> >Hi All,
> >
> >Would like to know if an IP assigned by CloudStack via its DHCP server
> >to a guest VM will ever expire? Or is it ok to assume the IP will be
> >assigned to a guest VM as long as it is not destroyed. We are
> exploring
> >means to enhance our load balancer to support DHCP and once we acquire
> >an IP we would assign it statically to the load balancer device.
> Please
> >let me know
> >
> >Thanks,
> >Ram
> >
> >
> 
> 
> It will not expire in most of the cases - the IP will stick to Vm for
> the entire lifecycle as the cidr for the network doesn't change once
> its set usually.
> 
> But if external device (Netscaler, Juniper SRX) is used as a provider
> for the network, then the cidr for the network is calculated
> dynamically every time the network gets shutdown/re-implemented. As the
> CIDR changes, so do all the user vms' ips.
> 
> Sheng, please confirm.
> 
> -Alena.


Re: will IP assigned to a guest VM(via DHCP) ever expiry or will need renewal...?

Posted by Prasanna Santhanam <pr...@citrix.com>.
On Tue, Jul 24, 2012 at 02:24:53PM -0400, Sheng Yang wrote:
> Yes. And the reason of recalculating the CIDR of network for
> external devices because we allocate the CIDR based on VLAN, which
> would be recycled after network shutdown.
> 
> --Sheng

I have a question around this. Does the network not get
re-implemented when the network is restarted? The restart process from the
logs tells me that network shutdown happens and network rules are
released, router destroyed and a new one spun up and all rules
reapplied. But the VLAN was never released and the same one from
before the restart was used. Perhaps this is just the case with
regular VRs?

Then, I tried with an external device (NetScaler in my case) and the
dynamic CIDR as you mention is calculated based on VLAN. I launched a
couple of guests in this network. Restarted the network (cleanup=true)
and the new network came up with the same VLAN and consequently the
same CIDR. 

It seems ideal that this happens. If a new VLAN and new CIDR came up
on reimplement, would the guests not have to renew their DHCP
configured IPs? These old IPs belong to an older CIDR/gateway. The new
network might be in a completely different CIDR/gateway. Am I missing
something?

When network.gc runs however it releases the VLANs. But network.gc
only happens in the absence of running guests. In this case DHCP is
renewed next time the guest VMs start. So the network seems to change
only in this case.

-- 
Prasanna.,

> 
> -----Original Message-----
> From: Alena Prokharchyk 
> Sent: Tuesday, July 24, 2012 9:51 AM
> To: cloudstack-dev@incubator.apache.org; Sheng Yang
> Subject: Re: will IP assigned to a guest VM(via DHCP) ever expiry or will need renewal...?
> 
> On 7/24/12 7:53 AM, "Ram Ganesh" <Ra...@citrix.com> wrote:
> 
> >Hi All,
> >
> >Would like to know if an IP assigned by CloudStack via its DHCP server 
> >to a guest VM will ever expire? Or is it ok to assume the IP will be 
> >assigned to a guest VM as long as it is not destroyed. We are exploring 
> >means to enhance our load balancer to support DHCP and once we acquire 
> >an IP we would assign it statically to the load balancer device. Please 
> >let me know
> >
> >Thanks,
> >Ram
> >
> >
> 
> 
> It will not expire in most of the cases - the IP will stick to Vm
> for the entire lifecycle as the cidr for the network doesn't change
> once its set usually. 
> 
> But if external device (Netscaler, Juniper SRX) is used as a
> provider for the network, then the cidr for the network is
> calculated dynamically every time the network gets
> shutdown/re-implemented. As the CIDR changes, so do all the user
> vms' ips.
> 
> Sheng, please confirm.
> 
> -Alena.


RE: will IP assigned to a guest VM(via DHCP) ever expiry or will need renewal...?

Posted by Sheng Yang <Sh...@citrix.com>.
Yes. And the reason of recalculating the CIDR of network for external devices because we allocate the CIDR based on VLAN, which would be recycled after network shutdown.

--Sheng

-----Original Message-----
From: Alena Prokharchyk 
Sent: Tuesday, July 24, 2012 9:51 AM
To: cloudstack-dev@incubator.apache.org; Sheng Yang
Subject: Re: will IP assigned to a guest VM(via DHCP) ever expiry or will need renewal...?

On 7/24/12 7:53 AM, "Ram Ganesh" <Ra...@citrix.com> wrote:

>Hi All,
>
>Would like to know if an IP assigned by CloudStack via its DHCP server 
>to a guest VM will ever expire? Or is it ok to assume the IP will be 
>assigned to a guest VM as long as it is not destroyed. We are exploring 
>means to enhance our load balancer to support DHCP and once we acquire 
>an IP we would assign it statically to the load balancer device. Please 
>let me know
>
>Thanks,
>Ram
>
>


It will not expire in most of the cases - the IP will stick to Vm for the entire lifecycle as the cidr for the network doesn't change once its set usually. 

But if external device (Netscaler, Juniper SRX) is used as a provider for the network, then the cidr for the network is calculated dynamically every time the network gets shutdown/re-implemented. As the CIDR changes, so do all the user vms' ips.

Sheng, please confirm.

-Alena.


RE: will IP assigned to a guest VM(via DHCP) ever expiry or will need renewal...?

Posted by Alex Huang <Al...@citrix.com>.
I think we do need a better description of how things like ip changes in cloudstack.  Can someone write this up?

--Alex

> -----Original Message-----
> From: Alena Prokharchyk [mailto:Alena.Prokharchyk@citrix.com]
> Sent: Tuesday, July 24, 2012 9:51 AM
> To: cloudstack-dev@incubator.apache.org; Sheng Yang
> Subject: Re: will IP assigned to a guest VM(via DHCP) ever expiry or will need
> renewal...?
> 
> On 7/24/12 7:53 AM, "Ram Ganesh" <Ra...@citrix.com> wrote:
> 
> >Hi All,
> >
> >Would like to know if an IP assigned by CloudStack via its DHCP server
> >to a guest VM will ever expire? Or is it ok to assume the IP will be
> >assigned to a guest VM as long as it is not destroyed. We are exploring
> >means to enhance our load balancer to support DHCP and once we acquire
> >an IP we would assign it statically to the load balancer device. Please
> >let me know
> >
> >Thanks,
> >Ram
> >
> >
> 
> 
> It will not expire in most of the cases - the IP will stick to Vm for the entire
> lifecycle as the cidr for the network doesn't change once its set usually.
> 
> But if external device (Netscaler, Juniper SRX) is used as a provider for the
> network, then the cidr for the network is calculated dynamically every time
> the network gets shutdown/re-implemented. As the CIDR changes, so do all
> the user vms' ips.
> 
> Sheng, please confirm.
> 
> -Alena.


Re: will IP assigned to a guest VM(via DHCP) ever expiry or will need renewal...?

Posted by Alena Prokharchyk <Al...@citrix.com>.
On 7/24/12 7:53 AM, "Ram Ganesh" <Ra...@citrix.com> wrote:

>Hi All,
>
>Would like to know if an IP assigned by CloudStack via its DHCP server to
>a guest VM will ever expire? Or is it ok to assume the IP will be
>assigned to a guest VM as long as it is not destroyed. We are exploring
>means to enhance our load balancer to support DHCP and once we acquire an
>IP we would assign it statically to the load balancer device. Please let
>me know
>
>Thanks,
>Ram
>
>


It will not expire in most of the cases - the IP will stick to Vm for the
entire lifecycle as the cidr for the network doesn't change once its set
usually. 

But if external device (Netscaler, Juniper SRX) is used as a provider for
the network, then the cidr for the network is calculated dynamically every
time the network gets shutdown/re-implemented. As the CIDR changes, so do
all the user vms' ips.

Sheng, please confirm.

-Alena.