Table of Contents
A Map of the Seven OSI Layers
The OSI model describes networking as seven stacked layers, from the physical wire at the bottom to the user-facing apps at the top. Each layer has a specific role, talks to the layers directly above and below it, and uses its own type of data unit and addressing.
In this chapter you will not dive deeply into any single layer. Instead, you will get a clear big picture of all seven, how they relate to each other, and how data changes as it travels through them.
Key idea: The OSI model has 7 layers. Each layer:
- Provides services to the layer above.
- Uses services from the layer below.
- Has its own functions, protocols, and data unit name.
The seven layers, from top to bottom, are:
- Application
- Presentation
- Session
- Transport
- Network
- Data Link
- Physical
You can remember this order with a phrase like:
"All People Seem To Need Data Processing"
(from top 7 to bottom 1).
You will explore each of these layers in its own chapter later. For now, focus on what each layer does in one or two sentences and how they work together.
Top Three: Application, Presentation, Session
These three layers are closest to the user and to software. They deal with data format, sessions, and application services rather than with actual packets on the wire.
Application Layer (Layer 7)
The Application layer is where network-aware applications interact with the network stack. It does not mean the application program itself, but the protocols that provide services like web browsing, email, or file transfer.
Common activities here are requesting web pages, sending emails, or transferring files. At this layer, data is simply called "data" or "messages" and is organized according to application protocols.
Typical examples include HTTP, HTTPS, FTP, SMTP, and others that you will see in an Application Layer chapter later.
Presentation Layer (Layer 6)
The Presentation layer prepares data for the Application layer or from it. It is responsible for how data is represented, not how it is transported.
This layer deals with data format conversions, character encoding, compression, and encryption and decryption. For example, it can turn data into a standard format that both sides understand, or handle the encryption used by secure web browsing.
At this layer, the data is still seen as a whole message, but in the correct format and representation.
Session Layer (Layer 5)
The Session layer manages and controls the dialogs, or sessions, between two applications. Think of it as the layer that opens, maintains, and closes a logical conversation.
It can set up, coordinate, and terminate communication sessions. It may also provide features such as checkpoints and recovery within a long data exchange, so that if something fails, you do not have to start from the very beginning.
The data here is still application data, but associated with a particular session or conversation.
Middle: Transport Layer
Between the user-facing layers and the network addressing layers sits the Transport layer. It focuses on reliable or unreliable delivery and communication between ports on different hosts.
Transport Layer (Layer 4)
The Transport layer provides end-to-end communication between applications running on different hosts. It deals with splitting large data into smaller pieces, reassembling them, and handling reliability and flow control when needed.
At this layer, the data unit is usually called a segment. Each segment is associated with port numbers, which identify specific applications or services on each host.
Some Transport protocols are connection oriented and provide reliability, while others are connectionless and focus on speed with less overhead. You will cover TCP, UDP, reliability, and port numbers in later Transport chapters.
Key statements for Layer 4:
- Data unit name: segment
- Uses port numbers to distinguish applications
- Provides end-to-end delivery between hosts
Lower Three: Network, Data Link, Physical
These layers are closer to the hardware and to how bits actually move over physical media. They define addressing, frames, and signals.
Network Layer (Layer 3)
The Network layer is responsible for logical addressing and routing. It decides how data moves from one network to another, often across many hops.
At this layer, the data unit is called a packet. Packets carry logical addresses, such as IP addresses, that identify the source and destination hosts across multiple networks.
Routers operate at this layer and make path decisions based on these logical addresses. How they build routing tables and choose paths will appear in later routing and Network layer chapters.
Key statements for Layer 3:
- Data unit name: packet
- Uses logical addresses (for example, IP addresses)
- Responsible for routing between networks
Data Link Layer (Layer 2)
The Data Link layer provides node to node delivery across a single physical network segment. It defines how devices on the same local link address each other and how they frame data for sending.
The data unit at this layer is a frame. Frames carry physical or link layer addresses, such as MAC addresses, that identify devices on the same local network.
Switches operate at this layer, forwarding frames based on these local addresses. The Data Link layer also handles basic error detection on frames and managing who can use the medium at a given time, depending on the specific technology.
Key statements for Layer 2:
- Data unit name: frame
- Uses link layer addresses (for example, MAC addresses)
- Provides node to node delivery on the same local network
Physical Layer (Layer 1)
The Physical layer is about raw transmission of bits over a medium. It defines how bits are encoded, transmitted, and received, and what physical characteristics the links must have.
Here, the data unit is just a stream of bits. The Physical layer defines voltages, light patterns, radio waves, connectors, pinouts, and similar physical details.
Devices such as network interface cards and physical cables, radio transmitters, and fiber optics belong to the Physical layer. You will later see how signals, cabling, and wireless technologies are handled in detail.
Key statements for Layer 1:
- Data unit name: bit
- Concerned with signals and media
- Transmits and receives raw bit streams
Data Unit Names Across Layers
A useful way to remember the layers is to associate each one with the name of its data unit. Although terminology can vary slightly, the typical mapping is:
| Layer | Number | Typical Data Unit Name |
|---|---|---|
| Application | 7 | Data / Message |
| Presentation | 6 | Data / Message |
| Session | 5 | Data / Message |
| Transport | 4 | Segment |
| Network | 3 | Packet |
| Data Link | 2 | Frame |
| Physical | 1 | Bit |
Rule of thumb:
Upper layers (5 to 7) usually treat everything as data.
Layer 4 uses segments, Layer 3 uses packets, Layer 2 uses frames, and Layer 1 uses bits.
You will later see how encapsulation wraps data in headers and trailers as it moves down these layers, and how it is unwrapped as it moves up.
How the Layers Work Together
When data travels from one device to another, it moves logically from Layer 7 down to Layer 1 on the sender, across the physical medium, then from Layer 1 up to Layer 7 on the receiver.
On the sender side, an application creates data. The Presentation and Session layers prepare and manage that data. The Transport layer splits it into segments with port numbers. The Network layer turns each segment into a packet with logical addresses. The Data Link layer wraps packets in frames with local addresses. The Physical layer finally turns frames into bits and puts them on the wire or into the air.
On the receiver side, the reverse process happens. Bits are turned into frames, frames into packets, packets into segments, and finally into application data again.
A crucial pattern appears here. Each layer adds its own header information on the way down and reads its own header on the way up. Each layer cares about its own part and treats everything above as payload.
OSI Layers and Real Protocols
In real networks, protocols and technologies are often associated with specific OSI layers. The OSI model is conceptual, but it helps you sort out what kind of function a protocol provides.
Here is a simple mapping for orientation. You will study these items in later chapters, so do not worry about understanding them fully yet.
| OSI Layer | Example Functions | Example Technologies / Protocols |
|---|---|---|
| 7 Application | User services | HTTP, HTTPS, FTP, SMTP, DNS, SSH |
| 6 Presentation | Encoding, encryption, compression | Data formats, TLS encryption aspects |
| 5 Session | Session setup and teardown | Session management within protocols |
| 4 Transport | End to end transport, reliability | TCP, UDP |
| 3 Network | Logical addressing, routing | IP, ICMP, routing protocols |
| 2 Data Link | Local delivery, framing | Ethernet, Wi Fi MAC, switches |
| 1 Physical | Signals, connectors, media | Copper cables, fiber, Wi Fi radio |
The important point is not to memorize every example, but to recognize that the OSI model gives you a structured way to place each protocol and function.
Why This Overview Matters
This overview of the seven OSI layers gives you a mental grid for everything else in this course. When you later learn about IP addressing, you will know it belongs to Layer 3. When you hear about MAC addresses or switches, you will place them at Layer 2. When you work with HTTP or DNS, you will place them at the top layers.
As you go deeper into each layer in its own chapter, use this seven layer overview as your map. It will help you keep concepts organized and avoid mixing up what belongs where.