Sub topic 2
The OSI and TCP/IP Models in Brief
This chapter assumes you know the network types from the previous chapter (LAN, WAN, and so on) and can read simple decimal numbers. It gives you the two layered models that A+ Core 1 uses to describe where a protocol, device, or fault belongs.
Why Use a Layered Model
A network does many jobs: turning bits into signals, finding a path, delivering data reliably, and presenting it to an application. A layered model splits those jobs into layers. Each layer talks only to the layer above and below it, so you can change a cable type without rewriting a web browser.
For troubleshooting, layers give you a map. If a cable is unplugged, the fault is low in the stack. If a website loads the wrong page, it is high in the stack.
The OSI Model
The OSI (Open Systems Interconnection) model has seven layers. Data moves down the layers on the sending computer and up the layers on the receiving one.
| Layer | Name | Job | Examples |
|---|---|---|---|
| 7 | Application | Network services for programs | HTTP, DNS, SMTP |
| 6 | Presentation | Formatting, encryption, compression | TLS, JPEG |
| 5 | Session | Opening, keeping, and closing conversations | RPC, NetBIOS sessions |
| 4 | Transport | Delivery between processes, ports | TCP, UDP |
| 3 | Network | Logical addressing and routing | IP, routers |
| 2 | Data Link | Local delivery using MAC addresses | Ethernet, switches |
| 1 | Physical | Bits as signals on a medium | Cables, hubs, radio |
A common memory aid from layer 7 down is "All People Seem To Need Data Processing". From layer 1 up, it is "Please Do Not Throw Sausage Pizza Away".
The TCP/IP Model
The TCP/IP model is the one the internet actually uses. It has four layers, and each one covers several OSI layers.
| TCP/IP layer | OSI layers covered | Examples |
|---|---|---|
| Application | 5, 6, 7 | HTTP, HTTPS, DNS, DHCP |
| Transport | 4 | TCP, UDP |
| Internet | 3 | IP, ICMP |
| Network Access (Link) | 1, 2 | Ethernet, Wi-Fi |
Encapsulation
As data moves down the stack, each layer wraps it with its own header. This is called encapsulation. The units have names worth knowing:
- Application data is handed to the transport layer.
- The transport layer adds a TCP or UDP header. The unit is a segment (TCP) or datagram (UDP).
- The internet layer adds an IP header with source and destination IP addresses. The unit is a packet.
- The link layer adds a MAC-address header and a trailer. The unit is a frame.
- The physical layer sends the frame as bits.
The receiver reverses the process, which is called de-encapsulation.
Mapping Devices and Problems to Layers
On the exam, you often match a device to a layer.
- A hub or cable works at layer 1.
- A switch works at layer 2, using MAC addresses.
- A router works at layer 3, using IP addresses.
- A firewall may filter at layers 3 and 4 (addresses and ports), and some inspect layer 7.
Common mistakes: placing a switch at layer 3 (basic switches are layer 2), and treating TCP/IP's Application layer as the same as OSI layer 7 (it also covers layers 5 and 6).
Exercise
A technician finds that a computer has a valid IP address but cannot reach a web page, and the web server's port is blocked by a firewall rule. At which OSI layer is the rule most likely filtering, and what unit of data does that layer use?
Show answer
The rule filters on a port number, so it works at layer 4, the Transport layer. TCP data at this layer is called a segment.
Exercise
Which OSI layers does the TCP/IP Application layer cover?
Show answer
Layers 5 (Session), 6 (Presentation), and 7 (Application).