You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Introduction:

Currently in cloudstack we can add multiple public ip ranges. we want to provide similar flexibility for management and guest ip ranges.
Presently we can add multiple guest ip ranges within the same subnet (Basic zone) but we cannot add ip ranges form different subnets.

This feature provides this functionality for adding guest ip ranges (for Basic zone) and management ip range for both the advanced and basic zones.

Use case:

There may be cases where some part of the subnet is allocated for some other purpose and the admin wants to use the rest of the ip range or 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 management and guest ip ranges (ip ranges from different subnets).

Design description:

Basic zone guest IPs.
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.

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

Validation specific to this feature.
#1 Will fail if the zone is not a basic zone or if forvirtual network is true.
#2 if the ip is from a different subnet, netmask and gateway should be provided.

Implementation detail.
In cases where a ip range form a different subnet is added, we need to configure an nic with a ip form the this new subnet or add this ip from different to the existing nic. This is required as the ip to the guest VMs is allocated using a DHCP server. So the router should have a interface on the new subnet.

execution flow.
#1 validate the inputs.
#2 if the ip range is form the new subnet add the new range.
pick one of the ips form the new range and configure a interface with this ip on the VR.
configure the DHCP server to listen on this new interface.
#3 if not form a different subnet add them.

Note. The admin should manually configure the gateway of the new subnet before adding the ip range.

For Basic and Advanced Zone Management(pod) IPs.
Currently there is no way to add additional pod ip ranges. This feature will enable adding pod IP ranges from same subnet or different subnet. The pod ipranges are assigned to router vms and systemvms. The ip configuration is passed in as boot args. So in this case we need not configure the DHCP server.

validation.
#1

Extend the createVlanIpRange api to add the guest ip ranges form different subnets and create a new api AddPodIpRange to add the multiple management ip ranges from different subnets. Whenever we add a ip range from different subnet we have to add a new nic to the routervm. This nic will have one of the ip from the new subnet. The other alternative is to add the ip from the new subnet to the same nic.

Also make changes to the dhcp entry in the router vm.

APIs:

AddPodIpRange

*podId, *IpaddressStart, IpaddressEnd, *Netmask, *Gateway.

returns the ipranges of the pod

yes

All the parameters marked with * are required.

DB changes:

No Database changes are required.

  • No labels