The OSI Model
Categories:
“Man is something that shall be overcome. What have you done to overcome him?” (Thus Spoke Zarathustra, Nietzsche)
Layers of the OSI Model
The Open Systems Interconnection (OSI) reference model is a conceptual framework that divides network operations into seven layers:
Application Layer:
- Provides network services directly to end-user applications, how?
- User interface
- Specific rules (protocols) for different apps
- Data semantics
- Provides network services directly to end-user applications, how?
Presentation Layer:
- Ensures data sent by one application can be correctly interpreted by another1, and also ensures secure2, and efficient communication3:
- Data format conversion
- Data encryption/decryption
- Data compression
- Ensures data sent by one application can be correctly interpreted by another1, and also ensures secure2, and efficient communication3:
Session Layer:
- Manages and controls connections (ie, sessions) between applications
Transport Layer:
- Provides end-to-end error recovery mechanisms
- TCP (Transmission Control Protocol) for accurate communication
- UDP (User Datagram Protocol) for fast communication
- Provides end-to-end error recovery mechanisms
Network Layer:
- Establishes communications across different networks
- Logical addressing: assigns unique IP addresses to devices
- Routing: finds the best path for data to travel between source and destination
- Establishes communications across different networks
Data Link Layer:
- Ensures reliable data transfer between devices within the same network (LAN)
- Has two sublayers:
- Logical Link Control (LLC)
- Media Access Control (MAC)
Physical Layer:
- Defines how data is transmitted as:
- Electrical signals over copper cables
- Optical signals over fiber
- Radio signals over radio waves
- Defines how data is transmitted as:
Among the seven layers, Ethernet covers Media Access Control (MAC) from Data Link Layer (Layer 2) and Physical Layer (Layer 1). To better understand the networking functions of each layer and the role of Ethernet in the process, see the next section for an example.
Note
The OSI model is only a framework, not an architecture or blueprint for network design. However, the OSI model provides a common organizational scheme for network standardization.Example Scenario
Here is a step-by-step breakdown of the process of an example scenario, where a user types www.example.com
in a web browser and presses “Enter”, attempting to fetch the webpage from the remote server:
Application Layer (Layer 7)
The user browser generates an HTTP/HTTPS GET request for
www.example.com
, during which a DNS (Domain Name System) server is used to resolvewww.example.com
to an IP address, such as an IPv4 address of192.168.1.1
.Presentation Layer (Layer 6)
Before transmission, encrypt the request with TLS (Transport Layer Security) if the sites uses HTTPS, and the data is compressed.
Session Layer (Layer 5)
A session is established between the user browser and the server, to handle authentication (such as login credentials, if applicable), maintain the communication flow, and manage persistent connections for subsequent interactions.
Transport Layer (Layer 4)
TCP (Transmission Control Protocol) is used in this case for connection-oriented, reliable delivery. Data is broken into segments (TCP Header + payload) for transmission.
Network Layer (Layer 3)
The segments are further packed into IP packets (IP Header + payload). Routing is based on IP addresses, which are obtained by querying a DNS (Domain Name System) server.
Data Link Layer (Layer 2)
The IP packet is wrapped inside an Ethernet frame (MAC Header + payload + Trailer), which adds the source and destination MAC addresses, to be transmitted between devices on the same local network. The Ethernet frame is sent from the user computer to the router.
Note
If the user is using WI-FI instead of wired Ethernet, the IP packet is wrapped inside Wi-Fi frames, which will then be converted into radio signals in the Physical Layer.Physical Layer (Layer 1)
Ethernet frames are converted into bits (0s and 1s) and transmitted via electrical signals (over copper) or light pulses (fiber).
On the server side:
→ Converts the bitstream into structured Ethernet frames.
→ Checks the destination MAC address and validates the frame’s integrity.
→ Strips the Ethernet header/trailer and reads the IP packet.
→ Verifies the IP address and passes the TCP segment to the Transport Layer.
→ Checks for errors and passes the reassembled data stream to the Application Layer.
→ Processes the HTTP request and fetches the requested resource (in this case, it is the web page).
→ Sends back an HTTP response, which is broken into TCP segments → Encapsulated into IP packets → Wrapped in new Ethernet frames → Transmitted as bits back to the client.
The Role of Ethernet
From the above example, we can identify the role of Ethernet in the following aspects:
- Local Communication: Ethernet handles data transfer between devices on the same network (in this example, the user’s computer and the router).
- MAC Addressing: Ethernet uses MAC addresses to uniquely identify devices on a local network, ensuring frames reach the correct device on the LAN.
- Error Detection: The Frame Check Sequence (FCS) in Ethernet frames verifies data integrity.
Feedback
Was this page helpful?
Glad to hear it!!!
Sorry to hear that. Please tell me how I can improve.