OSI Model - Open Systems Interconnection
The OSI Model (Open Systems Interconnection) is a conceptual reference framework that describes how data is transmitted across a network, dividing the process into 7 distinct layers.
What is the OSI Model?
The OSI Model is an international standard developed by ISO (International Organization for Standardization) that defines a conceptual framework for network communication. Each layer has specific responsibilities and communicates with adjacent layers.
The 7 Layers of the OSI Model
Layer 7: Application (Application Layer)
Function: Interface between user and network
Characteristics:
- Services: Network services for applications
- Protocols: HTTP, FTP, SMTP, DNS, Telnet
- Functions: Authentication, compression, encryption
- Examples: Web browsers, email clients
Data: APDU (Application Protocol Data Unit)
Layer 6: Presentation (Presentation Layer)
Function: Data format and conversion
Characteristics:
- Encoding: ASCII, Unicode, EBCDIC
- Compression: Data size reduction
- Encryption: Data security
- Conversion: Data format between systems
Data: PPDU (Presentation Protocol Data Unit)
Layer 5: Session (Session Layer)
Function: Session control between applications
Characteristics:
- Establishment: Session creation
- Maintenance: Active session management
- Termination: Session closure
- Synchronization: Checkpoints
Data: SPDU (Session Protocol Data Unit)
Layer 4: Transport (Transport Layer)
Function: Reliable data transfer
Characteristics:
- Segmentation: Data division into segments
- Flow control: Traffic management
- Error control: Detection and correction
- Multiplexing: Multiple connections
Protocols: TCP, UDP, SCTP Data: Segments (TCP) / Datagrams (UDP)
Layer 3: Network (Network Layer)
Function: Routing and logical addressing
Characteristics:
- Routing: Route determination
- Addressing: IP addresses
- Fragmentation: Packet division
- Congestion control: Traffic management
Protocols: IP, ICMP, OSPF, BGP Data: Packets
Layer 2: Data Link (Data Link Layer)
Function: Reliable transfer between adjacent nodes
Characteristics:
- Physical addressing: MAC addresses
- Error detection: CRC, checksums
- Access control: CSMA/CD, Token Ring
- Synchronization: Data frames
Protocols: Ethernet, PPP, HDLC Data: Frames
Layer 1: Physical (Physical Layer)
Function: Bit transmission through medium
Characteristics:
- Electrical signals: Voltages, currents
- Physical media: Cables, fiber optic, wireless
- Encoding: Bit representation
- Synchronization: Transmission clocks
Protocols: Ethernet, WiFi, Bluetooth Data: Bits
OSI vs TCP/IP Comparison
OSI Model (7 layers)
TCP/IP Model (4 layers)
Data Flow in OSI
Encapsulation (Sending)
Decapsulation (Receiving)
Protocols by Layer
Application Layer
- HTTP/HTTPS: Web browsing
- FTP: File transfer
- SMTP: Email
- DNS: Name resolution
- Telnet: Remote terminal
- SSH: Secure terminal
Presentation Layer
- SSL/TLS: Encryption and authentication
- JPEG, PNG: Image compression
- MPEG: Video compression
- ASCII, Unicode: Text encoding
Session Layer
- NetBIOS: Network sessions
- RPC: Remote procedure calls
- SQL: Database sessions
- PPTP: VPN tunnels
Transport Layer
- TCP: Reliable transfer
- UDP: Fast transfer
- SCTP: Multiple stream transfer
- DCCP: Congested data transfer
Network Layer
- IP: Internet Protocol
- ICMP: Control messages
- OSPF: Internal routing
- BGP: External routing
- RIP: Routing information protocol
Link Layer
- Ethernet: Local networks
- PPP: Point-to-point connections
- HDLC: Data link control
- Frame Relay: WAN networks
- ATM: Asynchronous transfer mode
Physical Layer
- Ethernet: Copper cabling
- WiFi: Wireless networks
- Bluetooth: Short-range connections
- Fiber optic: Optical transmission
- DSL: Telephone lines
OSI Model Advantages
β
Modularity: Each layer has specific responsibilities
β
Standardization: Facilitates interoperability
β
Troubleshooting: Facilitates problem diagnosis
β
Development: Allows independent development by layers
β
Scalability: Easy to add new technologies
OSI Model Disadvantages
β Complexity: More complex than TCP/IP
β Implementation: Not fully implemented
β Overhead: More overhead than TCP/IP
β Flexibility: Less flexible than TCP/IP
Practical Use Cases
1. Network Problem Diagnosis
2. Network Design
3. Security by Layers
Analysis Tools by Layer
Application Layer
- Wireshark: Protocol analysis
- tcpdump: Packet capture
- netstat: Network connections
- ss: Socket information
Network Layer
- ping: Connectivity test
- traceroute: Packet route
- ip: Network configuration
- route: Routing tables
Link Layer
- arp: ARP table
- ifconfig: Network interfaces
- ethtool: Ethernet information
- iwconfig: Wireless interfaces
Related Concepts
- Network Protocols - Protocols by layer
- Networking - General network concepts
- Topology - Network design by layers
- IP Addresses - Layer 3 addressing
- DNS - Application layer service
- TLS/SSL - Presentation layer security
- Firewall - Security by layers
References
- ISO/IEC 7498-1 - OSI Model
- RFC 1122 - Internet Requirements
- Cisco Networking Academy
- CompTIA Network+
Glossary
- Encapsulation: Process of adding headers to data
- Decapsulation: Process of removing headers from data
- PDU: Protocol Data Unit
- SDU: Service Data Unit
- SAP: Service Access Point
- Primitive: Operation between adjacent layers