TCP/IP
What is TCP/IP?
- TCP/IP stands for Transmission Control Protocol / Internet Protocol.
- It's the fundamental suite of communication protocols that powers the Internet and most modern networks.
- Originally developed by the U.S. Department of Defense (ARPANET, 1970s), it became the standard networking model.
TCP/IP Layered Model
TCP/IP is organized into four layers (similar to the OSI 7-layer model, but more practical):
- Link Layer (Network Interface)
- Handles physical network hardware (Ethernet, Wi-Fi).
- Defines how bits are transmitted over wires, fiber, or radio.
- Examples: Ethernet, PPP, ARP.
- Internet Layer
- Responsible for addressing and routing packets across networks.
- Core protocol: IP (Internet Protocol).
- Examples: IPv4, IPv6, ICMP.
- Transport Layer
- Ensures end-to-end communication between applications.
- Two main protocols:
- TCP (Transmission Control Protocol) → reliable, connection-oriented (web, email).
- UDP (User Datagram Protocol) → fast, connectionless (DNS, video streaming, gaming).
- Application Layer
- Where actual user applications and services live.
- Examples: HTTP, HTTPS, FTP, SMTP, DNS, SSH.
Key Features
- IP:
- Provides addressing (IP addresses) and routing.
- Doesn’t guarantee delivery (best-effort).
- TCP:
- Builds on IP to provide reliable, ordered, error-checked communication.
- Ensures data arrives intact and in the right order.
- Uses mechanisms like handshakes, acknowledgments, retransmissions.
- UDP:
- Lightweight, no guarantee of delivery or order.
- Useful for real-time applications (gaming, VoIP, streaming).
Example Flow (Sending a Web Page)
- You type http://example.com.
- Application Layer (HTTP): creates a request.
- Transport Layer (TCP): wraps the request in segments, ensures reliability.
- Internet Layer (IP): adds source/destination IP addresses, routes packets.
- Link Layer (Ethernet/Wi-Fi): sends packets as electrical signals/radio waves.
- Server responds with HTTP data: the process happens in reverse.
Why TCP/IP Matters
- Universal: used by the Internet, LANs, cloud systems.
- Scalable: supports billions of devices.
- Flexible: works across different physical networks (fiber, copper, wireless).
- Robust: designed to withstand network failures.