Lesson
OSI and TCP/IP Models
Learning objective
Relate common network tasks to the OSI and TCP/IP models.
Why layered models exist
Layered models divide networking work into smaller responsibilities. You already know about hosts, network devices, MAC addresses, and IP addresses. The models give those ideas a place on one map.
Imagine sending a short message from a laptop to another host. One part of the system creates the message, another supplies delivery information, and another carries signals across a cable or wireless link. Separating those jobs lets us study one responsibility at a time.
A protocol is an agreed set of communication rules. A model groups responsibilities; it is not itself a protocol. Neither model is a physical stack of seven or four devices. A host's software and network interface work together, and real products can combine responsibilities.
For now, aim to explain each layer's main job rather than memorize every protocol or header field.
The seven OSI layers
OSI means Open Systems Interconnection. Its seven conceptual layers are numbered from Physical (1) to Application (7). The table is shown from the top down, as data is prepared for sending.
| OSI layer | Main job | Simple example |
|---|---|---|
| 7 — Application | Provides network services to applications. | HTTP supplies a web service; DNS supplies name lookup. |
| 6 — Presentation | Handles how data is represented, compressed, or encrypted. | Representing text in a format the receiver can understand. |
| 5 — Session | Organizes the dialogue between applications. | Coordinating an exchange or its checkpoints. |
| 4 — Transport | Supports communication between application processes. | TCP and UDP; ports distinguish application endpoints. |
| 3 — Network | Provides logical addressing and delivery between networks. | IP addresses and a router's network role. |
| 2 — Data Link | Handles frames on a local link. | Ethernet frames, MAC addresses, and a switch's usual role. |
| 1 — Physical | Carries bits using signals. | Electrical signals on copper, light in fiber, or radio. |
The Application layer is not the entire browser or phone app: it describes the network-service responsibility used by that app. Session and Presentation describe useful jobs, but modern Internet software does not always implement them as separate layers.
Devices are useful reminders, not rigid labels. A hub repeats signals; an ordinary Ethernet switch works with frames; a router connects IP networks. A host uses the whole stack, and one physical product can contain several functions.
The TCP/IP model
TCP/IP stands for Transmission Control Protocol / Internet Protocol. The name also refers to the Internet protocol suite, a family of protocols used together. It does not mean every exchange must use TCP: UDP is another transport protocol in that suite.
We use the common four-layer TCP/IP model:
- Application: services and the application's data exchange, such as HTTP or DNS.
- Transport: communication between application processes, using TCP or UDP.
- Internet: IP addressing and delivery across networks.
- Network Access: local-link frames and the signals that carry them.
Network Access is also called the Link layer. Some teaching resources split it into Data Link and Physical to make a five-layer model. That is a different grouping, not a different Internet. This course's comparison uses four TCP/IP layers consistently.
OSI-to-TCP/IP mapping
Read across the diagram to compare responsibilities, rather than comparing layer numbers. OSI has seven layers while this TCP/IP model has four, so their numbers are not interchangeable.
TCP/IP Network Access roughly combines OSI Physical and Data Link. TCP/IP Internet aligns with OSI Network. Transport aligns with Transport. TCP/IP Application groups the OSI Session, Presentation, and Application responsibilities. These are helpful conceptual mappings, not a requirement that every protocol fit perfectly into one box.
Compare the models layer by layer
Read across each mapping to see how the seven conceptual OSI layers fit into the four practical TCP/IP layers. Every card names its role and gives protocol examples.
OSI model — 7 layers
Layer 7
Application
Provides network services to user applications.
Examples: HTTP, DNS, DHCP
Layer 6
Presentation
Represents, encrypts, and compresses application data.
Examples: TLS, UTF-8
Layer 5
Session
Coordinates conversations between applications.
Examples: Session checkpoints, Dialog control
Layer 4
Transport
Delivers data between application processes using ports.
Examples: TCP, UDP, Ports
Layer 3
Network
Addresses packets and moves them between networks.
Examples: IPv4, Routing
Layer 2
Data Link
Delivers frames across one local network link.
Examples: Ethernet, Wi-Fi, MAC addresses
Layer 1
Physical
Carries bits as electrical, optical, or radio signals.
Examples: Copper, Fiber, Radio
How the layers map
TCP/IP Application maps OSI layers 7, 6, and 5.
The TCP/IP Application layer covers the work described by OSI Application, Presentation, and Session layers.
TCP/IP Transport maps OSI layer 4.
Both models use a Transport layer for ports and process-to-process delivery.
TCP/IP Internet maps OSI layer 3.
The TCP/IP Internet layer corresponds to the OSI Network layer and its IP addressing and routing work.
TCP/IP Network Access maps OSI layers 2 and 1.
The TCP/IP Network Access layer combines OSI local-frame delivery and physical signaling.
TCP/IP model — 4 layers
Application
Combines application, representation, and conversation services.
Examples: HTTP, DNS, DHCP, TLS
Transport
Provides process-to-process delivery and port addressing.
Examples: TCP, UDP, Ports
Internet
Provides logical addressing and delivery across networks.
Examples: IPv4, Routing
Network Access
Handles local-link delivery and physical transmission.
Examples: Ethernet, Wi-Fi, MAC addresses, Bits
Encapsulation and layer matching
Encapsulation means adding delivery information around data as it moves down the sender's stack. Decapsulation means examining and removing that information as the receiver passes the data upward.
Think of putting a message inside labeled envelopes. The labels help deliver the message; they do not replace it. In this simplified TCP example, the names change as delivery information is added:
Application data → TCP segment → IP packet → Ethernet frame → bits carried as signals.
A header is delivery information placed before the data it carries. Ethernet also uses information at the end, called a trailer. A protocol data unit (PDU) is simply the name for the unit of data at a particular layer. You do not need to learn detailed header fields yet. With UDP, the transport unit is called a datagram rather than a TCP segment.
The player shows the sender going down the stack and the receiver going up. It is one simplified transfer, not the complete process of opening a website. The top three OSI responsibilities are grouped into the Application step; no separate Session or Presentation header is assumed.
Step 1 of 9
Encapsulation
The browser creates data
The browser prepares the request it wants the server to receive.
- Active OSI layer
- OSI layer 7 — Application
- Active TCP/IP layer
- TCP/IP Application layer
- Current PDU
- Data
- Information added
- HTTP request data
Technical details
At the sender, HTTP produces application data before lower layers add their delivery information.
Visible PDU: Data
- Application data
OSI model — seven-layer stack
- Layer 7: ApplicationActive
- Layer 6: PresentationStandby
- Layer 5: SessionStandby
- Layer 4: TransportStandby
- Layer 3: NetworkStandby
- Layer 2: Data LinkStandby
- Layer 1: PhysicalStandby
TCP/IP model — four-layer stack
- ApplicationActive
- TransportStandby
- InternetStandby
- Network AccessStandby
Use Pause, Next, Previous, and Restart to compare the original application data with the delivery information around it. Watch the active layer and PDU change together. Detailed protocol mechanics belong in the later layer modules.
Now match four familiar examples to their TCP/IP groups. You can retry an answer or move between examples; this practice is not an additional completion requirement.
Match a technology to a layer
Layered models divide networking work into smaller responsibilities. Match each example to its TCP/IP layer, then read how it relates to OSI.
Example 1 of 4: DNS — Looks up a name such as a website name.
Knowledge check
How we will use this map: after Computer Network Basics, the course restructure follows Physical → Data Link → Network → Transport → Application, Session & Presentation. We will start with the signals and build upward. A separate later module will connect those ideas into how hosts communicate.
For this introduction, remember the jobs: signals, local frames, IP delivery, application transport, and the application's exchange. The OSI model separates the upper responsibilities; TCP/IP groups them. Both help you organize the same networking concepts.
References: OSI reference model (ITU-T X.200) and Internet protocol layers (RFC 1122, section 1.1.3).