Computer Networks: Layers and Models
A computer network connects devices so they can exchange data. Networks are built in layers: each layer offers a service to the one above and hides the details of the one below.
OSI vs TCP/IP
| OSI layer | TCP/IP layer | Unit (PDU) | Examples |
|---|---|---|---|
| 7 Application | Application | Data / message | HTTP, DNS, SMTP, FTP |
| 6 Presentation | Application | Data | TLS, encoding, compression |
| 5 Session | Application | Data | Sessions, RPC |
| 4 Transport | Transport | Segment (TCP) / datagram (UDP) | TCP, UDP |
| 3 Network | Internet | Packet | IP, ICMP, routers |
| 2 Data link | Link | Frame | Ethernet, Wi-Fi, switches |
| 1 Physical | Link | Bits | Cables, radio |
TIP
Mnemonic (top to bottom): All People Seem To Need Data Processing.
Encapsulation
Each layer wraps the data from the layer above with its own header (and sometimes a trailer):
Application data
+ TCP header -> segment
+ IP header -> packet
+ Ethernet header/trailer -> frame -> bits on the wire
The receiver removes the headers in reverse order (decapsulation).
Network types and topologies
| Type | Scope |
|---|---|
| PAN | A person's devices (Bluetooth) |
| LAN | A building or campus |
| MAN | A city |
| WAN | Countries and continents (the Internet) |
Common topologies: bus, star (most LANs), ring, mesh, tree.
Switching
| Technique | Idea |
|---|---|
| Circuit switching | A dedicated path for the whole call (old telephone network) |
| Packet switching | Data split into packets that are routed independently (the Internet) |
Performance terms
- Bandwidth: maximum data rate of a link.
- Throughput: actual data rate achieved.
- Latency: time for one bit/packet to travel; RTT is the round trip.
- Jitter: variation in latency.
- Delay = transmission + propagation + queuing + processing.
Transmission delay = packet size / bandwidth
Propagation delay = distance / signal speed
Loading Comments...