Tcpipmodel

11 min read2,077 words

TCP/IP Model

The TCP/IP Model is a networking framework that describes how devices communicate over networks, including the Internet.

TCP/IP stands for:

Transmission Control Protocol / Internet Protocol

Unlike the OSI model, which has 7 layers, the commonly taught TCP/IP model has 4 layers.

┌──────────────────────────────┐ │ 4. Application │ ├──────────────────────────────┤ │ 3. Transport │ ├──────────────────────────────┤ │ 2. Internet │ ├──────────────────────────────┤ │ 1. Network Access │ └──────────────────────────────┘

1. Why Was the TCP/IP Model Created?

The TCP/IP architecture was developed to enable communication between different types of computers and networks.

Its major goal is interoperability.

For example:

Computer ↓ Router ↓ Internet ↓ Server

The devices can be made by different manufacturers and use different hardware, but they can still communicate because they follow common protocols.

The TCP/IP protocol suite became the foundation of the modern Internet.

2. Four Layers of TCP/IP

LayerNameMain Function
4ApplicationProvides network services to applications
3TransportEnd-to-end communication
2InternetIP addressing and routing
1Network AccessLocal network and physical transmission

A simple memory:

Application → Transport → Internet → Network Access

Layer 4 — Application Layer

The Application Layer is the top layer of the TCP/IP model.

It provides protocols and services used by network applications.

Examples:

HTTP HTTPS DNS FTP SMTP SSH DHCP

Unlike the OSI model, TCP/IP combines the functions of:

OSI Layer 7 → Application OSI Layer 6 → Presentation OSI Layer 5 → Session

into its Application Layer.

What Does the Application Layer Do?

It provides communication services to applications.

For example, when you open a website:

Browser ↓ HTTPS ↓ TCP ↓ IP ↓ Ethernet/Wi-Fi

The browser uses application-layer protocols to communicate with the web server.

Common Application Layer Protocols

HTTP

Used for web communication.

Browser → Web Server

Example:

GET /index.html

HTTPS

Secure version of HTTP using TLS.

Browser ↓ HTTPS ↓ Web Server

DNS

Converts domain names into IP addresses.

example.com ↓ DNS ↓ 93.184.216.34

FTP

Used for file transfer.

Client ↓ FTP ↓ FTP Server

SMTP

Used for sending email.

Email Client ↓ SMTP ↓ Mail Server

SSH

Used for secure remote access.

Your Computer ↓ SSH ↓ Remote Server

Layer 3 — Transport Layer

The Transport Layer provides end-to-end communication between applications/processes.

The two major transport protocols are:

TCP UDP

TCP — Transmission Control Protocol

TCP is:

  • Connection-oriented
  • Reliable
  • Ordered
  • Full-duplex
  • Based on acknowledgments and retransmissions

A simplified TCP connection:

Client Server │──── SYN ──────────>│ │<── SYN + ACK ──────│ │──── ACK ──────────>│ │ │ │<── Data ──────────>│

This initial process is called the TCP three-way handshake.

TCP Reliability

Suppose the sender sends:

Packet 1 Packet 2 Packet 3

If Packet 2 is lost:

Packet 1 ──────────> ✓ Packet 2 ──────────> ✗ Packet 3 ──────────> ✓

TCP can detect the missing data and retransmit it.

Packet 2 ↓ Retransmission ↓ Receiver

This is one reason TCP is useful when reliable delivery matters.

UDP — User Datagram Protocol

UDP is much simpler than TCP.

It is:

  • Connectionless
  • Low overhead
  • Faster in many situations
  • No built-in guarantee of delivery
  • No built-in guarantee of ordering

Example:

Application ↓ UDP ↓ IP

UDP is commonly used where low overhead and timeliness are important.

Examples include:

  • DNS queries
  • Real-time communication
  • Streaming
  • Online gaming
  • QUIC transport

TCP vs UDP

FeatureTCPUDP
ConnectionConnection-orientedConnectionless
ReliabilityYesNo built-in guarantee
OrderingYesNo built-in guarantee
RetransmissionYesNo
AcknowledgmentYesNo
OverheadHigherLower
Speed/latencyGenerally more overheadGenerally lower overhead
ExampleHTTPS, SSHDNS, real-time applications

Port Numbers

