https://issues.apache.org/jira/browse/CLOUDSTACK-705
master, 4.2.0
Currently in CloudStack the Guest CIDR is used for dhcp-range for the Guest VMs. The entire CIDR is used by CloudStack for assigning IPs to Guest VMs.
This feature will allow part of address space to be used for non CloudStack hosts also.
Supported Networks: Isolated Guests and VPC.
PRD is available at:
https://cwiki.apache.org/confluence/display/CLOUDSTACK/IP+Range+Reservation+within+a+Network
Guest Vm CIDR + Reserved Range = Network CIDR
Guest Vm CIDR is the dhcp-range of Cloudstack Guest Vms.
cidr <==> guestVmCidr and network_cidr <==> network cidr
cidr <==> network cidr and network_cidr is null
For existing/new networks:
2. The network offering uses external network devices
Work Flow for both the cases:
Checks:
Upgrade of Network offering for an existing Network:
If the network offering upgrade requires the Guest CIDR to be modified (eg. updating network offering from an offering with no external devices to one with external devices) and the existing network had reservation enabled :
Work Flow:
Checks:
The following table describes the various scenarios of Guest Network creation:
Case |
Guest CIDR |
GuestVM CIDR |
reserved range for non CS-hosts |
---|---|---|---|
1 |
10.1.1.0/24 |
10.1.1.0/24 |
- |
2 |
10.1.1.0/24 |
10.1.1.0/26 |
10.1.1.65-10.1.1.254 |
To reset an existing IP reservation just apply for IP reservation with guestVmCidr equal to the network cidr.
CloudStack currently uses the entire CIDR for DHCP. Large networks like 10.1.1.0/24 generally do not use the complete address space for so the feature will allow for better IP utilization.
Specifying /26 to be GuestVm CIDR we can limit 10.1.1.1-10.1.1.62 for dhcp range for guest VMs and remaining IPs in 10.1.1.0/24 can be reserved for Non CloudStack hosts.
Modify the following APIs:
Note: CIDR is now the effective DHCP range for the guest vms. Network CIDR is the CIDR for the entire guest network.
Networks -> Update GuestNetwork
networks
column |
comment |
---|---|
network_cidr |
CIDR for the guest network |
.
GuestVm Cidr could theoretically be expanded to a level such that GuestVm CIDR = Guest CIDR, but need to take care if the IPs in the extended range are not allocated.
To check this, ping could be a solution but many devices may not allow ICMP so need a discussion on the same.
The current reservation scheme does not allow reservation if active nics are found outside the Guest Vm Cidr. It may happen the user wants a force reservation, in which even if VMs are outside the Guest Vm Cidr, reservation should be made effective. This will involve every active host outside of Guest Vm Cidr to be shutdown and a reimplementation of the network so that these hosts get IPs inside the Guest Vm Cidr.