OSI & TCP/IP

OSI Model (Open Systems Interconnection)

The OSI model is a 7-layer theoretical framework created by the International Organization for Standardization (ISO). It helps standardize the functions of a telecommunication or computing system.

🔢 OSI Layers (from top to bottom):

LayerNameFunction
7ApplicationInterfaces directly with the user (e.g., browsers, email clients)
6PresentationTranslates data formats (encryption, compression, encoding)
5SessionManages sessions/connections between applications
4TransportEnsures reliable delivery (TCP), error detection, and flow control
3NetworkHandles addressing and routing (e.g., IP addresses)
2Data LinkTransfers data between adjacent network nodes (MAC addresses, frames)
1PhysicalTransmits raw bits over a physical medium (cables, radio waves)

🖧 2. TCP/IP Model (Transmission Control Protocol/Internet Protocol)

The TCP/IP model is a more practical, 4-layer model used as the foundation of the modern internet. It maps closely to the OSI model but combines some layers.

🔢 TCP/IP Layers:

LayerEquivalent OSI LayersFunction
4Application (OSI 5-7)Provides network services to applications (HTTP, FTP, SMTP)
3Transport (OSI 4)Ensures end-to-end communication and reliability (TCP/UDP)
2Internet (OSI 3)Routes data packets across networks (IP addressing, routing)
1Network Interface (OSI 1-2)Handles physical transmission and frame formatting

Key Differences

OSI ModelTCP/IP Model
Theoretical, reference modelPractical, implemented model
7 layers4 layers
Protocol-independentBuilt around standard protocols (TCP/IP)
Rarely used in implementationUsed in real-world networking (e.g., internet)