The Transport Layer uses port numbers to identify application/service endpoints.

Example:

IP Address: 192.168.1.10 Port: 443

Common ports:

PortProtocol/Service
20/21FTP
22SSH
23Telnet
25SMTP
53DNS
80HTTP
110POP3
143IMAP
443HTTPS
3389RDP

The exact transport protocol matters too. For example:

TCP 443

is commonly used for HTTPS.

Layer 2 — Internet Layer

The Internet Layer is responsible primarily for:

  • Logical addressing
  • Routing
  • Packet forwarding
  • Inter-network communication

The most important protocol is:

IP — Internet Protocol

IP

IP provides addressing so that packets can travel between networks.

There are two major versions:

IPv4 IPv6

IPv4

Example:

192.168.1.10

IPv4 uses 32-bit addresses.

Conceptually:

11000000.10101000.00000001.00001010

IPv6

Example:

2001:db8::10

IPv6 uses 128-bit addresses.

Routing

Suppose:

PC A 192.168.1.10 │ ↓ Router │ ↓ Internet │ ↓ Server 203.0.113.10

The Internet Layer is responsible for IP-based routing between networks.

Routers examine destination IP information and choose where to forward packets.

Other Internet-Layer Protocols

Examples include:

  • IPv4
  • IPv6
  • ICMP
  • IPsec

ICMP

ICMP is used for network control and diagnostic messages.

For example:

ping 8.8.8.8

uses ICMP Echo messages when using traditional ICMP-based ping.

Layer 1 — Network Access Layer

The Network Access Layer is responsible for communication over the local network and the physical transmission medium.

It broadly combines the responsibilities of:

OSI Layer 2 → Data Link OSI Layer 1 → Physical

Examples include:

  • Ethernet
  • Wi-Fi
  • ARP-related local network functions
  • Network interface hardware
  • Physical media

Ethernet

Ethernet is commonly used in wired local networks.

Example:

PC │ │ Ethernet cable ↓ Switch │ ↓ Router

Ethernet uses frames and MAC addresses at the local network level.

Wi-Fi

Wi-Fi provides wireless network connectivity.

