Artificial Intelligence, Data Analytics and Cyber Security - Laws and Practice · Network Basics and Security
OSI and TCP/IP Reference Models: Layers and Differences
Updated 11 October 2026 · Fact-checked
The OSI model splits network communication into seven layers: Physical, Data Link, Network, Transport, Session, Presentation and Application. The TCP/IP model groups the same work into four layers: Link, Internet, Transport and Application. To answer, name each layer, state its function, give a protocol example and compare the two models.
Understand OSI and TCP/IP Reference Models
A network moves data between two devices that may use different hardware and software. To keep this manageable, the work is divided into layers. Each layer does one job and talks only to the layer above and below it. A change in one layer does not force a change in the others.
The OSI model (Open Systems Interconnection) was developed by ISO as a theoretical reference model. It has seven layers. Data goes down the layers on the sender's side, each layer adds its own header (this is encapsulation), and the receiver removes the headers going up.
The seven OSI layers, from top to bottom, are:
- Application (7): gives network services to user programs, such as web browsing, email and file transfer. Examples: HTTP, SMTP, FTP, DNS.
- Presentation (6): translates, encrypts and compresses data so both ends understand it. Examples: TLS/SSL (often placed here), JPEG, ASCII.
- Session (5): opens, manages and closes the dialogue between two applications.
- Transport (4): end-to-end delivery, segmentation, error and flow control. Examples: TCP, UDP.
- Network (3): logical addressing and routing across networks. Examples: IP, ICMP; device: router.
- Data Link (2): node-to-node delivery within one network using MAC addresses, framing and error detection. Examples: Ethernet, Wi-Fi; devices: switch, bridge.
- Physical (1): transmits raw bits over cable, fibre or radio. Examples: cables, hubs, connectors.
The TCP/IP model is the practical model on which the internet runs. It has four layers (some books show five by splitting Link into Data Link and Physical). The Application layer covers OSI layers 5 to 7 (HTTP, FTP, SMTP, DNS). The Transport layer matches OSI layer 4 (TCP, UDP). The Internet layer matches OSI layer 3 (IP, ICMP, ARP is usually placed at the boundary with Link). The Link (Network Access) layer covers OSI layers 1 and 2.
Key differences: OSI is a generic, protocol-independent reference model with seven layers. TCP/IP was built around specific protocols that were already in use, and it has fewer layers. In practice, TCP/IP is what networks actually use; OSI is used mainly to teach and to describe where a function or fault sits.
Key rules to remember
- OSI layers, top to bottom
- Application → Presentation → Session → Transport → Network → Data Link → Physical
- Memory aid: All People Seem To Need Data Processing. Layers are numbered 7 down to 1.
- TCP/IP layers, top to bottom
- Application → Transport → Internet → Link (Network Access)
- Some texts show five layers by splitting Link into Data Link and Physical. State which version you use.
- Layer mapping
- OSI 5-6-7 = TCP/IP Application; OSI 4 = Transport; OSI 3 = Internet; OSI 1-2 = Link
- Use this to compare the two models in one line.
- Data unit at each layer
- Application/Presentation/Session: data; Transport: segment (TCP) or datagram (UDP); Network: packet; Data Link: frame; Physical: bits
- Questions often ask for the name of the data unit.
- Addressing at each layer
- Transport: port number; Network: IP address; Data Link: MAC address
- Port identifies the application, IP identifies the host, MAC identifies the device on the local network.
How to solve OSI and TCP/IP Reference Models questions
Use this method for any question on the OSI or TCP/IP models, whether it asks you to explain, compare or identify a layer.
- 1Read the command word. 'Explain' needs layers with functions; 'compare' needs a table-style point-by-point answer; 'identify' needs one layer name with a reason.
- 2Start with one line defining the model and its purpose (a layered reference for network communication).
- 3List the layers in correct order, naming each with its number if OSI.
- 4Write the function of each layer in one short sentence, and add one protocol, device or data unit example.
- 5For a comparison, use fixed heads: number of layers, origin, approach, protocol dependence, practical use, and the layer mapping.
- 6If the question gives a scenario (for example, an email being sent or a website failing to load), trace it through the layers and name where each action happens.
- 7Close with a one-line conclusion linking the model to practice, such as how it helps in troubleshooting or in placing security controls.
Quickest way: Layer list plus mapping line
When to use it: When you have under ten minutes for a 5 to 8 mark answer on layers or on OSI versus TCP/IP.
- Write the seven OSI layers in order using the memory aid.
- Beside each, write a two-to-four word function and one example.
- Draw brackets showing how they collapse into the four TCP/IP layers.
- Add four to five comparison points as short lines.
- Finish with one sentence: TCP/IP is used in practice; OSI is the reference model.
Common mistakes in OSI and TCP/IP Reference Models
Writing the OSI layers in the wrong order or numbering from the top.
Students memorise the names but not the direction. Layer 1 is Physical, not Application.
Fix: Use the memory aid and write the numbers 7 to 1 beside the names before you start.
Saying TCP/IP has five or seven layers without explanation.
Textbooks differ. Some show four layers and some show five.
Fix: State that the standard version has four layers, and mention the five-layer variant only as a note.
Placing protocols in the wrong layer, such as calling IP a transport protocol or TCP a network protocol.
The names TCP and IP are used together, so they blur.
Fix: Remember: IP routes packets (Network/Internet); TCP and UDP deliver between applications (Transport).
Mixing up the functions of Session, Presentation and Application layers.
All three are near the user and their roles sound similar.
Fix: Link each to a verb: Application provides services, Presentation translates and encrypts, Session manages the dialogue.
Writing a comparison that only describes each model separately.
Students run out of time and list facts instead of contrasting them.
Fix: Use matching heads for both models and write one contrasting point on each head.
Confusing MAC and IP addresses or the devices at each layer.
Both identify a device, so students treat them as the same.
Fix: MAC is physical, used on the local link at Data Link. IP is logical, used for routing at Network. Routers work at layer 3; switches at layer 2.
Worked examples
Example 1
Explain the functions of each layer of the OSI model. (Short answer)
Show the solution
- Define: the OSI model is a seven-layer reference model by ISO that standardises how data moves between systems.
- Layer 7, Application: gives network services to user programs, for example HTTP, SMTP, FTP.
- Layer 6, Presentation: translates data formats, encrypts and compresses.
- Layer 5, Session: sets up, manages and ends sessions between applications.
- Layer 4, Transport: end-to-end delivery, segmentation, flow and error control (TCP, UDP).
- Layer 3, Network: logical addressing and routing of packets (IP); routers work here.
- Layer 2, Data Link: framing, MAC addressing and error detection on a local link; switches work here.
- Layer 1, Physical: sends raw bits as signals over cable, fibre or radio.
Answer: The OSI model has seven layers: Application, Presentation, Session, Transport, Network, Data Link and Physical. Each handles a distinct function as listed above, so a fault or a security control can be placed at a specific layer.
Example 2
Distinguish between the OSI model and the TCP/IP model.
Show the solution
- Number of layers: OSI has seven; TCP/IP has four.
- Origin: OSI was developed by ISO as a theoretical reference; TCP/IP grew from protocols used on early internetworks and is the model used on the internet.
- Approach: OSI defines layers first and protocols after; TCP/IP was built around existing protocols.
- Upper layers: OSI separates Application, Presentation and Session; TCP/IP combines them in one Application layer.
- Lower layers: OSI separates Data Link and Physical; TCP/IP combines them in the Link layer.
- Common layers: Transport in both (TCP, UDP); Network in OSI corresponds to Internet in TCP/IP (IP).
- Use: OSI is mainly for teaching and fault location; TCP/IP is used in real networks.
Answer: OSI is a seven-layer generic reference model, while TCP/IP is a four-layer practical model. OSI layers 5 to 7 map to TCP/IP Application, layer 4 to Transport, layer 3 to Internet and layers 1 to 2 to Link.
Exam tips
- Always give layer number, name, function and one example. Marks follow these four items.
- For comparison questions, use a point-by-point format with the same heads for both models.
- Link the model to security where you can: for example, firewalls and routers filter at the Network and Transport layers, and encryption such as TLS is associated with the upper layers.
- Practise drawing the two stacks side by side with the mapping. A neat diagram saves writing time.
- This paper is an elective (Elective 1, 4.4), so the examination is open book. Still, learn the layer order and the main protocols well, because time is limited and you will not have time to look up every point.
Practice questions from Network Basics and Security
- A firm's network is divided so that its public web server sits in a separate zone, reachable from the internet but isolated by a firewall fr…
- The NIST Cybersecurity Framework (version 1.1) organises its core activities into five functions. Which sequence lists exactly those five fu…
- Employees of a Pune logistics firm receive an email that appears to come from the company's bank, asking them to click a link and re-enter n…
- Mehta Textiles has offices in Surat, Chennai and Kolkata, linked through leased lines and the public internet so that all branches access a …
- Which statement best describes how a digital signature on an electronic document is created and verified under the usual asymmetric scheme r…
OSI and TCP/IP Reference Models: frequently asked questions
What are the 7 layers of the OSI model?
From top to bottom they are Application, Presentation, Session, Transport, Network, Data Link and Physical. Layer 7 is Application and layer 1 is Physical.
What is the difference between the OSI and TCP/IP models?
OSI has seven layers and is a generic reference model. TCP/IP has four layers and is the model the internet actually uses. TCP/IP merges the OSI upper three layers into one and the lower two into one.
Which layer do TCP and IP belong to?
TCP belongs to the Transport layer and IP belongs to the Network layer in OSI (Internet layer in TCP/IP). TCP provides reliable delivery between applications, while IP routes packets between networks.
Does TCP/IP have four or five layers?
The standard description has four layers: Application, Transport, Internet and Link. Some books show five by splitting Link into Data Link and Physical. Mention which version you follow in your answer.