TCP IP Model

1. Introduction

In the course “Need of Networking Model,” we discussed how, initially, each manufacturer (IBM, DEC, etc.) designed its own communication protocols, making it impossible to interconnect equipment from different brands. This situation led to the need to standardize network communication.

Later, in the course “OSI Model,” we explored a 7-layer structure that explains how data flows (encapsulation/decapsulation) between a sender and a receiver. However, in the real world, the TCP/IP Model is the foundation for Internet communications and most enterprise networks.

The TCP/IP Model is not just a reference—it is a set of protocols implemented in real devices, enabling communication between hosts. Understanding its role is essential.

TCP IP Protocols

2. RFCs and How Protocols Work

Before diving into the layers of the TCP/IP Model, it’s important to understand how protocols are defined and who decides their rules.

What is the IETF?

The Internet Engineering Task Force (IETF) is a group of experts responsible for defining the rules that ensure devices can communicate over the Internet. These rules are published in documents called RFCs (Requests for Comments).

IETF Task Force Logo

What is an RFC?

An RFC is a document that explains how a protocol works. It provides detailed guidelines on how devices should use the protocol to send and receive data. RFCs act as instruction manuals that ensure all devices “speak the same language.”

  • RFCs ensure that protocols like TCP, IP, HTTPS, etc., work consistently on different types of devices, regardless of the manufacturer.
  • Each RFC is assigned a unique number and is publicly accessible.
  • Some RFCs are experimental or informational, while others become official Internet Standards.

Examples of RFCs

  • RFC 791 (IPv4): Defines IPv4 (Internet Protocol version 4).
  • RFC 793 (TCP): Describes TCP (Transmission Control Protocol), which ensures reliable communication.
  • RFC 1149 (Humorous): A humorous RFC about transmitting data using carrier pigeons (“IP over Avian Carriers”).

By clicking on these links, you can explore the original documents and get a feel for the level of detail used to describe how each protocol works.

3. TCP/IP Layers

Now that we understand how protocols are defined and standardized, let’s dive into the TCP/IP Model.

Transition from Proprietary Models

The TCP/IP Model, also known as the Internet Protocol Suite, is the dominant model for modern networking. It was developed by the U.S. Department of Defense (DoD) in the 1970s and finalized in 1983 to enable communication between different systems. Unlike earlier proprietary models, it is based on an open, standardized approach that laid the foundation for the Internet as we know it today.

The TCP/IP Model consists of four main layers, each responsible for specific tasks in the data transmission process:

  1. Application
  2. Transport
  3. Internet
  4. Network Access
TCP IP Layers

The following diagram illustrates how the TCP/IP Model maps to the OSI Model and highlights some commonly used protocols at each layer.

Note: The protocols shown are just a sample, as there are many more protocols used at various layers. If some of the protocols seem unfamiliar, don’t worry—you’ll learn about them in detail as we progress through the course.

Each layer plays a distinct role in processing the data sent or received. Let’s dive deeper into each layer.

Application Layer

The Application Layer corresponds to layers 7 (Application), 6 (Presentation), and 5 (Session) of the OSI Model. This is where users interact directly with network services, such as browsing the web or sending an email.

This layer manages protocols that perform specific tasks, such as displaying a web page or retrieving a remote file. Examples include:

TCP IP Layer Application
  • HTTP/HTTPS for web browsing
  • SMTP, POP3, IMAP for email management
  • DNS for domain name resolution
  • FTP for file transfers

In addition to handling communication tasks, this layer may also handle data encoding and encryption, such as with secure protocols like TLS/SSL.

If you don’t recognize some of these protocols yet, that’s perfectly fine—you’ll understand their purpose and use cases as we move forward.

Transport Layer

The Transport Layer corresponds to Layer 4 of the OSI Model and ensures reliable (or sometimes fast but less reliable) data transmission between two hosts. It manages connections, breaks data into segments, and reassembles messages at the destination.

TCP IP Layer Transport

