The TCP/IP Protocol Suite
1. The 4-Layer Model
TCP/IP is a stack of protocols. Each layer provides a service to the layer above it and uses the services of the layer below.
HTTP HTTPS FTP SMTP DNS
Handles user-level requests and data formatting.
TCP UDP
Segments data, manages port numbers, and ensures reliable delivery (TCP).
IP (IPv4/IPv6) ICMP
Addresses and routes packets across different networks.
Ethernet Wi-Fi MAC Addresses
Handles physical transmission of bits over hardware.
2. Encapsulation
As data moves down the stack, each layer adds a Header. This process is called Encapsulation.
When the receiver gets the data, it performs Decapsulation, stripping the headers off as the data moves up the layers.
3. Protocols in Depth
- TCP (Transmission Control Protocol): Connection-oriented. Uses a 3-way handshake (SYN, SYN-ACK, ACK) to ensure data is received correctly and in order.
- IP (Internet Protocol): Connectionless. Its job is just to get the packet to the right destination address; it doesn't care if it gets there safely.
- DNS (Domain Name System): Translates human-readable names (e-consult.co.ke) into IP addresses.
A2 exams frequently ask why you'd choose one over the other. TCP is for reliability (e.g., File transfer, Email). UDP is for speed (e.g., Video streaming, Online gaming), where losing a few packets is better than waiting for retransmission.