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

Compare with Current View Page History

« Previous Version 2 Next »

Introduction

In basic zone CloudStack provides Static NAT (1:1 NAT) from public IP to VM's private IP in basic zone. Below are the semantics of EIP as implemented in CloudStack. 

  1. When a user VM is deployed, a public ip is automatically acquired. This IP is owned by the vm's account and is marked as 'system' in the db.
  2. When the user VM starts, static NAT is provisioned on the static NAT provider between the public ip and the guest ip of the vm.
  3. The user can also acquire a public ip by calling the associateIp API. When this api call returns, there is a public ip associated with the account, but not mapped to any guest ip.
  4. The IP acquired in #3 can be static NAT to the VM deployed in #1 by calling enableStaticNat API. This causes the IP allocated in #1 to be returned to the public ip pool. The static NAT rules configured on the Static NAT provider are programmed to remove the original mapping and carry out the new mapping.
  5. The public IP with static NAT enabled in #4 can be removed from static NAT by calling the disableStaticNAT API. This causes the Static nat provider to remove the static nat rule.  A new public IP is allocated (not necessarily the same as the one allocated in #1 and static NAT'ed with the guest IP of the VM. 
  6. When the VM is stopped, if the ip address has isSystem=true(allocated during the vmDeploy) then public Ip is removed from the static NAT mapping and released into public pool.

In this semantics, a public IP is allocated for each VM created in basic zone. For deployments where public IP is scarce resource, allocating public IP for each VM will be expensive. Currently there is no provision in the CloudStack modify this behaviour.  This proposal provides flexibility to the cloud admin, where they can choose not to allocate public IP to the VM by default.

Design

  • No labels