Key protocols at this layer:

  • TCP (Transmission Control Protocol): Provides reliable, connection-oriented communication.
  • UDP (User Datagram Protocol): Provides faster, connectionless communication, often used for real-time applications.

In summary, the Transport Layer ensures that data is transmitted efficiently based on the service’s requirements.

Port Numbers and Service Identification

The Transport Layer uses port numbers to direct data to the correct service or application. Each service on a device “listens” on a specific port number.

For example, when you visit https://ccna-prep.com, your computer sends a request to the destination port 443 (the standard port for HTTPS). The web server at pingmynetwork.com listens on port 443 and sends back the requested data securely.

By using port numbers, the Transport Layer ensures that the right application receives the data, making it possible for your device to handle different tasks—like browsing a website and sending an email—at the same time.

Internet Layer

The Internet Layer corresponds to Layer 3 (Network) of the OSI Model and handles routing and addressing. It ensures that data packets can travel across multiple networks to reach their final destination.

TCP IP Layer Internet

Functions of the Internet Layer:

  • IP addressing (IPv4 or IPv6) to identify hosts
  • Routing packets through routers
  • Handling diagnostic messages using ICMP (for ping and traceroute)
  • Resolving IP addresses to MAC addresses via ARP

Don’t worry if some terms like ICMP or ARP are unfamiliar right now—we’ll cover them step-by-step later.

The Internet Layer ensures that data takes the correct path through the network.

Network Access Layer

The Network Access Layer combines Layer 2 (Data Link) and Layer 1 (Physical) of the OSI Model. It defines how data is transmitted over the communication medium (e.g., cables, fiber optics, or radio waves).

TCP IP Layer Network Access

This layer is responsible for:

  • Framing (adding headers and trailers with MAC addresses and error-checking data)
  • Media access control (e.g., CSMA/CD for Ethernet, CSMA/CA for Wi-Fi)
  • Bit transmission (converting data into electrical, optical, or radio signals)

4. Data Flow

Let’s look at how data flows through the TCP/IP Model layers with an example network:

  • PC is connected to Switch 1.
  • Switch 1 is connected to a Router (R1).
  • The Router is connected to Switch 2.
  • Switch 2 is connected to a Server.

The diagram below illustrates how data travels from PC to Server:

TCP IP Data Flow Through Layers

Explanation of Data Flow

  1. PC to Switch 1
    When the PC sends a message, the data travels down the layers to the Network Access Layer. Switch 1 forwards the frame based on the MAC address because it only operates at Layer 2 (Data Link). Why Layer 2? Switches are responsible for forwarding frames within the same network (LAN) and don’t process IP addresses or port numbers.
  2. Switch 1 to Router (R1)
    The router receives the frame and processes it at Layer 3 (Internet Layer) to read the IP address and decide where to send the data next. Routers forward packets across networks based on IP addresses. Why Layer 3? Routers handle communication between different networks, which requires end-to-end IP addressing.
  3. Router (R1) to Switch 2 and Server
    After the router forwards the packet to Switch 2, the switch uses the MAC address to send the frame to the Server. When the data arrives at the Server, it travels up the layers and is processed by the Application Layer.

5. Conclusion

The TCP/IP Model provides a structured way to understand how devices communicate over networks. Here are the key points to remember:

  1. RFCs Define Protocols:
    The IETF publishes RFCs that explain how protocols like TCP and IP work, ensuring communication is standardized across different devices and vendors.
  2. Four Layers of the TCP/IP Model:
    • Application Layer: Handles communication between applications (e.g., web browsing, email).
    • Transport Layer: Ensures data is sent reliably or quickly and directs it to the appropriate application using port numbers.
    • Internet Layer: Routes data across networks using IP addresses.
    • Network Access Layer: Transmits data over physical media using MAC addresses.

For more information about TCP IP Model :

https://www.cisco.com/c/en/us/support/docs/ip/routing-information-protocol-rip/13769-5.html