Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

Introduction:

Currently in cloudstack we can add multiple public IP ranges in Advanced zone. we want to provide similar flexibility for guest IP ranges. Presently we can add multiple guest IP ranges within the same subnet in Basic Zone and Advanced sg enabled zones, but we cannot add IP ranges form different subnets.
This feature provides this functionality for adding guest IP ranges from different subnets in Basic zone and advanced SG enabled networks. In case Advanced sg enabled network adding ip range to a sg enabled network form different subnet implies we add two or more subnets in the same vlan.

Use case:

There may be cases where admin may want to add more IP address once the old ones are exhausted. Admin may want to add the IP ranges form the same subnet or from different one. Currently in cloudstack there is no flexibility to do this for guest IP ranges.

...

presently the createVlanIpRange API is used to add the guest IP range to a network (shared) in basic zone. The IPs mentioned in this range are assigned to the guest VMs. These are public IPs and allow guest to communicate with the internet. Presently we can add multiple ranges form the same subnet but not from a different one. This feature will extend the createVlanIpRange to add guest IPs from a different subnet, to a shared network in basic zone.
In the present implementation one subnet can have only one gateway. we do no allow overlapping subnets.

APIs:

API Name

API parameters

API response

Available only for root admin

createVlanIpRange

Using the existing parameters. no new parameters will be added

returns the IP ranges

yes

for description of existing parameters please refer this page. http://incubator.apache.org/cloudstack/docs/api/apidocs-4.0.0/root_admin/createVlanIpRange.htmlImage Removed

Validation.
#1 Will fail if the zone is not a basic zone or if forvirtual network is true.
#2 Will fail if the new subnet is subset or superset of the existing subnet.

...

We intend to use the deleteVlanRange API to delete the IP ranges. The operations will be atomic. this will fail if any IP form the remove range is being used. While removing we acquire a lock on the valn that is being removed. When the subnet is removed the ip alias corresponding to this subnet The Ip Alias created on the virtual router will be removed form the VR.
#In case if a range being removed contains the ip address on which the dhcpserver is running (ie ip alias), cloudstack will try to acquire a new ip in the same subnet. In case if there is no free ip available in the subnet the remove command will failwhen the last VM or Nic form the subnet is removed.

DB changes:

created a new table nic_ip_aliase which is used to store the details of the ipalias created on the router per subnet.

...