Overview
You can use this document to learn how to create and manage a virtual private cloud (VPC) network.
VPC is a networking functionality that allows you to create isolated virtual networks from one or more workloads. In short, VPC allows you to control your virtual network connections.
When you create a workload, you can use the default StackPath network, or you can create and use your own VPC.
To use a workload with your own VPC, you must:
- Create a VPC
- Create a workload, and then assign the VPC as you create the workload
Note:
To learn how to create a workload, see Create and Manage Virtual Machines, Containers, and Workloads
Create a VPC
Before you create a VPC, consider the following statements:
- You cannot assign a VPC to an existing workload. You can only assign a VPC as you create a workload.
- You cannot unassign a VPC from a workload.
- You cannot delete a VPC assigned to a workload.
- To remove or delete a VPC, you must first delete the workload, and then you can delete the VPC.
- In the StackPath Control Portal, in the left-side navigation, click Edge Compute.
- In the left-side navigation, click VPCs.
- Click Create VPC.
- In Name, enter a descriptive name for the network.
- This name will display in the VPCs table as well as in the drop-down menu when you create a workload.
- In IPv4 CIDR Block, enter a range of IPv4 addresses for the VPC.
-
StackPath recommends that you use a private IP address range specified in RFC 1918, such as 10.0.0.0/9, 172.0/9, or 192.0/9.
- You can enter a /9 or larger.
- When you create a VPC, a subnet from each region is automatically created within the VPC. These subnets use a set of predefined IP ranges that fit within the 10.0.0/9 CIDR block.
- To learn more, please review the Address Allocation for Private Internets article from IETF Datatracker.
-
- Click Create VPC.
- The newly created virtual private cloud will display in the Virtual Private Cloud table.
After you create a VPC, you can create a workload and assign the VPC to the workload. To learn more, see Create and Manage Virtual Machines, Containers, and Workloads.
Delete a VPC
Note:
You cannot delete a VPC that is assigned to workload. You must first delete the assigned workload, and then you can delete the VPC.
To delete a workload:
- In the StackPath Control Portal, in the left-side navigation, click Edge Compute.
- In the left-side navigation, click Workloads.
- Under Action, click the corresponding ellipses.
- Click Delete, and then confirm the action.
- In the StackPath Control Portal, in the left-side navigation, click Edge Compute.
- In the left-side navigation, click VPCs.
- Locate the desired VPC, and then under Action, click the corresponding ellipses.
- Click Delete.
- Review the pop-up window.
- If the VPC is not assigned to a workload, then follow the on-screen instructions to delete the VPC.
- If the VPC is assigned to a workload, then click the listed workload to access the Workloads screen. Under Action, click the corresponding ellipses. Click Delete, and then confirm the action. Return to the Virtual Private Cloud screen and continue to delete the VPC.
Create a route for existing VPCs and workloads
You can use these instructions to specify the next hop for packets, based on a specific destination address. In other words, you can create a route to deliver packets between an existing source workload and an existing target workload.
Before you create a route, consider the following statements:
- To create a route between workloads, you must have at least 2 workloads that share a VPC.
- When you created a workload, you also added a VPC to each instance. This shared VPC helps to create the connection between workloads.
- Within a VPC, there is a limit of 800 IPv4 instances, OR
- Within a VPC, there is a limit of 600 IPv6 instances.
- In the StackPath Control Portal, in the left-side navigation, click Edge Compute.
- In the left-side navigation, click VPCs.
- Locate and select the desired VPC that is assigned to both the source workload and the target workload.
- After you create a route, you cannot change the VPC.
- Click Create Route.
- In Name, enter a descriptive name.
- This name will display in the Routes table.
-
In Destination IP Ranges, enter the range of IP addresses where you want to send the packet.
-
In other words, enter the destination CIDR for the route.
- Enter a destination address within the specified destination CIDR routes to the next hop (target workload).
- The prefix must be within the subnet range of the VPC of the target workload.
-
-
In Next Hops, select the target workload that will receive the packet.
- The drop-down menu will not display workloads that do not share the selected VPC.
- Based on the IP range you entered, the packet will be delivered to the route's next hop if the packet's destination address is within the route's destination rage.
-
Route uses an Equal-Cost Multi-Path (ECMP) strategy.
- Click Create Route.
Delete a route
- In the StackPath Control Portal, in the left-side navigation, click Edge Compute.
- In the left-side navigation, click VPCs.
- Locate and select the desired VPC that contains the route.
- Under Action, click the corresponding ellipses.
- Click Delete.
- Click Delete again.
Create a subnet for an existing VPC
A subnet is a segment of a VPC's IP address range where you can group isolated resources. In other words, a subnet is a subset of a VPC's designed CIDR block.
Before you begin, consider the following statements:
- You can only create a subnet for an existing VPC. You cannot create a subnet for a VPC that does not exist. To learn how to create a VPC, see Create a VPC.
- You cannot delete a subnet that is assigned to a workload. To delete a subnet, you must first delete the assigned workload, and then you can delete the subnet.
- After you create a subnet, you can create a workload and assign the subnet to the workload.
- In the StackPath Control Portal, in the left-side navigation, click Workloads.
- In the left-side navigation, click VPCs.
- Locate and select the desired VPC.
- Click Create Subnet.
- In Names, enter a descriptive name.
- This name will display in the Subnets table.
- In IPv4 CIDR Block, enter a range of IPv4 addresses, based on the range of your VPC.
- If you create more than one subnet, the CIDR blocks of the subnets cannot overlap.
- Click Create Subnet.
After you create a subnet, you can create a workload and assign the subnet to the workload. To learn more, see Create and Manage Virtual Machines, Containers, and Workloads.
Delete a subnet
Note:
You cannot delete a subnet that is assigned to workload. You must first delete the assigned workload, and then you can delete the subnet.
To delete a workload:
- In the StackPath Control Portal, in the left-side navigation, click Edge Compute.
- In the left-side navigation, click Workloads.
- Under Action, click the corresponding ellipses.
- Click Delete, and then confirm the action.
- In the StackPath Control Portal, in the left-side navigation, click Edge Compute.
- In the left-side navigation, click VPCs.
- Locate and select the desired VPC.
- Locate the desired subnet, and then under Action, click the corresponding ellipses.
- Click Delete.
- Review the pop-up window.
- If the subnet is not assigned to a workload, then follow the on-screen instructions to delete the VPC.
- If the subnet is assigned to a workload, then click the listed workload to access the Workloads screen. Under Action, click the corresponding ellipses. Click Delete, and then confirm the action. Return to the Virtual Private Cloud screen and continue to delete the VPC.
Understand VPCs tables
You can use these instructions to understand the displayed data for existing VPC.
- In the StackPath Control Portal, in the left-side navigation, click Edge Compute.
- In the left-side navigation, click VPCs.
-
Review the table:
Column Description Name This column displays the descriptive name of the virtual private cloud. IPV4 CIDR This column displays CIDR range for the VPC. - Locate and select the desired VPC.
- Review the Subnets table.
- This table displays the subnets associated with a VPC.
Column Description Name This column displays the descriptive name of the subnet.
IPV4 CIDR This column displays CIDR range for the subnet.
- This table displays the subnets associated with a VPC.
- Review the Routes table.
- This table displays the routes associated with a VPC.
Column Description Name This column displays the descriptive name of the route. Next Hops This column displays the name of the target workload that will receive packets from the source workload.
- This table displays the routes associated with a VPC.
Related documentation
- To view VPC API calls, see Virtual Private Cloud.
- For additional, complementary information on VPC API calls, see VPC Network in the StackPath Developer Portal.
- To learn how to create a workload and use a VPC, see Create and Manage Virtual Machines, Containers, and Workloads.