Networking is described in layers. You will meet the seven-layer OSI model in interviews and the four-layer TCP/IP model in practice, and the argument about which is correct has consumed more time than it deserves.
What layering actually means is useful, though: each layer solves one problem and treats the layer below as a solved problem. That is why a web application can be written without knowing whether it will run over wifi or fibre.
Here is the practical version, from the bottom:
| Layer | Question it answers | You will meet |
|---|---|---|
| Physical / Link | How do bits cross this one hop? | MAC addresses |
| Network | How does this reach a machine on another network? | IP addresses, routing |
| Transport | Which program, and did it all arrive? | Ports, TCP, UDP |
| Application | What does the message mean? | HTTP, DNS, SSH |
The two that matter in AWS
Almost everything in this course lives in the two bold rows.
The network layer is addresses and routing — IP addresses, CIDR blocks, subnets, route tables, gateways. This is what a VPC is: a private network-layer space that you control.
The transport layer is ports and connections — TCP, UDP, and the port numbers that decide which program receives a packet. This is what security groups and NACLs filter on.
You will hear AWS load balancers described as "layer 7" or "layer 4". That now means something concrete: an Application Load Balancer reads the actual HTTP request and can route on the URL path, while a Network Load Balancer only looks at addresses and ports and forwards without reading anything. Section eleven returns to this.
Why the layering matters practically
When something does not work, the layers tell you where to look, in order:
- Is there a route? Network layer. Does the route table know where to send this?
- Is it allowed? Transport layer. Do the security group and NACL permit this port?
- Is anything listening? Application layer. Is the program running and bound to that port?
Almost every "I can't connect to my instance" is one of those three, and checking them in that order is faster than guessing. Section six builds this into a full method.