<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>15.27. Configuring a Virtual Private Cloud</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta name="generator" content="publican 2.8" /><meta name="package" content="Apache_CloudStack-Admin_Guide-4.2.0-en-US-1-" /><script type="text/javascript" src="../../../../../toc.js"></script><script type="text/javascript">
              addID('Apache_CloudStack');
              
	      addID('Apache_CloudStack.4.2.0');
              
              addID('Apache_CloudStack.4.2.0.books');
	      addID('Apache_CloudStack.4.2.0.Admin_Guide');
              </script><link rel="home" href="index.html" title="CloudStack Administrator's Guide" /><link rel="up" href="networks.html" title="Chapter 15. Managing Networks and Traffic" /><link rel="prev" href="inter-vlan-routing.html" title="15.26. About Inter-VLAN Routing (nTier Apps)" /><link rel="next" href="persistent-network.html" title="15.28. Persistent Networks" /></head><body class="toc_embeded "><div id="tocdiv" class="toc"><iframe id="tocframe" class="toc" src="../../../../toc.html">This is an iframe, to view it upgrade your browser or enable iframe display.</iframe></div><p id="title"><a class="left" href="http://cloudstack.apache.org"><img src="Common_Content/images/image_left.png" alt="Product Site" /></a><a class="right" href="http://cloudstack.apache.org/docs"><img src="Common_Content/images/image_right.png" alt="Documentation Site" /></a></p><ul class="docnav"><li class="previous"><a accesskey="p" href="inter-vlan-routing.html"><strong>Prev</strong></a></li><li class="next"><a accesskey="n" href="persistent-network.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" id="configure-vpc" lang="en-US"><div class="titlepage"><div><div><h2 class="title">15.27. Configuring a Virtual Private Cloud</h2></div></div></div><div xml:lang="en-US" class="section" id="vpc" lang="en-US"><div class="titlepage"><div><div><h3 class="title">15.27.1. About Virtual Private Clouds</h3></div></div></div><div class="para">
		CloudStack Virtual Private Cloud is a private, isolated part of CloudStack. A VPC can have its own virtual network topology that resembles a traditional physical network. You can launch VMs in the virtual network that can have private addresses in the range of your choice, for example: 10.0.0.0/16. You can define network tiers within your VPC network range, which in turn enables you to group similar kinds of instances based on IP address range.
	</div><div class="para">
		For example, if a VPC has the private range 10.0.0.0/16, its guest networks can have the network ranges 10.0.1.0/24, 10.0.2.0/24, 10.0.3.0/24, and so on.
	</div><div class="formalpara"><h5 class="formalpara" id="idp62331072">Major Components of a VPC:</h5>
			A VPC is comprised of the following network components:
		</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
				<span class="bold bold"><strong>VPC</strong></span>: A VPC acts as a container for multiple isolated networks that can communicate with each other via its virtual router.
			</div></li><li class="listitem"><div class="para">
				<span class="bold bold"><strong>Network Tiers</strong></span>: Each tier acts as an isolated network with its own VLANs and CIDR list, where you can place groups of resources, such as VMs. The tiers are segmented by means of VLANs. The NIC of each tier acts as its gateway.
			</div></li><li class="listitem"><div class="para">
				<span class="bold bold"><strong>Virtual Router</strong></span>: A virtual router is automatically created and started when you create a VPC. The virtual router connect the tiers and direct traffic among the public gateway, the VPN gateways, and the NAT instances. For each tier, a corresponding NIC and IP exist in the virtual router. The virtual router provides DNS and DHCP services through its IP.
			</div></li><li class="listitem"><div class="para">
				<span class="bold bold"><strong>Public Gateway</strong></span>: The traffic to and from the Internet routed to the VPC through the public gateway. In a VPC, the public gateway is not exposed to the end user; therefore, static routes are not support for the public gateway.
			</div></li><li class="listitem"><div class="para">
				<span class="bold bold"><strong>Private Gateway</strong></span>: All the traffic to and from a private network routed to the VPC through the private gateway. For more information, see <a class="xref" href="configure-vpc.html#add-gateway-vpc">Section 15.27.5, “Adding a Private Gateway to a VPC”</a>.
			</div></li><li class="listitem"><div class="para">
				<span class="bold bold"><strong>VPN Gateway</strong></span>: The VPC side of a VPN connection.
			</div></li><li class="listitem"><div class="para">
				<span class="bold bold"><strong>Site-to-Site VPN Connection</strong></span>: A hardware-based VPN connection between your VPC and your datacenter, home network, or co-location facility. For more information, see <a class="xref" href="vpn.html#site-to-site-vpn">Section 15.25.4, “Setting Up a Site-to-Site VPN Connection”</a>.
			</div></li><li class="listitem"><div class="para">
				<span class="bold bold"><strong>Customer Gateway</strong></span>: The customer side of a VPN Connection. For more information, see <a class="xref" href="vpn.html#create-vpn-customer-gateway">Section 15.25.4.1, “Creating and Updating a VPN Customer Gateway”</a>.
			</div></li><li class="listitem"><div class="para">
				<span class="bold bold"><strong>NAT Instance</strong></span>: An instance that provides Port Address Translation for instances to access the Internet via the public gateway. For more information, see <a class="xref" href="configure-vpc.html#enable-disable-static-nat-vpc">Section 15.27.10, “Enabling or Disabling Static NAT on a VPC”</a>.
			</div></li><li class="listitem"><div class="para">
				<span class="bold bold"><strong>Network ACL</strong></span>: Network ACL is a group of Network ACL items. Network ACL items are nothing but numbered rules that are evaluated in order, starting with the lowest numbered rule. These rules determine whether traffic is allowed in or out of any tier associated with the network ACL. For more information, see <a class="xref" href="configure-vpc.html#configure-acl">Section 15.27.4, “Configuring Network Access Control List”</a>.
			</div></li></ul></div><div class="formalpara"><h5 class="formalpara" id="idp67255952">Network Architecture in a VPC</h5>
			In a VPC, the following four basic options of network architectures are present:
		</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
				VPC with a public gateway only
			</div></li><li class="listitem"><div class="para">
				VPC with public and private gateways
			</div></li><li class="listitem"><div class="para">
				VPC with public and private gateways and site-to-site VPN access
			</div></li><li class="listitem"><div class="para">
				VPC with a private gateway only and site-to-site VPN access
			</div></li></ul></div><div class="formalpara"><h5 class="formalpara" id="idp53821776">Connectivity Options for a VPC</h5>
			You can connect your VPC to:
		</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
				The Internet through the public gateway.
			</div></li><li class="listitem"><div class="para">
				The corporate datacenter by using a site-to-site VPN connection through the VPN gateway.
			</div></li><li class="listitem"><div class="para">
				Both the Internet and your corporate datacenter by using both the public gateway and a VPN gateway.
			</div></li></ul></div><div class="formalpara"><h5 class="formalpara" id="idp66373968">VPC Network Considerations</h5>
			Consider the following before you create a VPC:
		</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
				A VPC, by default, is created in the enabled state.
			</div></li><li class="listitem"><div class="para">
				A VPC can be created in Advance zone only, and can't belong to more than one zone at a time.
			</div></li><li class="listitem"><div class="para">
				The default number of VPCs an account can create is 20. However, you can change it by using the max.account.vpcs global parameter, which controls the maximum number of VPCs an account is allowed to create.
			</div></li><li class="listitem"><div class="para">
				The default number of tiers an account can create within a VPC is 3. You can configure this number by using the vpc.max.networks parameter.
			</div></li><li class="listitem"><div class="para">
				Each tier should have an unique CIDR in the VPC. Ensure that the tier's CIDR should be within the VPC CIDR range.
			</div></li><li class="listitem"><div class="para">
				A tier belongs to only one VPC.
			</div></li><li class="listitem"><div class="para">
				All network tiers inside the VPC should belong to the same account.
			</div></li><li class="listitem"><div class="para">
				When a VPC is created, by default, a SourceNAT IP is allocated to it. The Source NAT IP is released only when the VPC is removed.
			</div></li><li class="listitem"><div class="para">
				A public IP can be used for only one purpose at a time. If the IP is a sourceNAT, it cannot be used for StaticNAT or port forwarding.
			</div></li><li class="listitem"><div class="para">
				The instances can only have a private IP address that you provision. To communicate with the Internet, enable NAT to an instance that you launch in your VPC.
			</div></li><li class="listitem"><div class="para">
				Only new networks can be added to a VPC. The maximum number of networks per VPC is limited by the value you specify in the vpc.max.networks parameter. The default value is three.
			</div></li><li class="listitem"><div class="para">
				The load balancing service can be supported by only one tier inside the VPC.
			</div></li><li class="listitem"><div class="para">
				If an IP address is assigned to a tier:
			</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
						That IP can't be used by more than one tier at a time in the VPC. For example, if you have tiers A and B, and a public IP1, you can create a port forwarding rule by using the IP either for A or B, but not for both.
					</div></li><li class="listitem"><div class="para">
						That IP can't be used for StaticNAT, load balancing, or port forwarding rules for another guest network inside the VPC.
					</div></li></ul></div></li><li class="listitem"><div class="para">
				Remote access VPN is not supported in VPC networks.
			</div></li></ul></div></div><div xml:lang="en-US" class="section" id="add-vpc" lang="en-US"><div class="titlepage"><div><div><h3 class="title">15.27.2. Adding a Virtual Private Cloud</h3></div></div></div><div class="para">
		When creating the VPC, you simply provide the zone and a set of IP addresses for the VPC network address space. You specify this set of addresses in the form of a Classless Inter-Domain Routing (CIDR) block.
	</div><div class="orderedlist"><ol><li class="listitem"><div class="para">
				Log in to the CloudStack UI as an administrator or end user.
			</div></li><li class="listitem"><div class="para">
				In the left navigation, choose Network.
			</div></li><li class="listitem"><div class="para">
				In the Select view, select VPC.
			</div></li><li class="listitem"><div class="para">
				Click Add VPC. The Add VPC page is displayed as follows:
			</div><div class="mediaobject"><img src="./images/add-vpc.png" alt="add-vpc.png: adding a vpc." /></div><div class="para">
				Provide the following information:
			</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
						<span class="bold bold"><strong>Name</strong></span>: A short name for the VPC that you are creating.
					</div></li><li class="listitem"><div class="para">
						<span class="bold bold"><strong>Description</strong></span>: A brief description of the VPC.
					</div></li><li class="listitem"><div class="para">
						<span class="bold bold"><strong>Zone</strong></span>: Choose the zone where you want the VPC to be available.
					</div></li><li class="listitem"><div class="para">
						<span class="bold bold"><strong>Super CIDR for Guest Networks</strong></span>: Defines the CIDR range for all the tiers (guest networks) within a VPC. When you create a tier, ensure that its CIDR is within the Super CIDR value you enter. The CIDR must be RFC1918 compliant.
					</div></li><li class="listitem"><div class="para">
						<span class="bold bold"><strong>DNS domain for Guest Networks</strong></span>: If you want to assign a special domain name, specify the DNS suffix. This parameter is applied to all the tiers within the VPC. That implies, all the tiers you create in the VPC belong to the same DNS domain. If the parameter is not specified, a DNS domain name is generated automatically.
					</div></li><li class="listitem"><div class="para">
						<span class="bold bold"><strong>Public Load Balancer Provider</strong></span>: You have two options: VPC Virtual Router and Netscaler.
					</div></li></ul></div></li><li class="listitem"><div class="para">
				Click OK.
			</div></li></ol></div></div><div xml:lang="en-US" class="section" id="add-tier" lang="en-US"><div class="titlepage"><div><div><h3 class="title">15.27.3. Adding Tiers</h3></div></div></div><div class="para">
		Tiers are distinct locations within a VPC that act as isolated networks, which do not have access to other tiers by default. Tiers are set up on different VLANs that can communicate with each other by using a virtual router. Tiers provide inexpensive, low latency network connectivity to other tiers within the VPC.
	</div><div class="orderedlist"><ol><li class="listitem"><div class="para">
				Log in to the CloudStack UI as an administrator or end user.
			</div></li><li class="listitem"><div class="para">
				In the left navigation, choose Network.
			</div></li><li class="listitem"><div class="para">
				In the Select view, select VPC.
			</div><div class="para">
				All the VPC that you have created for the account is listed in the page.
			</div><div class="note"><div class="admonition_header"><h2>Note</h2></div><div class="admonition"><div class="para">
					The end users can see their own VPCs, while root and domain admin can see any VPC they are authorized to see.
				</div></div></div></li><li class="listitem"><div class="para">
				Click the Configure button of the VPC for which you want to set up tiers.
			</div></li><li class="listitem"><div class="para">
				Click Create network.
			</div><div class="para">
				The Add new tier dialog is displayed, as follows:
			</div><div class="mediaobject"><img src="./images/add-tier.png" alt="add-tier.png: adding a tier to a vpc." /></div><div class="para">
				If you have already created tiers, the VPC diagram is displayed. Click Create Tier to add a new tier.
			</div></li><li class="listitem"><div class="para">
				Specify the following:
			</div><div class="para">
				All the fields are mandatory.
			</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
						<span class="bold bold"><strong>Name</strong></span>: A unique name for the tier you create.
					</div></li><li class="listitem"><div class="para">
						<span class="bold bold"><strong>Network Offering</strong></span>: The following default network offerings are listed: Internal LB, DefaultIsolatedNetworkOfferingForVpcNetworksNoLB, DefaultIsolatedNetworkOfferingForVpcNetworks
					</div><div class="para">
						In a VPC, only one tier can be created by using LB-enabled network offering.
					</div></li><li class="listitem"><div class="para">
						<span class="bold bold"><strong>Gateway</strong></span>: The gateway for the tier you create. Ensure that the gateway is within the Super CIDR range that you specified while creating the VPC, and is not overlapped with the CIDR of any existing tier within the VPC.
					</div></li><li class="listitem"><div class="para">
						<span class="bold bold"><strong>VLAN</strong></span>: The VLAN ID for the tier that the root admin creates.
					</div><div class="para">
						This option is only visible if the network offering you selected is VLAN-enabled.
					</div><div class="para">
						For more information, see <a class="xref" href="vlan-provisioning.html#vlan-assign-isolated-nw">Section 11.9.3, “Assigning VLANs to Isolated Networks”</a>.
					</div></li><li class="listitem"><div class="para">
						<span class="bold bold"><strong>Netmask</strong></span>: The netmask for the tier you create.
					</div><div class="para">
						For example, if the VPC CIDR is 10.0.0.0/16 and the network tier CIDR is 10.0.1.0/24, the gateway of the tier is 10.0.1.1, and the netmask of the tier is 255.255.255.0.
					</div></li></ul></div></li><li class="listitem"><div class="para">
				Click OK.
			</div></li><li class="listitem"><div class="para">
				Continue with configuring access control list for the tier.
			</div></li></ol></div></div><div xml:lang="en-US" class="section" id="configure-acl" lang="en-US"><div class="titlepage"><div><div><h3 class="title">15.27.4. Configuring Network Access Control List</h3></div></div></div><div class="para">
		Define Network Access Control List (ACL) on the VPC virtual router to control incoming (ingress) and outgoing (egress) traffic between the VPC tiers, and the tiers and Internet. By default, all incoming traffic to the guest networks is blocked and all outgoing traffic from guest networks is allowed, once you add an ACL rule for outgoing traffic, then only outgoing traffic specified in this ACL rule is allowed, the rest is blocked. To open the ports, you must create a new network ACL. The network ACLs can be created for the tiers only if the NetworkACL service is supported.
	</div><div class="section" id="network-acl"><div class="titlepage"><div><div><h4 class="title">15.27.4.1. About Network ACL Lists</h4></div></div></div><div class="para">
			In CloudStack terminology, Network ACL is a group of Network ACL items. Network ACL items are nothing but numbered rules that are evaluated in order, starting with the lowest numbered rule. These rules determine whether traffic is allowed in or out of any tier associated with the network ACL. You need to add the Network ACL items to the Network ACL, then associate the Network ACL with a tier. Network ACL is associated with a VPC and can be assigned to multiple VPC tiers within a VPC. A Tier is associated with a Network ACL at all the times. Each tier can be associated with only one ACL.
		</div><div class="para">
			The default Network ACL is used when no ACL is associated. Default behavior is all the incoming traffic is blocked and outgoing traffic is allowed from the tiers. Default network ACL cannot be removed or modified. Contents of the default Network ACL is:
		</div><div class="informaltable"><table border="1"><colgroup><col width="20%" align="left" class="c1" /><col width="20%" align="left" class="c2" /><col width="20%" align="left" class="c3" /><col width="20%" align="left" class="c4" /><col width="20%" align="left" class="c5" /></colgroup><thead><tr><th class="" align="left">
							<div class="para">
								Rule
							</div>
						</th><th class="" align="left">
							<div class="para">
								Protocol
							</div>
						</th><th class="" align="left">
							<div class="para">
								Traffic type
							</div>
						</th><th class="" align="left">
							<div class="para">
								Action
							</div>
						</th><th class="" align="left">
							<div class="para">
								CIDR
							</div>
						</th></tr></thead><tbody><tr><td class="" align="left">
							<div class="para">
								1
							</div>
						</td><td class="" align="left">
							<div class="para">
								All
							</div>
						</td><td class="" align="left">
							<div class="para">
								Ingress
							</div>
						</td><td class="" align="left">
							<div class="para">
								Deny
							</div>
						</td><td class="" align="left">
							<div class="para">
								0.0.0.0/0
							</div>
						</td></tr><tr><td class="" align="left">
							<div class="para">
								2
							</div>
						</td><td class="" align="left">
							<div class="para">
								All
							</div>
						</td><td class="" align="left">
							<div class="para">
								Egress
							</div>
						</td><td class="" align="left">
							<div class="para">
								Deny
							</div>
						</td><td class="" align="left">
							<div class="para">
								0.0.0.0/0
							</div>
						</td></tr></tbody></table></div></div><div class="section" id="acl-list"><div class="titlepage"><div><div><h4 class="title">15.27.4.2. Creating ACL Lists</h4></div></div></div><div class="orderedlist"><ol><li class="listitem"><div class="para">
					Log in to the CloudStack UI as an administrator or end user.
				</div></li><li class="listitem"><div class="para">
					In the left navigation, choose Network.
				</div></li><li class="listitem"><div class="para">
					In the Select view, select VPC.
				</div><div class="para">
					All the VPCs that you have created for the account is listed in the page.
				</div></li><li class="listitem"><div class="para">
					Click the Configure button of the VPC.
				</div><div class="para">
					For each tier, the following options are displayed:
				</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
							Internal LB
						</div></li><li class="listitem"><div class="para">
							Public LB IP
						</div></li><li class="listitem"><div class="para">
							Static NAT
						</div></li><li class="listitem"><div class="para">
							Virtual Machines
						</div></li><li class="listitem"><div class="para">
							CIDR
						</div></li></ul></div><div class="para">
					The following router information is displayed:
				</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
							Private Gateways
						</div></li><li class="listitem"><div class="para">
							Public IP Addresses
						</div></li><li class="listitem"><div class="para">
							Site-to-Site VPNs
						</div></li><li class="listitem"><div class="para">
							Network ACL Lists
						</div></li></ul></div></li><li class="listitem"><div class="para">
					Select Network ACL Lists.
				</div><div class="para">
					The following default rules are displayed in the Network ACLs page: default_allow, default_deny.
				</div></li><li class="listitem"><div class="para">
					Click Add ACL Lists, and specify the following:
				</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
							<span class="bold bold"><strong>ACL List Name</strong></span>: A name for the ACL list.
						</div></li><li class="listitem"><div class="para">
							<span class="bold bold"><strong>Description</strong></span>: A short description of the ACL list that can be displayed to users.
						</div></li></ul></div></li></ol></div></div><div class="section" id="add-acl-rule"><div class="titlepage"><div><div><h4 class="title">15.27.4.3. Creating an ACL Rule</h4></div></div></div><div class="orderedlist"><ol><li class="listitem"><div class="para">
					Log in to the CloudStack UI as an administrator or end user.
				</div></li><li class="listitem"><div class="para">
					In the left navigation, choose Network.
				</div></li><li class="listitem"><div class="para">
					In the Select view, select VPC.
				</div><div class="para">
					All the VPCs that you have created for the account is listed in the page.
				</div></li><li class="listitem"><div class="para">
					Click the Configure button of the VPC.
				</div></li><li class="listitem"><div class="para">
					Select Network ACL Lists.
				</div><div class="para">
					In addition to the custom ACL lists you have created, the following default rules are displayed in the Network ACLs page: default_allow, default_deny.
				</div></li><li class="listitem"><div class="para">
					Select the desired ACL list.
				</div></li><li class="listitem"><div class="para">
					Select the ACL List Rules tab.
				</div><div class="para">
					To add an ACL rule, fill in the following fields to specify what kind of network traffic is allowed in the VPC.
				</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
							<span class="bold bold"><strong>Rule Number</strong></span>: The order in which the rules are evaluated.
						</div></li><li class="listitem"><div class="para">
							<span class="bold bold"><strong>CIDR</strong></span>: The CIDR acts as the Source CIDR for the Ingress rules, and Destination CIDR for the Egress rules. To accept traffic only from or to the IP addresses within a particular address block, enter a CIDR or a comma-separated list of CIDRs. The CIDR is the base IP address of the incoming traffic. For example, 192.168.0.0/22. To allow all CIDRs, set to 0.0.0.0/0.
						</div></li><li class="listitem"><div class="para">
							<span class="bold bold"><strong>Action</strong></span>: What action to be taken. Allow traffic or block.
						</div></li><li class="listitem"><div class="para">
							<span class="bold bold"><strong>Protocol</strong></span>: The networking protocol that sources use to send traffic to the tier. The TCP and UDP protocols are typically used for data exchange and end-user communications. The ICMP protocol is typically used to send error messages or network monitoring data. All supports all the traffic. Other option is Protocol Number.
						</div></li><li class="listitem"><div class="para">
							<span class="bold bold"><strong>Start Port</strong></span>, <span class="bold bold"><strong>End Port</strong></span> (TCP, UDP only): A range of listening ports that are the destination for the incoming traffic. If you are opening a single port, use the same number in both fields.
						</div></li><li class="listitem"><div class="para">
							<span class="bold bold"><strong>Protocol Number</strong></span>: The protocol number associated with IPv4 or IPv6. For more information, see <a href="http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xml">Protocol Numbers</a>.
						</div></li><li class="listitem"><div class="para">
							<span class="bold bold"><strong>ICMP Type</strong></span>, <span class="bold bold"><strong>ICMP Code</strong></span> (ICMP only): The type of message and error code that will be sent.
						</div></li><li class="listitem"><div class="para">
							<span class="bold bold"><strong>Traffic Type</strong></span>: The type of traffic: Incoming or outgoing.
						</div></li></ul></div></li><li class="listitem"><div class="para">
					Click Add. The ACL rule is added.
				</div><div class="para">
					You can edit the tags assigned to the ACL rules and delete the ACL rules you have created. Click the appropriate button in the Details tab.
				</div></li></ol></div></div><div class="section" id="create-acl-tier"><div class="titlepage"><div><div><h4 class="title">15.27.4.4. Creating a Tier with Custom ACL List</h4></div></div></div><div class="orderedlist"><ol><li class="listitem"><div class="para">
					Create a VPC.
				</div></li><li class="listitem"><div class="para">
					Create a custom ACL list.
				</div></li><li class="listitem"><div class="para">
					Add ACL rules to the ACL list.
				</div></li><li class="listitem"><div class="para">
					Create a tier in the VPC.
				</div><div class="para">
					Select the desired ACL list while creating a tier.
				</div></li><li class="listitem"><div class="para">
					Click OK.
				</div></li></ol></div></div><div class="section" id="assign-acl-tier"><div class="titlepage"><div><div><h4 class="title">15.27.4.5. Assigning a Custom ACL List to a Tier</h4></div></div></div><div class="orderedlist"><ol><li class="listitem"><div class="para">
					Create a VPC.
				</div></li><li class="listitem"><div class="para">
					Create a tier in the VPC.
				</div></li><li class="listitem"><div class="para">
					Associate the tier with the default ACL rule.
				</div></li><li class="listitem"><div class="para">
					Create a custom ACL list.
				</div></li><li class="listitem"><div class="para">
					Add ACL rules to the ACL list.
				</div></li><li class="listitem"><div class="para">
					Select the tier for which you want to assign the custom ACL.
				</div></li><li class="listitem"><div class="para">
					Click the Replace ACL List icon.
					<span class="inlinemediaobject"><img src="./images/replace-acl-icon.png" alt="replace-acl-icon.png: button to replace an ACL list" /></span>
				</div><div class="para">
					The Replace ACL List dialog is displayed.
				</div></li><li class="listitem"><div class="para">
					Select the desired ACL list.
				</div></li><li class="listitem"><div class="para">
					Click OK.
				</div></li></ol></div></div></div><div xml:lang="en-US" class="section" id="add-gateway-vpc" lang="en-US"><div class="titlepage"><div><div><h3 class="title">15.27.5. Adding a Private Gateway to a VPC</h3></div></div></div><div class="para">
		A private gateway can be added by the root admin only. The VPC private network has 1:1 relationship with the NIC of the physical network. You can configure multiple private gateways to a single VPC. No gateways with duplicated VLAN and IP are allowed in the same data center.
	</div><div class="orderedlist"><ol><li class="listitem"><div class="para">
				Log in to the CloudStack UI as an administrator or end user.
			</div></li><li class="listitem"><div class="para">
				In the left navigation, choose Network.
			</div></li><li class="listitem"><div class="para">
				In the Select view, select VPC.
			</div><div class="para">
				All the VPCs that you have created for the account is listed in the page.
			</div></li><li class="listitem"><div class="para">
				Click the Configure button of the VPC to which you want to configure load balancing rules.
			</div><div class="para">
				The VPC page is displayed where all the tiers you created are listed in a diagram.
			</div></li><li class="listitem"><div class="para">
				Click the Settings icon.
			</div><div class="para">
				The following options are displayed.
			</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
						Internal LB
					</div></li><li class="listitem"><div class="para">
						Public LB IP
					</div></li><li class="listitem"><div class="para">
						Static NAT
					</div></li><li class="listitem"><div class="para">
						Virtual Machines
					</div></li><li class="listitem"><div class="para">
						CIDR
					</div></li></ul></div><div class="para">
				The following router information is displayed:
			</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
						Private Gateways
					</div></li><li class="listitem"><div class="para">
						Public IP Addresses
					</div></li><li class="listitem"><div class="para">
						Site-to-Site VPNs
					</div></li><li class="listitem"><div class="para">
						Network ACL Lists
					</div></li></ul></div></li><li class="listitem"><div class="para">
				Select Private Gateways.
			</div><div class="para">
				The Gateways page is displayed.
			</div></li><li class="listitem"><div class="para">
				Click Add new gateway:
			</div><div class="mediaobject"><img src="./images/add-new-gateway-vpc.png" alt="add-new-gateway-vpc.png: adding a private gateway for the VPC." /></div></li><li class="listitem"><div class="para">
				Specify the following:
			</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
						<span class="bold bold"><strong>Physical Network</strong></span>: The physical network you have created in the zone.
					</div></li><li class="listitem"><div class="para">
						<span class="bold bold"><strong>IP Address</strong></span>: The IP address associated with the VPC gateway.
					</div></li><li class="listitem"><div class="para">
						<span class="bold bold"><strong>Gateway</strong></span>: The gateway through which the traffic is routed to and from the VPC.
					</div></li><li class="listitem"><div class="para">
						<span class="bold bold"><strong>Netmask</strong></span>: The netmask associated with the VPC gateway.
					</div></li><li class="listitem"><div class="para">
						<span class="bold bold"><strong>VLAN</strong></span>: The VLAN associated with the VPC gateway.
					</div></li><li class="listitem"><div class="para">
						<span class="bold bold"><strong>Source NAT</strong></span>: Select this option to enable the source NAT service on the VPC private gateway.
					</div><div class="para">
						See <a class="xref" href="configure-vpc.html#sourcenat-private-gateway">Section 15.27.5.1, “Source NAT on Private Gateway”</a>.
					</div></li><li class="listitem"><div class="para">
						<span class="bold bold"><strong>ACL</strong></span>: Controls both ingress and egress traffic on a VPC private gateway. By default, all the traffic is blocked.
					</div><div class="para">
						See <a class="xref" href="configure-vpc.html#acl-private-gateway">Section 15.27.5.2, “ACL on Private Gateway”</a>.
					</div></li></ul></div><div class="para">
				The new gateway appears in the list. You can repeat these steps to add more gateway for this VPC.
			</div></li></ol></div><div class="section" id="sourcenat-private-gateway"><div class="titlepage"><div><div><h4 class="title">15.27.5.1. Source NAT on Private Gateway</h4></div></div></div><div class="para">
			You might want to deploy multiple VPCs with the same super CIDR and guest tier CIDR. Therefore, multiple guest VMs from different VPCs can have the same IPs to reach a enterprise data center through the private gateway. In such cases, a NAT service need to be configured on the private gateway to avoid IP conflicts. If Source NAT is enabled, the guest VMs in VPC reaches the enterprise network via private gateway IP address by using the NAT service.
		</div><div class="para">
			The Source NAT service on a private gateway can be enabled while adding the private gateway. On deletion of a private gateway, source NAT rules specific to the private gateway are deleted.
		</div><div class="para">
			To enable source NAT on existing private gateways, delete them and create afresh with source NAT.
		</div></div><div class="section" id="acl-private-gateway"><div class="titlepage"><div><div><h4 class="title">15.27.5.2. ACL on Private Gateway</h4></div></div></div><div class="para">
			The traffic on the VPC private gateway is controlled by creating both ingress and egress network ACL rules. The ACLs contains both allow and deny rules. As per the rule, all the ingress traffic to the private gateway interface and all the egress traffic out from the private gateway interface are blocked.
		</div><div class="para">
			You can change this default behaviour while creating a private gateway. Alternatively, you can do the following:
		</div><div class="orderedlist"><ol><li class="listitem"><div class="para">
					In a VPC, identify the Private Gateway you want to work with.
				</div></li><li class="listitem"><div class="para">
					In the Private Gateway page, do either of the following:
				</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
							Use the Quickview. See <a class="xref" href="configure-vpc.html#quickview">3</a>.
						</div></li><li class="listitem"><div class="para">
							Use the Details tab. See <a class="xref" href="configure-vpc.html#details-tab">4</a> through .
						</div></li></ul></div></li><li class="listitem" id="quickview"><div class="para">
					In the Quickview of the selected Private Gateway, click Replace ACL, select the ACL rule, then click OK
				</div></li><li class="listitem" id="details-tab"><div class="para">
					Click the IP address of the Private Gateway you want to work with.
				</div></li><li class="listitem"><div class="para">
					In the Detail tab, click the Replace ACL button. 
					<span class="inlinemediaobject"><img src="./images/replace-acl-icon.png" alt="replace-acl-icon.png: button to replace the default ACL behaviour." /></span>
				</div><div class="para">
					The Replace ACL dialog is displayed.
				</div></li><li class="listitem"><div class="para">
					select the ACL rule, then click OK.
				</div><div class="para">
					Wait for few seconds. You can see that the new ACL rule is displayed in the Details page.
				</div></li></ol></div></div><div class="section" id="static-route"><div class="titlepage"><div><div><h4 class="title">15.27.5.3. Creating a Static Route</h4></div></div></div><div class="para">
			CloudStack enables you to specify routing for the VPN connection you create. You can enter one or CIDR addresses to indicate which traffic is to be routed back to the gateway.
		</div><div class="orderedlist"><ol><li class="listitem"><div class="para">
					In a VPC, identify the Private Gateway you want to work with.
				</div></li><li class="listitem"><div class="para">
					In the Private Gateway page, click the IP address of the Private Gateway you want to work with.
				</div></li><li class="listitem"><div class="para">
					Select the Static Routes tab.
				</div></li><li class="listitem"><div class="para">
					Specify the CIDR of destination network.
				</div></li><li class="listitem"><div class="para">
					Click Add.
				</div><div class="para">
					Wait for few seconds until the new route is created.
				</div></li></ol></div></div><div class="section" id="blacklist-route"><div class="titlepage"><div><div><h4 class="title">15.27.5.4. Blacklisting Routes</h4></div></div></div><div class="para">
			CloudStack enables you to block a list of routes so that they are not assigned to any of the VPC private gateways. Specify the list of routes that you want to blacklist in the <code class="code">blacklisted.routes</code> global parameter. Note that the parameter update affects only new static route creations. If you block an existing static route, it remains intact and continue functioning. You cannot add a static route if the route is blacklisted for the zone.
		</div></div></div><div xml:lang="en-US" class="section" id="add-vm-to-tier" lang="en-US"><div class="titlepage"><div><div><h3 class="title">15.27.6. Deploying VMs to the Tier</h3></div></div></div><div class="orderedlist"><ol><li class="listitem"><div class="para">
				Log in to the CloudStack UI as an administrator or end user.
			</div></li><li class="listitem"><div class="para">
				In the left navigation, choose Network.
			</div></li><li class="listitem"><div class="para">
				In the Select view, select VPC.
			</div><div class="para">
				All the VPCs that you have created for the account is listed in the page.
			</div></li><li class="listitem"><div class="para">
				Click the Configure button of the VPC to which you want to deploy the VMs.
			</div><div class="para">
				The VPC page is displayed where all the tiers you have created are listed.
			</div></li><li class="listitem"><div class="para">
				Click Virtual Machines tab of the tier to which you want to add a VM.
			</div><div class="mediaobject"><img src="./images/add-vm-vpc.png" alt="add-vm-vpc.png: adding a VM to a vpc." /></div><div class="para">
				The Add Instance page is displayed.
			</div><div class="para">
				Follow the on-screen instruction to add an instance. For information on adding an instance, see the Installation Guide.
			</div></li></ol></div></div><div xml:lang="en-US" class="section" id="add-vm-tier-sharednw" lang="en-US"><div class="titlepage"><div><div><h3 class="title">15.27.7. Deploying VMs to VPC Tier and Shared Networks</h3></div></div></div><div class="para">
		CloudStack allows you deploy VMs on a VPC tier and one or more shared networks. With this feature, VMs deployed in a multi-tier application can receive monitoring services via a shared network provided by a service provider.
	</div><div class="orderedlist"><ol><li class="listitem"><div class="para">
				Log in to the CloudStack UI as an administrator.
			</div></li><li class="listitem"><div class="para">
				In the left navigation, choose Instances.
			</div></li><li class="listitem"><div class="para">
				Click Add Instance.
			</div></li><li class="listitem"><div class="para">
				Select a zone.
			</div></li><li class="listitem"><div class="para">
				Select a template or ISO, then follow the steps in the wizard.
			</div></li><li class="listitem"><div class="para">
				Ensure that the hardware you have allows starting the selected service offering.
			</div></li><li class="listitem"><div class="para">
				Under Networks, select the desired networks for the VM you are launching.
			</div><div class="para">
				You can deploy a VM to a VPC tier and multiple shared networks.
			</div><div class="mediaobject"><img src="./images/addvm-tier-sharednw.png" width="444" alt="addvm-tier-sharednw.png: adding a VM to a VPC tier and shared network." /></div></li><li class="listitem"><div class="para">
				Click Next, review the configuration and click Launch.
			</div><div class="para">
				Your VM will be deployed to the selected VPC tier and shared network.
			</div></li></ol></div></div><div xml:lang="en-US" class="section" id="acquire-new-ip-for-vpc" lang="en-US"><div class="titlepage"><div><div><h3 class="title">15.27.8. Acquiring a New IP Address for a VPC</h3></div></div></div><div class="para">
		When you acquire an IP address, all IP addresses are allocated to VPC, not to the guest networks within the VPC. The IPs are associated to the guest network only when the first port-forwarding, load balancing, or Static NAT rule is created for the IP or the network. IP can't be associated to more than one network at a time.
	</div><div class="orderedlist"><ol><li class="listitem"><div class="para">
				Log in to the CloudStack UI as an administrator or end user.
			</div></li><li class="listitem"><div class="para">
				In the left navigation, choose Network.
			</div></li><li class="listitem"><div class="para">
				In the Select view, select VPC.
			</div><div class="para">
				All the VPCs that you have created for the account is listed in the page.
			</div></li><li class="listitem"><div class="para">
				Click the Configure button of the VPC to which you want to deploy the VMs.
			</div><div class="para">
				The VPC page is displayed where all the tiers you created are listed in a diagram.
			</div><div class="para">
				The following options are displayed.
			</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
						Internal LB
					</div></li><li class="listitem"><div class="para">
						Public LB IP
					</div></li><li class="listitem"><div class="para">
						Static NAT
					</div></li><li class="listitem"><div class="para">
						Virtual Machines
					</div></li><li class="listitem"><div class="para">
						CIDR
					</div></li></ul></div><div class="para">
				The following router information is displayed:
			</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
						Private Gateways
					</div></li><li class="listitem"><div class="para">
						Public IP Addresses
					</div></li><li class="listitem"><div class="para">
						Site-to-Site VPNs
					</div></li><li class="listitem"><div class="para">
						Network ACL Lists
					</div></li></ul></div></li><li class="listitem"><div class="para">
				Select IP Addresses.
			</div><div class="para">
				The Public IP Addresses page is displayed.
			</div></li><li class="listitem"><div class="para">
				Click Acquire New IP, and click Yes in the confirmation dialog.
			</div><div class="para">
				You are prompted for confirmation because, typically, IP addresses are a limited resource. Within a few moments, the new IP address should appear with the state Allocated. You can now use the IP address in port forwarding, load balancing, and static NAT rules.
			</div></li></ol></div></div><div xml:lang="en-US" class="section" id="release-ip-for-vpc" lang="en-US"><div class="titlepage"><div><div><h3 class="title">15.27.9. Releasing an IP Address Alloted to a VPC</h3></div></div></div><div class="para">
		The IP address is a limited resource. If you no longer need a particular IP, you can disassociate it from its VPC and return it to the pool of available addresses. An IP address can be released from its tier, only when all the networking ( port forwarding, load balancing, or StaticNAT ) rules are removed for this IP address. The released IP address will still belongs to the same VPC.
	</div><div class="orderedlist"><ol><li class="listitem"><div class="para">
				Log in to the CloudStack UI as an administrator or end user.
			</div></li><li class="listitem"><div class="para">
				In the left navigation, choose Network.
			</div></li><li class="listitem"><div class="para">
				In the Select view, select VPC.
			</div><div class="para">
				All the VPCs that you have created for the account is listed in the page.
			</div></li><li class="listitem"><div class="para">
				Click the Configure button of the VPC whose IP you want to release.
			</div><div class="para">
				The VPC page is displayed where all the tiers you created are listed in a diagram.
			</div><div class="para">
				The following options are displayed.
			</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
						Internal LB
					</div></li><li class="listitem"><div class="para">
						Public LB IP
					</div></li><li class="listitem"><div class="para">
						Static NAT
					</div></li><li class="listitem"><div class="para">
						Virtual Machines
					</div></li><li class="listitem"><div class="para">
						CIDR
					</div></li></ul></div><div class="para">
				The following router information is displayed:
			</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
						Private Gateways
					</div></li><li class="listitem"><div class="para">
						Public IP Addresses
					</div></li><li class="listitem"><div class="para">
						Site-to-Site VPNs
					</div></li><li class="listitem"><div class="para">
						Network ACL Lists
					</div></li></ul></div></li><li class="listitem"><div class="para">
				Select Public IP Addresses.
			</div><div class="para">
				The IP Addresses page is displayed.
			</div></li><li class="listitem"><div class="para">
				Click the IP you want to release.
			</div></li><li class="listitem"><div class="para">
				In the Details tab, click the Release IP button 
				<span class="inlinemediaobject"><img src="./images/release-ip-icon.png" alt="release-ip-icon.png: button to release an IP." /></span>
			</div></li></ol></div></div><div xml:lang="en-US" class="section" id="enable-disable-static-nat-vpc" lang="en-US"><div class="titlepage"><div><div><h3 class="title">15.27.10. Enabling or Disabling Static NAT on a VPC</h3></div></div></div><div class="para">
		A static NAT rule maps a public IP address to the private IP address of a VM in a VPC to allow Internet traffic to it. This section tells how to enable or disable static NAT for a particular IP address in a VPC.
	</div><div class="para">
		If port forwarding rules are already in effect for an IP address, you cannot enable static NAT to that IP.
	</div><div class="para">
		If a guest VM is part of more than one network, static NAT rules will function only if they are defined on the default network.
	</div><div class="orderedlist"><ol><li class="listitem"><div class="para">
				Log in to the CloudStack UI as an administrator or end user.
			</div></li><li class="listitem"><div class="para">
				In the left navigation, choose Network.
			</div></li><li class="listitem"><div class="para">
				In the Select view, select VPC.
			</div><div class="para">
				All the VPCs that you have created for the account is listed in the page.
			</div></li><li class="listitem"><div class="para">
				Click the Configure button of the VPC to which you want to deploy the VMs.
			</div><div class="para">
				The VPC page is displayed where all the tiers you created are listed in a diagram.
			</div><div class="para">
				For each tier, the following options are displayed.
			</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
						Internal LB
					</div></li><li class="listitem"><div class="para">
						Public LB IP
					</div></li><li class="listitem"><div class="para">
						Static NAT
					</div></li><li class="listitem"><div class="para">
						Virtual Machines
					</div></li><li class="listitem"><div class="para">
						CIDR
					</div></li></ul></div><div class="para">
				The following router information is displayed:
			</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
						Private Gateways
					</div></li><li class="listitem"><div class="para">
						Public IP Addresses
					</div></li><li class="listitem"><div class="para">
						Site-to-Site VPNs
					</div></li><li class="listitem"><div class="para">
						Network ACL Lists
					</div></li></ul></div></li><li class="listitem"><div class="para">
				In the Router node, select Public IP Addresses.
			</div><div class="para">
				The IP Addresses page is displayed.
			</div></li><li class="listitem"><div class="para">
				Click the IP you want to work with.
			</div></li><li class="listitem"><div class="para">
				In the Details tab,click the Static NAT button.
				<span class="inlinemediaobject"><img src="./images/enable-disable.png" alt="enable-disable.png: button to enable Static NAT." /></span>
				The button toggles between Enable and Disable, depending on whether static NAT is currently enabled for the IP address.
			</div></li><li class="listitem"><div class="para">
				If you are enabling static NAT, a dialog appears as follows:
			</div><div class="mediaobject"><img src="./images/select-vm-staticnat-vpc.png" width="444" alt="select-vmstatic-nat.png: selecting a tier to apply staticNAT." /></div></li><li class="listitem"><div class="para">
				Select the tier and the destination VM, then click Apply.
			</div></li></ol></div></div><div xml:lang="en-US" class="section" id="add-loadbalancer-rule-vpc" lang="en-US"><div class="titlepage"><div><div><h3 class="title">15.27.11. Adding Load Balancing Rules on a VPC</h3></div></div></div><div class="para">
		In a VPC, you can configure two types of load balancing—external LB and internal LB. External LB is nothing but a LB rule created to redirect the traffic received at a public IP of the VPC virtual router. The traffic is load balanced within a tier based on your configuration. Citrix NetScaler and VPC virtual router are supported for external LB. When you use internal LB service, traffic received at a tier is load balanced across different VMs within that tier. For example, traffic reached at Web tier is redirected to another VM in that tier. External load balancing devices are not supported for internal LB. The service is provided by a internal LB VM configured on the target tier.
	</div><div class="section" id="curent-lb-vpc"><div class="titlepage"><div><div><h4 class="title">15.27.11.1. Load Balancing Within a Tier (External LB)</h4></div></div></div><div class="para">
			A CloudStack user or administrator may create load balancing rules that balance traffic received at a public IP to one or more VMs that belong to a network tier that provides load balancing service in a VPC. A user creates a rule, specifies an algorithm, and assigns the rule to a set of VMs within a tier.
		</div><div class="section" id="enable-vpc-public-lb"><div class="titlepage"><div><div><h5 class="title">15.27.11.1.1. Enabling NetScaler as the LB Provider on a VPC Tier</h5></div></div></div><div class="orderedlist"><ol><li class="listitem"><div class="para">
						Add and enable Netscaler VPX in dedicated mode.
					</div><div class="para">
						Netscaler can be used in a VPC environment only if it is in dedicated mode.
					</div></li><li class="listitem"><div class="para">
						Create a network offering, as given in <a class="xref" href="configure-vpc.html#ext-lb-offering">Section 15.27.11.1.2, “Creating a Network Offering for External LB”</a>.
					</div></li><li class="listitem"><div class="para">
						Create a VPC with Netscaler as the Public LB provider.
					</div><div class="para">
						For more information, see <a class="xref" href="configure-vpc.html#add-vpc">Section 15.27.2, “Adding a Virtual Private Cloud”</a>.
					</div></li><li class="listitem"><div class="para">
						For the VPC, acquire an IP.
					</div></li><li class="listitem"><div class="para">
						Create an external load balancing rule and apply, as given in <a class="xref" href="configure-vpc.html#ext-lb-vpc">Section 15.27.11.1.3, “Creating an External LB Rule”</a>.
					</div></li></ol></div></div><div class="section" id="ext-lb-offering"><div class="titlepage"><div><div><h5 class="title">15.27.11.1.2. Creating a Network Offering for External LB</h5></div></div></div><div class="para">
				To have external LB support on VPC, create a network offering as follows:
			</div><div class="orderedlist"><ol><li class="listitem"><div class="para">
						Log in to the CloudStack UI as a user or admin.
					</div></li><li class="listitem"><div class="para">
						From the Select Offering drop-down, choose Network Offering.
					</div></li><li class="listitem"><div class="para">
						Click Add Network Offering.
					</div></li><li class="listitem"><div class="para">
						In the dialog, make the following choices:
					</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Name</strong></span>: Any desired name for the network offering.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Description</strong></span>: A short description of the offering that can be displayed to users.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Network Rate</strong></span>: Allowed data transfer rate in MB per second.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Traffic Type</strong></span>: The type of network traffic that will be carried on the network.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Guest Type</strong></span>: Choose whether the guest network is isolated or shared.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Persistent</strong></span>: Indicate whether the guest network is persistent or not. The network that you can provision without having to deploy a VM on it is termed persistent network.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>VPC</strong></span>: This option indicate whether the guest network is Virtual Private Cloud-enabled. A Virtual Private Cloud (VPC) is a private, isolated part of CloudStack. A VPC can have its own virtual network topology that resembles a traditional physical network. For more information on VPCs, see <a class="xref" href="configure-vpc.html#vpc">Section 15.27.1, “About Virtual Private Clouds”</a>.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Specify VLAN</strong></span>: (Isolated guest networks only) Indicate whether a VLAN should be specified when this offering is used.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Supported Services</strong></span>: Select Load Balancer. Use Netscaler or VpcVirtualRouter.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Load Balancer Type</strong></span>: Select Public LB from the drop-down.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>LB Isolation</strong></span>: Select Dedicated if Netscaler is used as the external LB provider.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>System Offering</strong></span>: Choose the system service offering that you want virtual routers to use in this network.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Conserve mode</strong></span>: Indicate whether to use conserve mode. In this mode, network resources are allocated only when the first virtual machine starts in the network.
							</div></li></ul></div></li><li class="listitem"><div class="para">
						Click OK and the network offering is created.
					</div></li></ol></div></div><div class="section" id="ext-lb-vpc"><div class="titlepage"><div><div><h5 class="title">15.27.11.1.3. Creating an External LB Rule</h5></div></div></div><div class="orderedlist"><ol><li class="listitem"><div class="para">
						Log in to the CloudStack UI as an administrator or end user.
					</div></li><li class="listitem"><div class="para">
						In the left navigation, choose Network.
					</div></li><li class="listitem"><div class="para">
						In the Select view, select VPC.
					</div><div class="para">
						All the VPCs that you have created for the account is listed in the page.
					</div></li><li class="listitem"><div class="para">
						Click the Configure button of the VPC, for which you want to configure load balancing rules.
					</div><div class="para">
						The VPC page is displayed where all the tiers you created listed in a diagram.
					</div><div class="para">
						For each tier, the following options are displayed:
					</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
								Internal LB
							</div></li><li class="listitem"><div class="para">
								Public LB IP
							</div></li><li class="listitem"><div class="para">
								Static NAT
							</div></li><li class="listitem"><div class="para">
								Virtual Machines
							</div></li><li class="listitem"><div class="para">
								CIDR
							</div></li></ul></div><div class="para">
						The following router information is displayed:
					</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
								Private Gateways
							</div></li><li class="listitem"><div class="para">
								Public IP Addresses
							</div></li><li class="listitem"><div class="para">
								Site-to-Site VPNs
							</div></li><li class="listitem"><div class="para">
								Network ACL Lists
							</div></li></ul></div></li><li class="listitem"><div class="para">
						In the Router node, select Public IP Addresses.
					</div><div class="para">
						The IP Addresses page is displayed.
					</div></li><li class="listitem"><div class="para">
						Click the IP address for which you want to create the rule, then click the Configuration tab.
					</div></li><li class="listitem"><div class="para">
						In the Load Balancing node of the diagram, click View All.
					</div></li><li class="listitem"><div class="para">
						Select the tier to which you want to apply the rule.
					</div></li><li class="listitem"><div class="para">
						Specify the following:
					</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Name</strong></span>: A name for the load balancer rule.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Public Port</strong></span>: The port that receives the incoming traffic to be balanced.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Private Port</strong></span>: The port that the VMs will use to receive the traffic.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Algorithm</strong></span>. Choose the load balancing algorithm you want CloudStack to use. CloudStack supports the following well-known algorithms:
							</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
										Round-robin
									</div></li><li class="listitem"><div class="para">
										Least connections
									</div></li><li class="listitem"><div class="para">
										Source
									</div></li></ul></div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Stickiness</strong></span>. (Optional) Click Configure and choose the algorithm for the stickiness policy. See Sticky Session Policies for Load Balancer Rules.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Add VMs</strong></span>: Click Add VMs, then select two or more VMs that will divide the load of incoming traffic, and click Apply.
							</div></li></ul></div></li></ol></div><div class="para">
				The new load balancing rule appears in the list. You can repeat these steps to add more load balancing rules for this IP address.
			</div></div></div><div class="section" id="acros-tiers-lb"><div class="titlepage"><div><div><h4 class="title">15.27.11.2. Load Balancing Across Tiers</h4></div></div></div><div class="para">
			CloudStack supports sharing workload across different tiers within your VPC. Assume that multiple tiers are set up in your environment, such as Web tier and Application tier. Traffic to each tier is balanced on the VPC virtual router on the public side, as explained in <a class="xref" href="configure-vpc.html#add-loadbalancer-rule-vpc">Section 15.27.11, “Adding Load Balancing Rules on a VPC”</a>. If you want the traffic coming from the Web tier to the Application tier to be balanced, use the internal load balancing feature offered by CloudStack.
		</div><div class="section" id="vpc-pic"><div class="titlepage"><div><div><h5 class="title">15.27.11.2.1. How Does Internal LB Work in VPC?</h5></div></div></div><div class="para">
				In this figure, a public LB rule is created for the public IP 72.52.125.10 with public port 80 and private port 81. The LB rule, created on the VPC virtual router, is applied on the traffic coming from the Internet to the VMs on the Web tier. On the Application tier two internal load balancing rules are created. An internal LB rule for the guest IP 10.10.10.4 with load balancer port 23 and instance port 25 is configured on the VM, InternalLBVM1. Another internal LB rule for the guest IP 10.10.10.4 with load balancer port 45 and instance port 46 is configured on the VM, InternalLBVM1. Another internal LB rule for the guest IP 10.10.10.6, with load balancer port 23 and instance port 25 is configured on the VM, InternalLBVM2.
			</div><div class="mediaobject"><img src="./images/vpc-lb.png" width="444" alt="vpc-lb.png: Configuring internal LB for VPC" /></div></div><div class="section" id="internallb-notes"><div class="titlepage"><div><div><h5 class="title">15.27.11.2.2. Guidelines</h5></div></div></div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
						Internal LB and Public LB are mutually exclusive on a tier. If the tier has LB on the public side, then it can't have the Internal LB.
					</div></li><li class="listitem"><div class="para">
						Internal LB is supported just on VPC networks in CloudStack 4.2 release.
					</div></li><li class="listitem"><div class="para">
						Only Internal LB VM can act as the Internal LB provider in CloudStack 4.2 release.
					</div></li><li class="listitem"><div class="para">
						Network upgrade is not supported from the network offering with Internal LB to the network offering with Public LB.
					</div></li><li class="listitem"><div class="para">
						Multiple tiers can have internal LB support in a VPC.
					</div></li><li class="listitem"><div class="para">
						Only one tier can have Public LB support in a VPC.
					</div></li></ul></div></div><div class="section" id="enable-vpc-lb"><div class="titlepage"><div><div><h5 class="title">15.27.11.2.3. Enabling Internal LB on a VPC Tier</h5></div></div></div><div class="orderedlist"><ol><li class="listitem"><div class="para">
						Create a network offering, as given in <a class="xref" href="configure-vpc.html#int-lb-vpc">Section 15.27.11.2.5, “Creating an Internal LB Rule”</a>.
					</div></li><li class="listitem"><div class="para">
						Create an internal load balancing rule and apply, as given in <a class="xref" href="configure-vpc.html#int-lb-vpc">Section 15.27.11.2.5, “Creating an Internal LB Rule”</a>.
					</div></li></ol></div></div><div class="section" id="int-lb-offering"><div class="titlepage"><div><div><h5 class="title">15.27.11.2.4. Creating a Network Offering for Internal LB</h5></div></div></div><div class="para">
				To have internal LB support on VPC, either use the default offering, DefaultIsolatedNetworkOfferingForVpcNetworksWithInternalLB, or create a network offering as follows:
			</div><div class="orderedlist"><ol><li class="listitem"><div class="para">
						Log in to the CloudStack UI as a user or admin.
					</div></li><li class="listitem"><div class="para">
						From the Select Offering drop-down, choose Network Offering.
					</div></li><li class="listitem"><div class="para">
						Click Add Network Offering.
					</div></li><li class="listitem"><div class="para">
						In the dialog, make the following choices:
					</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Name</strong></span>: Any desired name for the network offering.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Description</strong></span>: A short description of the offering that can be displayed to users.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Network Rate</strong></span>: Allowed data transfer rate in MB per second.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Traffic Type</strong></span>: The type of network traffic that will be carried on the network.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Guest Type</strong></span>: Choose whether the guest network is isolated or shared.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Persistent</strong></span>: Indicate whether the guest network is persistent or not. The network that you can provision without having to deploy a VM on it is termed persistent network.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>VPC</strong></span>: This option indicate whether the guest network is Virtual Private Cloud-enabled. A Virtual Private Cloud (VPC) is a private, isolated part of CloudStack. A VPC can have its own virtual network topology that resembles a traditional physical network. For more information on VPCs, see <a class="xref" href="configure-vpc.html#vpc">Section 15.27.1, “About Virtual Private Clouds”</a>.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Specify VLAN</strong></span>: (Isolated guest networks only) Indicate whether a VLAN should be specified when this offering is used.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Supported Services</strong></span>: Select Load Balancer. Select <code class="code">InternalLbVM</code> from the provider list.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Load Balancer Type</strong></span>: Select Internal LB from the drop-down.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>System Offering</strong></span>: Choose the system service offering that you want virtual routers to use in this network.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Conserve mode</strong></span>: Indicate whether to use conserve mode. In this mode, network resources are allocated only when the first virtual machine starts in the network.
							</div></li></ul></div></li><li class="listitem"><div class="para">
						Click OK and the network offering is created.
					</div></li></ol></div></div><div class="section" id="int-lb-vpc"><div class="titlepage"><div><div><h5 class="title">15.27.11.2.5. Creating an Internal LB Rule</h5></div></div></div><div class="para">
				When you create the Internal LB rule and applies to a VM, an Internal LB VM, which is responsible for load balancing, is created.
			</div><div class="para">
				You can view the created Internal LB VM in the Instances page if you navigate to <span class="bold bold"><strong>Infrastructure</strong></span> &gt; <span class="bold bold"><strong>Zones</strong></span> &gt; &lt;<span class="italic italic">zone_ name</span>&gt; &gt; &lt;<span class="italic italic">physical_network_name</span>&gt; &gt; <span class="bold bold"><strong>Network Service Providers</strong></span> &gt; <span class="bold bold"><strong>Internal LB VM</strong></span>. You can manage the Internal LB VMs as and when required from the location.
			</div><div class="orderedlist"><ol><li class="listitem"><div class="para">
						Log in to the CloudStack UI as an administrator or end user.
					</div></li><li class="listitem"><div class="para">
						In the left navigation, choose Network.
					</div></li><li class="listitem"><div class="para">
						In the Select view, select VPC.
					</div><div class="para">
						All the VPCs that you have created for the account is listed in the page.
					</div></li><li class="listitem"><div class="para">
						Locate the VPC for which you want to configure internal LB, then click Configure.
					</div><div class="para">
						The VPC page is displayed where all the tiers you created listed in a diagram.
					</div></li><li class="listitem"><div class="para">
						Locate the Tier for which you want to configure an internal LB rule, click Internal LB.
					</div><div class="para">
						In the Internal LB page, click Add Internal LB.
					</div></li><li class="listitem"><div class="para">
						In the dialog, specify the following:
					</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Name</strong></span>: A name for the load balancer rule.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Description</strong></span>: A short description of the rule that can be displayed to users.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Source IP Address</strong></span>: (Optional) The source IP from which traffic originates. The IP is acquired from the CIDR of that particular tier on which you want to create the Internal LB rule. If not specified, the IP address is automatically allocated from the network CIDR.
							</div><div class="para">
								For every Source IP, a new Internal LB VM is created for load balancing.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Source Port</strong></span>: The port associated with the source IP. Traffic on this port is load balanced.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Instance Port</strong></span>: The port of the internal LB VM.
							</div></li><li class="listitem"><div class="para">
								<span class="bold bold"><strong>Algorithm</strong></span>. Choose the load balancing algorithm you want CloudStack to use. CloudStack supports the following well-known algorithms:
							</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
										Round-robin
									</div></li><li class="listitem"><div class="para">
										Least connections
									</div></li><li class="listitem"><div class="para">
										Source
									</div></li></ul></div></li></ul></div></li></ol></div></div></div></div><div xml:lang="en-US" class="section" id="add-portforward-vpc" lang="en-US"><div class="titlepage"><div><div><h3 class="title">15.27.12. Adding a Port Forwarding Rule on a VPC</h3></div></div></div><div class="orderedlist"><ol><li class="listitem"><div class="para">
				Log in to the CloudStack UI as an administrator or end user.
			</div></li><li class="listitem"><div class="para">
				In the left navigation, choose Network.
			</div></li><li class="listitem"><div class="para">
				In the Select view, select VPC.
			</div><div class="para">
				All the VPCs that you have created for the account is listed in the page.
			</div></li><li class="listitem"><div class="para">
				Click the Configure button of the VPC to which you want to deploy the VMs.
			</div><div class="para">
				The VPC page is displayed where all the tiers you created are listed in a diagram.
			</div><div class="para">
				For each tier, the following options are displayed:
			</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
						Internal LB
					</div></li><li class="listitem"><div class="para">
						Public LB IP
					</div></li><li class="listitem"><div class="para">
						Static NAT
					</div></li><li class="listitem"><div class="para">
						Virtual Machines
					</div></li><li class="listitem"><div class="para">
						CIDR
					</div></li></ul></div><div class="para">
				The following router information is displayed:
			</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
						Private Gateways
					</div></li><li class="listitem"><div class="para">
						Public IP Addresses
					</div></li><li class="listitem"><div class="para">
						Site-to-Site VPNs
					</div></li><li class="listitem"><div class="para">
						Network ACL Lists
					</div></li></ul></div></li><li class="listitem"><div class="para">
				In the Router node, select Public IP Addresses.
			</div><div class="para">
				The IP Addresses page is displayed.
			</div></li><li class="listitem"><div class="para">
				Click the IP address for which you want to create the rule, then click the Configuration tab.
			</div></li><li class="listitem"><div class="para">
				In the Port Forwarding node of the diagram, click View All.
			</div></li><li class="listitem"><div class="para">
				Select the tier to which you want to apply the rule.
			</div></li><li class="listitem"><div class="para">
				Specify the following:
			</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
						<span class="bold bold"><strong>Public Port</strong></span>: The port to which public traffic will be addressed on the IP address you acquired in the previous step.
					</div></li><li class="listitem"><div class="para">
						<span class="bold bold"><strong>Private Port</strong></span>: The port on which the instance is listening for forwarded public traffic.
					</div></li><li class="listitem"><div class="para">
						<span class="bold bold"><strong>Protocol</strong></span>: The communication protocol in use between the two ports.
					</div><div class="itemizedlist"><ul><li class="listitem"><div class="para">
								TCP
							</div></li><li class="listitem"><div class="para">
								UDP
							</div></li></ul></div></li><li class="listitem"><div class="para">
						<span class="bold bold"><strong>Add VM</strong></span>: Click Add VM. Select the name of the instance to which this rule applies, and click Apply.
					</div><div class="para">
						You can test the rule by opening an SSH session to the instance.
					</div></li></ul></div></li></ol></div></div><div xml:lang="en-US" class="section" id="remove-tier" lang="en-US"><div class="titlepage"><div><div><h3 class="title">15.27.13. Removing Tiers</h3></div></div></div><div class="para">
		You can remove a tier from a VPC. A removed tier cannot be revoked. When a tier is removed, only the resources of the tier are expunged. All the network rules (port forwarding, load balancing and staticNAT) and the IP addresses associated to the tier are removed. The IP address still be belonging to the same VPC.
	</div><div class="orderedlist"><ol><li class="listitem"><div class="para">
				Log in to the CloudStack UI as an administrator or end user.
			</div></li><li class="listitem"><div class="para">
				In the left navigation, choose Network.
			</div></li><li class="listitem"><div class="para">
				In the Select view, select VPC.
			</div><div class="para">
				All the VPC that you have created for the account is listed in the page.
			</div></li><li class="listitem"><div class="para">
				Click the Configure button of the VPC for which you want to set up tiers.
			</div><div class="para">
				The Configure VPC page is displayed. Locate the tier you want to work with.
			</div></li><li class="listitem"><div class="para">
				Select the tier you want to remove.
			</div></li><li class="listitem"><div class="para">
				In the Network Details tab, click the Delete Network button. 
				<span class="inlinemediaobject"><img src="./images/del-tier.png" alt="del-tier.png: button to remove a tier" /></span>
			</div><div class="para">
				Click Yes to confirm. Wait for some time for the tier to be removed.
			</div></li></ol></div></div><div xml:lang="en-US" class="section" id="remove-vpc" lang="en-US"><div class="titlepage"><div><div><h3 class="title">15.27.14. Editing, Restarting, and Removing a Virtual Private Cloud</h3></div></div></div><div class="note"><div class="admonition_header"><h2>Note</h2></div><div class="admonition"><div class="para">
			Ensure that all the tiers are removed before you remove a VPC.
		</div></div></div><div class="orderedlist"><ol><li class="listitem"><div class="para">
				Log in to the CloudStack UI as an administrator or end user.
			</div></li><li class="listitem"><div class="para">
				In the left navigation, choose Network.
			</div></li><li class="listitem"><div class="para">
				In the Select view, select VPC.
			</div><div class="para">
				All the VPCs that you have created for the account is listed in the page.
			</div></li><li class="listitem"><div class="para">
				Select the VPC you want to work with.
			</div></li><li class="listitem"><div class="para">
				In the Details tab, click the Remove VPC button
				<span class="inlinemediaobject"><img src="./images/remove-vpc.png" alt="remove-vpc.png: button to remove a VPC" /></span>
			</div><div class="para">
				You can remove the VPC by also using the remove button in the Quick View.
			</div><div class="para">
				You can edit the name and description of a VPC. To do that, select the VPC, then click the Edit button. 
				<span class="inlinemediaobject"><img src="./images/edit-icon.png" alt="edit-icon.png: button to edit a VPC" /></span>
			</div><div class="para">
				To restart a VPC, select the VPC, then click the Restart button.
				<span class="inlinemediaobject"><img src="./images/restart-vpc.png" alt="restart-vpc.png: button to restart a VPC" /></span>
			</div></li></ol></div></div></div><ul class="docnav"><li class="previous"><a accesskey="p" href="inter-vlan-routing.html"><strong>Prev</strong>15.26. About Inter-VLAN Routing (nTier Apps)</a></li><li class="up"><a accesskey="u" href="#"><strong>Up</strong></a></li><li class="home"><a accesskey="h" href="index.html"><strong>Home</strong></a></li><li class="next"><a accesskey="n" href="persistent-network.html"><strong>Next</strong>15.28. Persistent Networks</a></li></ul></body></html>