Laptop ))) ((( Wi-Fi ↓ Access Point ↓ Router

Wi-Fi uses MAC addressing and wireless frames for local communication.

MAC Address

Example:

A4:5E:60:12:AB:91

A MAC address identifies a network interface at the local network/link level.

TCP/IP Encapsulation

One of the most important concepts is encapsulation.

Suppose an application wants to send:

Hello

The data moves down through the TCP/IP layers.

Step 1 — Application Layer

The application creates data:

Hello

Step 2 — Transport Layer

TCP adds its header:

TCP Header + Hello

Now this is a TCP segment.

Step 3 — Internet Layer

IP adds an IP header:

IP Header + TCP Header + Hello

Now we have an IP packet.

Step 4 — Network Access Layer

Ethernet/Wi-Fi adds link-layer information:

Ethernet Header + IP Header + TCP Header + Hello + Ethernet Trailer

This forms a frame.

Step 5 — Physical Transmission

The frame is transmitted over the medium as physical signals/bits.

Frame ↓ Bits/signals ↓ Cable / Fiber / Radio

Complete Encapsulation

Application │ │ Data ↓ Transport │ │ Segment ↓ Internet │ │ Packet ↓ Network Access │ │ Frame ↓ Physical medium │ │ Bits/signals ↓ Network

A simplified chain:

Data ↓ Segment ↓ Packet ↓ Frame ↓ Bits

Decapsulation

At the receiving computer, the reverse happens.

Bits ↓ Frame ↓ Packet ↓ Segment ↓ Data

The receiver processes the information at each layer.

Network Access ↓ Internet ↓ Transport ↓ Application

Example: Opening a Website

Suppose you visit:

https://example.com

The communication can be simplified as:

Browser │ │ HTTPS ↓ Transport │ │ TCP ↓ Internet │ │ IP ↓ Network Access │ │ Ethernet/Wi-Fi ↓ Internet │ ↓ Web Server

At the server, the process is reversed.

TCP/IP Addressing

Different layers use different identifiers.

Application ↓ Transport → Port ↓ Internet → IP Address ↓ Network Access → MAC Address

Example:

MAC: AA:BB:CC:DD:EE:FF IP: 192.168.1.10 Port: 443

They serve different purposes.

MAC

Used primarily for local link communication.

IP

Used for logical addressing and routing between networks.

Port

Identifies an application/service endpoint.

TCP/IP Model vs OSI Model

This is a very important exam question.

OSI ModelTCP/IP Model
7 layers4 layers commonly
Developed by ISODeveloped from the TCP/IP protocol architecture
More theoretical/reference-orientedPractical and Internet-oriented
Application, Presentation, Session separateCombined into Application
Data Link and Physical separateCombined into Network Access
Protocol-independent conceptual modelBuilt around Internet protocols

Layer Mapping

OSI MODEL TCP/IP MODEL 7 Application ───────┐ 6 Presentation ──────┼──→ Application 5 Session ───────────┘ 4 Transport ───────────→ Transport 3 Network ─────────────→ Internet 2 Data Link ─────────┐ 1 Physical ──────────┴──→ Network Access

This is one of the easiest ways to remember the relationship.

OSI vs TCP/IP Example

When sending an HTTPS request:

OSI view

Application Presentation Session Transport Network Data Link Physical

TCP/IP view

Application Transport Internet Network Access

The TCP/IP model groups several OSI layers together.

Devices and TCP/IP Layers

A simplified mapping:

Application │ ├── Proxy ├── Application Gateway └── Server Transport │ └── TCP / UDP Internet │ └── Router Network Access │ ├── Switch ├── Network Interface └── Wi-Fi Access Point

Remember that modern network devices can operate across multiple layers.

TCP/IP Model in Real Communication

Consider:

Laptop 192.168.1.10 │ │ Wi-Fi ↓ Access Point │ ↓ Router │ ↓ Internet │ ↓ Web Server

Your browser sends an HTTPS request.

Application

HTTPS

Transport

TCP Destination Port: 443

Internet

IP Source IP → Destination IP

Network Access

Wi-Fi/Ethernet Source MAC → Destination MAC

So the communication stack looks like:

HTTPS ↓ TCP ↓ IP ↓ Ethernet/Wi-Fi

This is the fundamental idea behind Internet communication.

Important Protocols by Layer

TCP/IP LayerImportant Protocols/Technologies
ApplicationHTTP, HTTPS, DNS, DHCP, FTP, SMTP, IMAP, SSH
TransportTCP, UDP
InternetIPv4, IPv6, ICMP, IPsec
Network AccessEthernet, Wi-Fi

Some protocols can span or interact across layers, so this table is a practical classification rather than a strict rule.

Troubleshooting Using TCP/IP Layers

The TCP/IP model can also help troubleshoot network problems.

Network Access

Check:

Cable Wi-Fi NIC Switch

Internet

Check:

IP address Subnet Gateway Routing

Transport

Check:

TCP/UDP Ports Firewall

Application

Check:

DNS HTTP/HTTPS Application configuration Server availability

For example:

Can I connect to Wi-Fi? ↓ Do I have an IP? ↓ Can I reach the gateway? ↓ Can I reach the destination? ↓ Is the required port open? ↓ Is the application working?

TCP/IP Model — Complete Revision

┌──────────────────────────────────┐ │ 4. APPLICATION │ │ HTTP HTTPS DNS FTP SSH SMTP DHCP │ ├──────────────────────────────────┤ │ 3. TRANSPORT │ │ TCP UDP │ ├──────────────────────────────────┤ │ 2. INTERNET │ │ IPv4 IPv6 ICMP IPsec │ ├──────────────────────────────────┤ │ 1. NETWORK ACCESS │ │ Ethernet Wi-Fi Hardware │ └──────────────────────────────────┘

Remember:

Application → What service? Transport → How should data be delivered? Internet → Where should the packet go? Network → How is it transmitted locally?

Data units

Application → Data Transport → Segment / Datagram Internet → Packet Network Access → Frame Physical → Bits/signals

Addresses

Transport → Port Internet → IP Network Access → MAC

Exam-ready definition:

The TCP/IP model is a four-layer networking model that describes how data is communicated across interconnected networks. Its layers are Application, Transport, Internet, and Network Access, and it forms the conceptual foundation of communication on the modern Internet.

Keep learning. Keep building. Keep growing.

© 2026 Ugenz Academy