Computer Networking Fundamentals Every Cloud Builder Should Know (and How They Map to AWS)
Cloud services come and go, but networking fundamentals stay the same. This article walks through the core concepts of computer networks (OSI and TCP/IP, IP addressing, DNS, routing, and load balancing) and shows how each one maps to AWS services such as Amazon VPC, Route 53, and Elastic Load Balancing.
Introduction
Every application you deploy on AWS, from a simple static website to a globally distributed microservices platform, depends on a network. When something breaks, it is often a networking problem: a missing route, a blocked port, a wrong DNS record, or an overlapping CIDR block.
Understanding the fundamentals of computer networks makes you faster at troubleshooting and better at designing secure, scalable architectures. This article covers the essentials and connects each one to the AWS service you will use in practice.
1. What Is a Computer Network?
A computer network is a set of devices (hosts, servers, routers, switches) connected to exchange data using agreed rules called protocols. Networks are usually classified by scale:
- LAN (Local Area Network): a small area, such as an office or a data center rack.
- WAN (Wide Area Network): connects LANs across cities, countries, or continents. The internet is the largest WAN.
- Virtual networks: software-defined networks running on shared physical infrastructure. This is what Amazon VPC provides.
2. The OSI and TCP/IP Models
Models give us a common vocabulary for where a problem occurs.
OSI Layer | TCP/IP Layer | Examples | AWS relevance |
|---|---|---|---|
7. Application | Application | HTTP, HTTPS, DNS, SSH | Application Load Balancer, Route 53, CloudFront |
6. Presentation | Application | TLS, encoding | AWS Certificate Manager, TLS termination |
5. Session | Application | Session management | Sticky sessions on ALB |
4. Transport | Transport | TCP, UDP | Network Load Balancer, Security Group ports |
3. Network | Internet | IP, ICMP | VPC routing, route tables, NACLs |
2. Data Link | Link | Ethernet, MAC | Handled by AWS (ENIs) |
1. Physical | Link | Cables, fiber | Handled by AWS data centers |
A practical rule of thumb: if you cannot reach a server at all, start at layers 3 and 4 (routes, security groups, ports). If you can connect but get errors, look at layer 7 (application, TLS, DNS).
3. IP Addressing and CIDR
Every device on a network needs an address. IPv4 uses 32-bit addresses (for example,
10.0.1.25 ), and IPv6 uses 128-bit addresses to solve IPv4 exhaustion.CIDR notation describes a network range:
10.0.0.0/16 means the first 16 bits identify the network, leaving 65,536 addresses for hosts.Private ranges (RFC 1918) are not routable on the public internet:
-
10.0.0.0/8
-
172.16.0.0/12
-
192.168.0.0/16
On AWS: when you create a VPC, you choose a CIDR block. Plan it carefully. If you later need to connect VPCs through peering, Transit Gateway, or VPN, overlapping CIDR ranges cannot be routed to each other. A common best practice is to reserve non-overlapping ranges per account and environment from the start.
4. Subnets, Routing, and Gateways
A subnet divides a larger network into smaller segments. A router forwards packets between networks based on a routing table.
In AWS, the building blocks look like this:
- VPC: your isolated virtual network.
- Public subnet: has a route to an Internet Gateway (IGW), so resources with public IPs can reach, and be reached from, the internet.
- Private subnet: has no direct route to the internet. Outbound access goes through a NAT Gateway placed in a public subnet.
- Route tables: define where traffic for each destination CIDR is sent.
A typical three-tier layout puts load balancers in public subnets, application servers in private subnets, and databases in isolated private subnets, spread across at least two Availability Zones for resilience.
Internet |[ Internet Gateway ] |[ Public Subnets ] -> ALB, NAT Gateway |[ Private App Subnets ] -> EC2 / ECS / EKS |[ Private Data Subnets ] -> RDS / ElastiCache5. TCP, UDP, and Ports
At the transport layer, two protocols dominate:
- TCP: connection-oriented, reliable, ordered delivery (web, email, databases).
- UDP: connectionless and fast, with no delivery guarantee (DNS queries, streaming, gaming, VoIP).
Ports identify services on a host: 22 (SSH), 80 (HTTP), 443 (HTTPS), 5432 (PostgreSQL), 3306 (MySQL).
On AWS:
- Security Groups are stateful firewalls attached to resources. If you allow inbound traffic, the response is automatically allowed.
- Network ACLs are stateless firewalls at the subnet level. You must explicitly allow both inbound and outbound traffic, including ephemeral return ports.
A good habit is to follow least privilege: open only the ports you need, to only the sources that need them, and reference other security groups instead of wide CIDR ranges.
6. DNS: The Phonebook of the Internet
The Domain Name System (DNS) translates names such as
example.com into IP addresses. A lookup typically flows from the client’s resolver to root servers, then TLD servers, then the authoritative name server for the domain.Common record types:
- A / AAAA: name to IPv4 / IPv6 address
- CNAME: alias to another name
- MX: mail servers
- TXT: verification and policies (SPF, DKIM)
On AWS: Amazon Route 53 is a highly available DNS service. Beyond simple records, it supports routing policies such as weighted, latency-based, geolocation, and failover, plus health checks. Private hosted zones let you resolve internal names inside your VPCs.
7. Load Balancing
A load balancer distributes traffic across multiple targets to improve availability and scalability. AWS Elastic Load Balancing offers:
- Application Load Balancer (ALB): Layer 7. Routes by host, path, headers, and query strings. Ideal for HTTP/HTTPS and microservices.
- Network Load Balancer (NLB): Layer 4. Very high performance and low latency, with static IPs. Ideal for TCP/UDP workloads.
- Gateway Load Balancer (GWLB): Layer 3. Deploys and scales third-party virtual appliances such as firewalls.
8. Connecting Networks
Real architectures rarely live in a single VPC. Common connectivity options include:
- VPC Peering: a direct, private connection between two VPCs (not transitive).
- AWS Transit Gateway: a central hub that connects many VPCs and on-premises networks.
- Site-to-Site VPN: encrypted tunnels over the internet to your office or data center.
- AWS Direct Connect: a dedicated private link from your premises to AWS, for consistent latency and throughput.
- AWS PrivateLink / VPC Endpoints: access AWS services or partner services privately, without sending traffic through the public internet.
9. Network Security Essentials
Networking and security are closely linked. Key practices:
- Segment your network with public, private, and isolated subnets.
- Apply least privilege in security groups and NACLs.
- Encrypt in transit with TLS everywhere (use AWS Certificate Manager).
- Use VPC endpoints to keep traffic to services like S3 and DynamoDB off the public internet.
- Enable VPC Flow Logs to record traffic metadata for auditing and troubleshooting.
- Add edge protection with AWS WAF and AWS Shield for web applications.
10. A Simple Troubleshooting Checklist
When an instance “can’t connect,” walk up the stack:
- DNS: does the name resolve to the expected IP? (
digornslookup)
- Route table: is there a route to the destination?
- Security group: is the port allowed from the source?
- Network ACL: are both directions allowed?
- Gateway: is the IGW or NAT Gateway attached and healthy?
- Application: is the service listening on the expected port? (
ss -tlnp)
- Logs: check VPC Flow Logs and, if needed, Reachability Analyzer to trace the path.
Conclusion
Cloud platforms abstract away cables and switches, but they do not abstract away the logic of networking. IP addressing, routing, ports, DNS, and load balancing are the same ideas whether you run them in a closet or in a VPC. If you master these fundamentals, services like Amazon VPC, Route 53, and Elastic Load Balancing stop feeling like a list of features and start feeling like parts of one coherent system.
Next steps: create a VPC with public and private subnets in a sandbox account, deploy a small app behind an ALB, and then break things on purpose (remove a route, close a port) to practice diagnosing the failure.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article