Week 14: TCP IP - M199205zn/Datacomm-CS3 GitHub Wiki


TCP/IP Model Discussion

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
  1. Application Layer | Supports network services and applications directly used by end-users. | HTTP, HTTPS, FTP, DNS, SMTP, POP3, IMAP
  2. Transport Layer | Manages end-to-end communication, reliability, and flow control. | TCP, UDP, QUIC
  3. Internet Layer | Handles logical addressing, routing, and packet delivery. | IP (IPv4, IPv6), ICMP, ARP, NDP
  4. 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.


Modern Updates in TCP/IP Model

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.


Simple Diagram of Updated TCP/IP Model

+-------------------+
|  Application Layer |
|  (HTTP, FTP, SMTP) |
+-------------------+
|  Transport Layer   |
|  (TCP, UDP, QUIC)  |
+-------------------+
|  Internet Layer    |
|  (IP, ICMP, IPv6)  |
+-------------------+
|  Network Access    |
| (Ethernet, Wi-Fi)  |
+-------------------+

Key Points to Remember

  • 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).



How TCP/IP Works on the Internet

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:


1. Application Layer (You create data)

  • 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).

2. Transport Layer (Data is broken into segments)

  • 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).

3. Internet Layer (Routing the packets)

  • 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).

4. Network Access Layer (Sending the packet physically)

  • 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.).

5. Across the Internet (Through routers)

  • Your packets travel through routers and networks.
  • Routers read the IP addresses and forward the packets toward their destination.

6. Destination (Reassembling the message)

  • 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.

Simple Diagram:

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

In Short:

  • 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.

⚠️ **GitHub.com Fallback** ⚠️