Cloud Networking Tutorial: Build a Working VPC in 2026

Cloud Networking Tutorial: Build a Working VPC in 2026

What happens when two virtual machines in the same cloud account cannot talk to each other, even though both are running fine? Ask any cloud engineer who has debugged a broken deployment at 2 a.m., and the answer is almost always the network. Compute is easy to spin up. Networking is where cloud projects quietly fall apart. (How to read a cloud region announcement) (Cloud computing)

This tutorial walks through the core ideas behind cloud networking in the order you will meet them on a real project: address planning, subnets, routing, connectivity back to your office, security, and the operational habits that keep it all working. It is written for people who can launch a server but feel shaky about what sits between the servers.

Start With the Cloud Network Model, Not the Console

Cloud networking borrows its vocabulary from traditional data centers but changes how you use it. The standard reference for that vocabulary is the cloud computing definition published by NIST, which describes cloud platforms through five essential characteristics, three service models, and four deployment models. Networking touches all five characteristics, especially resource pooling and measured service, because every packet you move is shared infrastructure that someone is metering.

The practical consequence: in a traditional data center, the network team owns the switches and you file a ticket. In the cloud, you own a virtual private cloud (VPC), a logically isolated network with its own address ranges, subnets, route tables, and gateways. You are the network engineer now, whether or not that was in your job title.

That shift explains most beginner mistakes. People treat a VPC like a flat switch and skip planning. Then they discover they cannot add a second region, peer with a partner, or connect an office without renumbering everything.

Plan Your Address Space Before You Build Anything

Plan Your Address Space Before You Build Anything

The single highest-leverage hour in any cloud network project is the one spent on IP addressing. Everything downstream, from subnet size to VPN routes to firewall rules, depends on it.

Cloud networks use CIDR notation, short for Classless Inter-Domain Routing, to describe blocks of addresses such as 10.0.0.0/16. The current specification for how these blocks are written and aggregated is RFC 4632, which replaced the older classful system and still governs how routers summarize routes today. A /16 gives you 65,536 addresses; a /24 gives you 256. Choose a block big enough for growth but small enough that it does not collide with your on-premises network.

Inside that block, you carve subnets, usually one per availability zone for each tier of your application. A common pattern looks like this:

Tier Example CIDR Purpose
Public 10.0.1.0/24 Load balancers, bastion hosts, NAT gateways
Private app 10.0.10.0/24 Application servers with no inbound internet
Private data 10.0.20.0/24 Databases reachable only from the app tier

For anything that stays internal, use the private address ranges reserved by RFC 1918, which sets aside 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 for networks that never appear on the public internet. These are the ranges cloud VPCs are built on, and reusing them consistently across environments makes life much easier.

Practical tip: write your address plan in a shared document before touching the console. Include every VPC, every on-premises site, and every planned acquisition. The most common mistake is picking 10.0.0.0/16 for a production VPC and later finding that the corporate VPN, a partner network, or a second region already uses it.

Understand Route Tables, Gateways, and the Path a Packet Takes

A subnet is just a label until a route table points traffic somewhere. Every subnet is associated with a route table, and every route table has a local route for the VPC’s own CIDR plus rules for everything else.

The mental model that helps most beginners: for any packet, ask two questions. Where is it going, and which route table does the sending subnet use? If the destination is outside the VPC, there must be a route to an internet gateway, a NAT gateway, a transit gateway, or a peering connection. If there is no matching route, the packet is dropped silently. No error, no log entry by default, just nothing.

Three gateway types cover most designs:

  • Internet gateway: connects a public subnet to the internet. Instances also need a public IP address.

  • NAT gateway: lets private subnets make outbound connections without accepting inbound ones. This is where most software updates and API calls leave your network.

  • Transit or peering connections: link VPCs to each other. Peering is simple and cheap but does not transit, meaning VPC A peered with B and B with C does not let A reach C.

If your architecture is growing beyond a handful of VPCs, it is worth reading up on when to split workloads across cloud accounts, because account boundaries and network boundaries interact in ways that surprise teams. A clear separation strategy early prevents a tangle of peering links later.

Connect the Cloud Back to Your Office

Hybrid connectivity is where cloud networking gets interesting for most businesses. There are two main options, and they differ in cost, setup time, and predictability.

A site-to-site VPN runs an encrypted tunnel over the public internet between your office router and a cloud VPN gateway. The encryption standard behind it is IPsec, whose architecture is defined in RFC 4301, and every major cloud provider supports it. VPNs are cheap, quick to set up, and fine for moderate traffic. They are also subject to internet weather, which means variable latency and occasional drops.

A dedicated private connection, such as AWS Direct Connect or Azure ExpressRoute, gives you a private circuit from your data center to the provider’s network. It is more expensive and takes weeks to provision, but it offers consistent latency and higher bandwidth. Many organizations run both: a private circuit for production traffic and a VPN as backup.

The decision usually comes down to one question: what happens if the link goes down? If a VPN outage is an inconvenience, use a VPN. If it stops revenue, budget for a dedicated circuit and a second path.

