Week 14: TCP IP - M199205zn/Datacomm-CS3 GitHub Wiki
The TCP/IP model (also called the Internet Protocol Suite) is a conceptual framework used to describe how data is transmitted over a network. It was originally developed in the 1970s by DARPA and has evolved over time with modern networking demands.
Today, the updated TCP/IP model generally consists of four layers:
Layer | Purpose | Key Protocols/Examples |
---|
- Application Layer | Supports network services and applications directly used by end-users. | HTTP, HTTPS, FTP, DNS, SMTP, POP3, IMAP
- Transport Layer | Manages end-to-end communication, reliability, and flow control. | TCP, UDP, QUIC
- Internet Layer | Handles logical addressing, routing, and packet delivery. | IP (IPv4, IPv6), ICMP, ARP, NDP
- Network Access Layer (or Link Layer) | Deals with the physical connection to the network and frame transmission. | Ethernet, Wi-Fi (IEEE 802.11), Bluetooth, PPP, DSL
-
The TCP/IP model combines several OSI layers into one.
-
It is simpler and more practical because it was designed based on real-world protocols.
Here’s what’s new and important today:
-
QUIC Protocol: A new transport protocol developed by Google; it improves latency and security (used in HTTP/3).
-
IPv6 Adoption: IPv6 is gradually replacing IPv4 due to address exhaustion.
-
Encryption by Default: Many application layer protocols (like HTTPS, DNS over HTTPS) now focus on built-in encryption.
-
Multipath TCP (MPTCP): Allows a device to send packets across multiple network paths at the same time (e.g., Wi-Fi and cellular).
-
Software-Defined Networking (SDN) and Network Function Virtualization (NFV): Newer networking approaches that abstract and virtualize network layers, affecting mainly the Internet and Network Access layers.
+-------------------+
| Application Layer |
| (HTTP, FTP, SMTP) |
+-------------------+
| Transport Layer |
| (TCP, UDP, QUIC) |
+-------------------+
| Internet Layer |
| (IP, ICMP, IPv6) |
+-------------------+
| Network Access |
| (Ethernet, Wi-Fi) |
+-------------------+
-
TCP/IP is a practical, flexible model built around protocols.
-
End-to-end communication (Transport layer) is crucial (e.g., TCP reliability, UDP speed).
-
Routing and addressing (Internet layer) make the Internet scalable.
-
Physical and data link technologies keep evolving (e.g., 5G, Wi-Fi 6/7).
The TCP/IP model is the foundation of how devices communicate over the Internet.
It works by breaking down data into small packets, sending them across the network, and rebuilding them at the destination.
Here’s the step-by-step flow:
- You open a web browser and type a website URL.
- The Application Layer (e.g., HTTP) creates the data to send (like a web page request).
- The Transport Layer (e.g., TCP) splits the data into smaller pieces called segments.
- TCP adds port numbers (e.g., port 80 for HTTP) and sequence numbers to help rearrange packets later.
- If using UDP (instead of TCP), it’s faster but no guarantee of delivery (good for video or games).
- The Internet Layer (using IP) puts each segment into a packet and adds an IP address (your address and the server’s address).
- IP decides where the packet should go across multiple networks (routing).
- The Network Access Layer (Ethernet, Wi-Fi) prepares the packet for actual physical transmission.
- It uses MAC addresses to deliver the packet to the next device (router, switch, etc.).
- Your packets travel through routers and networks.
- Routers read the IP addresses and forward the packets toward their destination.
- At the destination:
- Network Access Layer receives the packet.
- Internet Layer checks the IP address.
- Transport Layer (TCP) reassembles the segments into the original message.
- Application Layer (like a web server) reads your request and sends back a response.
You (Browser)
↓
Application Layer (HTTP Request)
↓
Transport Layer (TCP Segments with Port Numbers)
↓
Internet Layer (IP Packets with IP Addresses)
↓
Network Access Layer (Frames with MAC Addresses)
↓
Internet (Routers Forward Packets)
↓
Destination Server
- TCP/IP slices data → addresses it → sends it across → reassembles it on the other side.
- It's like sending multiple postcards that together form a full message when received.