9.4: Cloud Networking Fundamentals - VPCs, Subnets, and Connectivity

Introduction to Cloud Computing · LibreTexts

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    Read aloud

    How

    Speed: 1×
    Light up
    Highlight

    Symbols: Mulberry Symbols, © 2018–2026 Steve Lee, CC BY-SA 4.0 (licence, the set), the site's own copies.

    From LibreTexts, under CC BY 4.0, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.

    9.4: Cloud Networking Fundamentals - VPCs, Subnets, and Connectivity

    Cloud Networking Fundamentals - VPCs, Subnets, and Connectivity

    When moving workloads to the cloud, understanding cloud networking is essential. Cloud providers virtualize networking through concepts like Virtual Private Clouds, subnets, routing tables, and gateways. A solid cloud implementation strategy ensures that each workload’s network layout (IP addresses, connectivity, security boundaries) is mapped correctly in the cloud design.

    Virtual Private Cloud (VPC): A VPC is an isolated virtual network environment in a public cloud. It’s analogous to having a logically separated portion of the cloud provider’s network just for your organization. Within a VPC, you control the IP address range, create subnets, and configure routing and gateways. For example, in AWS, when you create a VPC you might choose a CIDR block (Classless Inter-Domain Routing block) like 10.0.0.0/16 for your addresses, giving you a private address space in which to operate. The VPC is the fundamental container for your cloud network – workloads deployed in the cloud will reside in one or more subnets within a VPC.

    Subnets and Availability Zones: A subnet is a segmented range of IP addresses within the VPC. Typically, subnets are tied to Availability Zones (AZs), which are distinct data center locations. For example, you might divide your 10.0.0.0/16 VPC into two subnets: 10.0.1.0/24 in us-west-2a (AZ A) and 10.0.2.0/24 in us-west-2b (AZ B). Each subnet resides entirely within one AZ. This design allows you to deploy redundant resources across AZs for high availability. In practice, architects often designate public subnets (which have routes to an Internet Gateway, allowing instances to reach the internet) and private subnets (which have no direct internet route, used for backend instances like databases).

    When implementing a workload in the cloud, deciding how to subnet the VPC is important: public-facing components (like web servers or load balancers) go in public subnets, whereas sensitive components (databases, internal services) go in private subnets for security. Each subnet’s CIDR range must be sized to accommodate the number of resources you plan to deploy there, though it can be adjusted (within the VPC’s range) if needed.

    CIDR and IP Planning: CIDR (Classless Inter-Domain Routing) notation defines IP address ranges (e.g., /24, /16). Cloud architects must plan IP ranges to avoid overlaps, especially if the cloud will connect back to on-premises networks. Using non-overlapping private IP ranges is crucial when setting up a VPN or hybrid cloud connectivity. For instance, if your on-premises network uses 10.10.0.0/16, you might choose a completely different range (like 10.20.0.0/16) for your cloud VPC to ensure that when you connect the two via VPN, there are no IP conflicts. CIDR planning is a one-time upfront task when creating VPCs but is important for a smooth network integration.

    Routing and NAT: In a VPC, you control routing tables that determine how traffic flows. A common configuration is that public subnets have a route to the Internet Gateway (IGW) for outbound traffic, whereas private subnets do not. But instances in private subnets often need outbound internet access (for updates, external API calls, etc.). This is accomplished via Network Address Translation (NAT). A NAT gateway or NAT instance in a public subnet can allow private subnet instances to initiate outbound connections to the internet by translating their private IP to the NAT’s public IP. The NAT keeps track of the connection so return traffic is routed back to the correct private IP. Importantly, NAT (and the IGW) ensures that while private instances can reach out, external actors on the internet cannot initiate connections directly to those private instances. This pattern is a security best practice in cloud architectures: web servers in a public subnet can be reached by users, but your databases in a private subnet are shielded (accessible only from the web servers or via a bastion host).

    Firewalls and Security Groups: In on-premises environments, network firewalls (hardware or software) filter traffic between segments. In the cloud, similar principles apply, but the implementation is often software-defined. Cloud providers offer security groups and network ACLs (Access Control Lists) which act as firewalls. A security group is usually stateful and associated with an instance or resource, specifying which traffic (protocol, port, source) is allowed in or out. For example, you might have a security group for web servers allowing inbound TCP port 80/443 from anywhere (for HTTP/HTTPS) and allowing inbound port 22 (SSH) only from your office IP range; the database’s security group might allow inbound port 3306 (MySQL) only from the web servers’ security group, and no public access at all. These rules collectively function as a distributed firewall, ensuring only authorized traffic reaches each instance. Cloud firewalls can use the concept of ports similar to traditional firewalling – recall that servers have many ports, and only some should be open. The firewall’s job is to prevent unauthorized traffic from entering or leaving those ports. Properly setting up security groups and firewall rules is a critical part of cloud implementation, directly aligning with enterprise security strategy.

    VPN and Hybrid Connectivity: Many enterprises in transition will run a hybrid cloud – some workloads in cloud, some still on-prem – for a period of time (or indefinitely). To ensure seamless operation, secure connectivity between on-premises data centers and cloud VPCs is needed. This is where VPN (Virtual Private Network) connections or dedicated links (like AWS Direct Connect, Azure ExpressRoute) come into play. A VPN uses encryption (often IPsec tunnels) to send data over the public internet securely, effectively extending the private network into the cloud. In practice, an on-premises router or firewall appliance will have a VPN connection configured to a virtual VPN gateway in the cloud VPC. Through this tunnel, cloud VPC resources can communicate with on-prem resources as if they were part of one network. For example, an application server in AWS might need to query a legacy database still in the on-prem data center; with a VPN or Direct Connect in place, it can do so securely. Implementing VPN connectivity is a key part of many cloud adoption projects, ensuring that workloads moved to cloud can still reach back to any dependencies left on-prem (and vice versa) without exposing those connections over the public internet.

    Network Design Example: Suppose an enterprise is moving a three-tier application (web, app, DB) to the cloud. A likely network design would be:

    • Create a VPC (10.50.0.0/16) with two AZs for redundancy. - In each AZ, create a public subnet (10.50.1.0/24 in AZ A, 10.50.2.0/24 in AZ B) and a private subnet (10.50.11.0/24 in AZ A, 10.50.12.0/24 in AZ B).
    • Deploy two web server instances in the public subnets (one in each AZ) behind an application load balancer. These have public IPs or the load balancer has a public IP, to accept internet traffic.
    • Deploy two application servers in the private subnets (one per AZ). They do not have internet access directly; they communicate with web servers and with the database. - Deploy a managed database service in the private subnet (say a multi-AZ database which has endpoints in both AZs).
    • Use a NAT gateway in each public subnet for the private instances to download updates or reach external APIs.
    • Set up security groups: web SG allows internet HTTP/HTTPS; app SG allows traffic from web SG; DB SG allows traffic from app SG only.
    • (If needed) Set up a VPN connection back to on-prem so that admins can connect to these servers via the internal network, or so the app can talk to an on-prem authentication server, etc.
      VPC Network Architecture. Details in caption.
    Figure \(\PageIndex{1}\): VPC Network Architecture with Public and Private Subnets. This network diagram shows a typical enterprise VPC design spanning two Availability Zones, with public subnets for internet-facing resources, private subnets for backend services, NAT gateways for controlled outbound access, and a VPN connection to an on-premises data center. (CC BY 4.0; Felix Amoruwa) Access to a detailed description of Figure \(\PageIndex{1}\)

    This design ensures the workload is secure, scalable, and integrated – fulfilling likely strategy requirements such as improved security isolation, HA (with multi-AZ), and retaining necessary connectivity.

    For the implementation team, mastering these cloud networking components is vital. They will use provider-specific tools (like AWS VPC console or Terraform scripts) to create VPCs, subnets, and configure routing. It’s a one-time setup per workload or set of workloads, but mistakes (like overlapping IP ranges or misconfigured security groups) can derail migration until fixed. Thus, aligning network design with workload strategy (for example, if the strategy calls for strict security, ensure network ACLs and no public IPs on sensitive resources) is part of the “workload strategy meets implementation” mantra.


    This page titled 9.4: Cloud Networking Fundamentals - VPCs, Subnets, and Connectivity was last modified on Wed, 23 Sep 2026 02:29:20 GMT and is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Felix Amoruwa.