Lock Down Traffic With Security Groups and Network ACLs

Cloud networks give you two layers of traffic control, and confusing them is a classic error.

Security groups are stateful firewalls attached to individual resources. If you allow inbound traffic on port 443, the response is automatically allowed out. Rules are allow-only; there are no deny rules.

Network ACLs are stateless filters attached to subnets. They evaluate every packet in both directions independently, and they support explicit deny rules. Because they are stateless, you must remember to allow return traffic on ephemeral ports, which is a frequent source of mysterious timeouts.

A workable default: keep security groups tight and specific (allow 443 from the load balancer’s security group, not from 0.0.0.0/0), and use network ACLs sparingly, mainly as a blunt guardrail on sensitive subnets. For a broader look at how these controls fit into a security program, the enterprise AI and cloud security material on 9481.org covers the governance side that tutorials often skip. (9481.org)

Modern designs increasingly lean toward zero trust, a model that assumes no network location is inherently safe and verifies every request. The reference architecture for it is NIST SP 800-207, which lays out the principles in detail. In practice, this means identity-aware proxies and service-to-service authentication rather than trusting anything just because it sits inside the VPC.

Name Things, Resolve Things, Balance Things

Three services quietly hold most cloud networks together.

DNS maps names to addresses and often does more: latency-based routing, failover, and weighted splits between regions all happen at the DNS layer. Get your hosted zone structure right early, and keep TTLs low during migrations so changes propagate quickly.

Load balancers come in two flavors. Layer 4 balancers route on IP and port, which is fast and protocol-agnostic. Layer 7 balancers understand HTTP, so they can route by path or host header, terminate TLS, and add headers. Most web applications want Layer 7 at the edge and Layer 4 internally.

Overlay networks are how providers stitch thousands of tenants together. VXLAN, specified in RFC 7348, wraps Layer 2 frames inside UDP packets so virtual networks can span physical infrastructure. You rarely configure VXLAN directly in a public cloud, but knowing it exists explains why your VPC behaves like a single switch even though it is spread across racks.

Observe, Test, and Keep Costs Sane

Networking problems are invisible without telemetry. Enable flow logs on your VPCs and keep them somewhere queryable. Turn on DNS query logging if you have ever spent an afternoon chasing a typo in a CNAME. Set alarms on NAT gateway errors and VPN tunnel status, because both fail quietly.

Test connectivity deliberately. A simple reachability matrix, source subnet to destination subnet to port, catches most design gaps before they reach production. Run it after every change to route tables or security groups.

Then watch the bill. Data transfer between availability zones, across regions, and out to the internet is billed separately from compute, and it adds up faster than most teams expect. A clearer way to track cloud data transfer costs on 9481.org walks through tagging and reporting approaches that make this visible. Pair that with regular cost reviews that engineers actually read, and the network stops being a line item nobody understands.

Two habits separate teams that stay out of trouble from teams that firefight:

  • Change one thing at a time. Route table edits and security group edits in the same window make rollback guesswork.

  • Document the intended path. A short diagram description of how a request travels from the internet to the database saves hours during incidents.

Conclusion

Cloud networking rewards planning more than almost any other part of the platform. Get the address space right, understand which route table handles which packet, choose your hybrid connection based on what an outage would cost, and layer security deliberately rather than bolting it on. None of this requires memorizing every service. It requires a clear mental model of how packets move and a habit of testing before you trust.

Start small. Build one VPC with a public and a private subnet, prove that a private instance can reach the internet through a NAT gateway but not the other way around, and then add complexity. The concepts scale; the confidence comes from doing.

What is the difference between a VPC and a subnet?

A VPC is the whole isolated network, including its address range, route tables, and gateways. A subnet is a slice of that range tied to a single availability zone. You can have many subnets inside one VPC, but a subnet never spans zones.

Do I need a VPN if I use a private cloud connection?

Not necessarily, but many teams keep one anyway. A dedicated private circuit offers steadier performance, while a VPN is cheaper and faster to set up. Running a VPN as a backup path means a circuit failure does not take down your connectivity.

Why can two instances in the same VPC not reach each other?

The usual causes are a missing route, a security group that does not allow the traffic, or a network ACL blocking return packets. Because network ACLs are stateless, a rule that allows inbound traffic without a matching outbound rule will silently drop the reply.

What size CIDR block should I choose for a VPC?

Most teams start with a /16 for production, which provides 65,536 addresses and leaves room for many /24 subnets. Smaller blocks save address space but force awkward workarounds later, especially if you plan to peer with other networks.

Is a Layer 7 load balancer always better than a Layer 4 one?

No. Layer 7 balancers add HTTP awareness, path routing, and TLS termination, which suits web traffic. Layer 4 balancers are simpler and faster for non-HTTP protocols like databases or custom TCP services. Many architectures use both.

How do I stop cloud networking costs from creeping up?

Tag every resource by team and environment, enable flow logs so you can see where traffic actually goes, and review cross-zone and egress charges monthly. Most surprises come from chatty services talking across availability zones or regions without anyone noticing.

Latest articles

Scroll to Top