Complete Distribution of the TCP/IP Protocol Suite in the OSI Model — Understanding Network Protocols at a Glance
Network communication is the cornerstone of modern information technology, and understanding how network protocols work is crucial for every developer and system administrator. This article uses the OSI model framework to provide a detailed introduction to the distribution and roles of each protocol in the TCP/IP protocol suite within the network layer hierarchy.
What is the OSI Model?
The OSI (Open Systems Interconnection) model is a conceptual network model that divides the network communication process into seven layers. Although this model is less popular in practice than the TCP/IP model, it is very helpful for understanding how network protocols work.
The OSI seven-layer model includes:
- Physical Layer: Transmits raw bit streams
- Data Link Layer: Provides reliable communication between nodes
- Network Layer: Responsible for routing and forwarding
- Transport Layer: Provides end-to-end communication
- Session Layer: Manages session connections
- Presentation Layer: Data format conversion and encryption
- Application Layer: User interface and application protocols
What is the TCP/IP Protocol Suite?
The TCP/IP (Transmission Control Protocol/Internet Protocol) protocol suite is the foundational protocol collection of the Internet. It is more concise and practical than the OSI model. The TCP/IP protocol suite is typically divided into four layers:
- Application Layer
- Transport Layer
- Network Layer
- Network Interface Layer
Distribution of the TCP/IP Protocol Suite in the OSI Model
Below is the complete distribution diagram of each protocol in the TCP/IP protocol suite across the OSI model:
flowchart TD
classDef app fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef pres fill:#e8f5e9,stroke:#4caf50,stroke-width:2px
classDef sess fill:#fff3e0,stroke:#ff9800,stroke-width:2px
classDef trans fill:#f3e5f5,stroke:#9c27b0,stroke-width:2px
classDef net fill:#fce4ec,stroke:#e91e63,stroke-width:2px
classDef data fill:#ffebee,stroke:#f44336,stroke-width:2px
classDef phys fill:#efebe9,stroke:#795548,stroke-width:2px
subgraph "Application Layer"
A1@{ shape: rounded, label: "HTTP" }:::app
A2@{ shape: rounded, label: "FTP" }:::app
A3@{ shape: rounded, label: "SMTP" }:::app
A4@{ shape: rounded, label: "TELNET" }:::app
A5@{ shape: rounded, label: "POP3" }:::app
A6@{ shape: rounded, label: "IMAP4" }:::app
A7@{ shape: rounded, label: "DNS" }:::app
A8@{ shape: rounded, label: "DHCP" }:::app
A9@{ shape: rounded, label: "NFS" }:::app
A10@{ shape: rounded, label: "SNMP" }:::app
end
subgraph "Presentation Layer"
B1@{ shape: rounded, label: "SSL/TLS" }:::pres
B2@{ shape: rounded, label: "LDAP" }:::pres
B3@{ shape: rounded, label: "RPC" }:::pres
end
subgraph "Session Layer"
C1@{ shape: rounded, label: "RPC" }:::sess
C2@{ shape: rounded, label: "NetBIOS" }:::sess
C3@{ shape: rounded, label: "SMB" }:::sess
end
subgraph "Transport Layer"
D1@{ shape: rounded, label: "TCP Transmission Control Protocol" }:::trans
D2@{ shape: rounded, label: "UDP User Datagram Protocol" }:::trans
end
subgraph "Network Layer"
E1@{ shape: rounded, label: "IP" }:::net
E2@{ shape: rounded, label: "ICMP" }:::net
E3@{ shape: rounded, label: "IGMP" }:::net
E4@{ shape: rounded, label: "OSPF" }:::net
E5@{ shape: rounded, label: "RIP" }:::net
E6@{ shape: rounded, label: "BGP" }:::net
E7@{ shape: rounded, label: "ARP" }:::net
end
subgraph "Data Link Layer"
F1@{ shape: rounded, label: "Ethernet" }:::data
F2@{ shape: rounded, label: "PPP" }:::data
F3@{ shape: rounded, label: "HDLC" }:::data
F4@{ shape: rounded, label: "Frame Relay" }:::data
F5@{ shape: rounded, label: "ATM" }:::data
end
subgraph "Physical Layer"
G1@{ shape: rounded, label: "IEEE 802.3" }:::phys
G2@{ shape: rounded, label: "RS-232" }:::phys
G3@{ shape: rounded, label: "V.35" }:::phys
G4@{ shape: rounded, label: "RJ-45" }:::phys
endDetailed Protocol Descriptions by Layer
Application Layer Protocols
The application layer is the highest layer of the OSI model, directly serving user applications. The following are the major protocols:
HTTP/HTTPS (Hypertext Transfer Protocol)
- Purpose: Communication between web browsers and servers
- Port: 80 (HTTP), 443 (HTTPS)
- Characteristics: Request-response based, stateless protocol
FTP (File Transfer Protocol)
- Purpose: Transferring files between client and server
- Port: 20 (data), 21 (control)
- Characteristics: Supports file upload, download, and deletion
SMTP (Simple Mail Transfer Protocol)
- Purpose: Sending email
- Port: 25
- Characteristics: Dedicated to mail transport, typically used in conjunction with POP3/IMAP4
TELNET (Teletype Network)
- Purpose: Remote login service
- Port: 23
- Characteristics: Unencrypted remote connection protocol
POP3 (Post Office Protocol 3)
- Purpose: Receiving email from a mail server
- Port: 110
- Characteristics: After the client downloads emails from the server, emails are typically deleted
IMAP4 (Internet Message Access Protocol 4)
- Purpose: Accessing and managing email on a mail server
- Port: 143
- Characteristics: Supports managing email on the server without necessarily downloading locally
DNS (Domain Name System)
- Purpose: Resolving domain names to IP addresses
- Port: 53
- Characteristics: Distributed naming system, foundational infrastructure of the Internet
DHCP (Dynamic Host Configuration Protocol)
- Purpose: Automatically assigning IP addresses to network devices
- Port: 67 (server), 68 (client)
- Characteristics: Simplifies network management, supports dynamic IP address allocation
NFS (Network File System)
- Purpose: Sharing file systems over a network
- Port: 2049
- Characteristics: Allows users to access remote files as if they were local
SNMP (Simple Network Management Protocol)
- Purpose: Network device management and monitoring
- Port: 161 (manager), 162 (agent)
- Characteristics: Used for collecting and configuring network device information
Presentation Layer Protocols
The presentation layer is responsible for data format conversion, encryption, and compression.
SSL/TLS (Secure Sockets Layer/Transport Layer Security)
- Purpose: Provides secure communication channels
- Characteristics: Supports data encryption, authentication, and data integrity protection
- Applications: HTTPS, SMTPS, IMAPS and other secure protocols
LDAP (Lightweight Directory Access Protocol)
- Purpose: Accessing and maintaining directory services
- Port: 389 (plaintext), 636 (encrypted)
- Characteristics: Used for user authentication, address lookup, and other services
RPC (Remote Procedure Call)
- Purpose: Allows programs to call procedures on other computers
- Characteristics: Transparent remote procedure calls that hide network communication details
Session Layer Protocols
The session layer is responsible for establishing, managing, and terminating session connections.
RPC (Remote Procedure Call)
- Purpose: Provides remote procedure call services at the session layer
- Characteristics: Manages session state for remote calls
NetBIOS (Network Basic Input/Output System)
- Purpose: Provides network name services and session services
- Port: 137-139
- Characteristics: Primarily used in early Windows network environments
SMB (Server Message Block)
- Purpose: Sharing files, printers, and serial ports between computers
- Port: 445
- Characteristics: Modern versions of SMB support encryption and authentication
Transport Layer Protocols
The transport layer provides end-to-end communication services, ensuring reliable data transmission.
TCP (Transmission Control Protocol)
- Purpose: Provides reliable, connection-oriented data transmission
- Characteristics:
- Connection-oriented communication
- Packet ordering and acknowledgment
- Flow control and congestion control
- Reliable data transmission
TCP Connection Establishment (Three-way Handshake):
- Client sends SYN packet
- Server sends SYN-ACK packet
- Client sends ACK packet
TCP Connection Termination (Four-way Handshake):
- Client sends FIN packet
- Server sends ACK packet
- Server sends FIN packet
- Client sends ACK packet
UDP (User Datagram Protocol)
- Purpose: Provides unreliable, connectionless data transmission
- Characteristics:
- Connectionless communication
- No guarantee of packet order or reliability
- Low overhead, high transmission efficiency
- Suitable for real-time applications
TCP vs UDP Comparison:
| Feature | TCP | UDP |
|---|---|---|
| Connection | Connection-oriented | Connectionless |
| Reliability | Reliable transmission | Unreliable transmission |
| Ordering | Guaranteed order | No order guarantee |
| Speed | Slower | Faster |
| Overhead | Higher | Lower |
| Use Cases | File transfer, web browsing | Real-time video, online gaming |
Network Layer Protocols
The network layer is responsible for packet routing and forwarding, serving as the core layer of the entire network.
IP (Internet Protocol)
- Purpose: Transmits packets across networks
- Characteristics:
- Connectionless transmission service
- Provides logical addressing (IP addresses)
- Responsible for packet routing decisions
- Supports IPv4 and IPv6
IP Packet Structure:
- Version
- Header length
- Type of service
- Total length
- Identification
- Flags and fragment offset
- TTL (Time to Live)
- Protocol number
- Header checksum
- Source IP address
- Destination IP address
ICMP (Internet Control Message Protocol)
- Purpose: Provides feedback about network conditions
- Characteristics:
- Used for network diagnostics and error reporting
- Supports the ping command
- Supports path discovery
Common ICMP Message Types:
- Echo Request/Reply (ping)
- Destination Unreachable
- Time Exceeded
- Parameter Problem
IGMP (Internet Group Management Protocol)
- Purpose: Manages multicast group membership
- Characteristics:
- Used for IP multicast
- Manages multicast routers
- Controls multicast group members
OSPF (Open Shortest Path First)
- Purpose: Interior gateway routing protocol
- Characteristics:
- Based on Dijkstra’s algorithm
- Supports area partitioning
- Fast convergence
- Loop-free routing
RIP (Routing Information Protocol)
- Purpose: Distance-vector routing protocol
- Characteristics:
- Simple and easy to use
- Uses hop count as metric
- Maximum hop count of 15
- Slower convergence
BGP (Border Gateway Protocol)
- Purpose: Exterior gateway routing protocol
- Characteristics:
- Rich routing policies
- Supports large-scale networks
- Path-vector based
- Core protocol of the Internet
ARP (Address Resolution Protocol)
- Purpose: Resolves IP addresses to MAC addresses
- Characteristics:
- Operates at the data link layer
- Uses broadcast messages
- Builds and maintains ARP cache tables
Data Link Layer Protocols
The data link layer is responsible for providing reliable data transmission over physical networks.
Ethernet
- Purpose: LAN communication standard
- Characteristics:
- Uses CSMA/CD protocol
- Supports multiple transmission rates
- Widely used in local area networks
PPP (Point-to-Point Protocol)
- Purpose: Point-to-point communication protocol
- Characteristics:
- Used for serial connections
- Supports multiple network layer protocols
- Provides authentication
HDLC (High-Level Data Link Control)
- Purpose: Bit-oriented data link layer protocol
- Characteristics:
- Suitable for wide area networks
- Supports full-duplex communication
- Provides frame synchronization
Frame Relay
- Purpose: Packet-switched WAN technology
- Characteristics:
- Based on virtual circuits
- Efficient data transmission
- Simplified network management
ATM (Asynchronous Transfer Mode)
- Purpose: High-speed data transmission technology
- Characteristics:
- Uses fixed-length cells
- Supports multiple service types
- Suitable for multimedia transmission
Physical Layer Protocols
The physical layer is responsible for transmitting raw bit streams and is the lowest layer of network communication.
IEEE 802.3
- Purpose: Ethernet physical layer standard
- Characteristics:
- Defines physical layer specifications
- Supports multiple transmission media
- Includes twisted pair, fiber optic, etc.
RS-232
- Purpose: Serial communication standard
- Characteristics:
- Supports point-to-point connections
- Asynchronous communication
- Widely used for device connections
V.35
- Purpose: Broadband data transmission interface standard
- Characteristics:
- Supports high-speed data transmission
- Primarily used for WAN connections
- Standardized interface specification
RJ-45
- Purpose: Network connector standard
- Characteristics:
- 8-pin connector
- Used for Ethernet connections
- Supports twisted pair connections
Protocol Communication Examples
Web Access Process
How do protocols at each layer work together when you visit a website?
- Application Layer: Browser initiates an HTTP request
- Presentation Layer: If using HTTPS, SSL/TLS encrypts the data
- Session Layer: Establishes and manages session connections
- Transport Layer: TCP protocol ensures reliable data transmission
- Network Layer: IP protocol handles packet routing and forwarding
- Data Link Layer: Ethernet protocol transmits data within the LAN
- Physical Layer: Transmits bit streams through physical media
Email Sending Process
When sending an email:
- Application Layer: MUA (Mail User Agent) sends email via SMTP
- Transport Layer: TCP ensures reliable transmission of email data
- Network Layer: IP protocol routes email data to the target server
- Data Link Layer: Transmits data packets across the network
- Physical Layer: Transmits data through the physical network
Common Network Troubleshooting
Using the ping Command
| |
traceroute Path Tracing
| |
netstat Network Status
| |
tcpdump Packet Analysis
| |
Network Security Considerations
Firewall Configuration
| |
SSL/TLS Configuration
| |
Summary
Through this article, we have gained a detailed understanding of the complete distribution of the TCP/IP protocol suite within the OSI model. Understanding the protocols at each layer and their roles is crucial for network troubleshooting, performance optimization, and security management.
Key Takeaways:
- The OSI Model provides a conceptual framework for network communication, helping to understand the functions and responsibilities of each layer
- The TCP/IP Protocol Suite is the practically applied protocol collection, more practical than the OSI model
- Protocol layering makes network design more modular, facilitating development and maintenance
- Protocols at each layer have clear responsibilities and collaborate to accomplish network communication
- In practice, appropriate protocols and technologies need to be selected based on specific requirements
With the rapid development of cloud computing, IoT, and 5G technologies, network protocols continue to evolve. A deep understanding of how network protocols work will help us better address future technical challenges and build more secure and efficient network infrastructure.
Whether you are a developer, system administrator, or network engineer, mastering network protocol knowledge is an essential skill. We hope this article helps you build a solid foundation in networking theory and provides strong support for your career development.