CompTIA Network+ (V9)
OSI model layers explained for Network+
The OSI reference model has seven layers: Physical, Data link, Network, Transport, Session, Presentation and Application. Each layer serves the one above it. The Internet protocol suite has four layers, and its application layer covers the work of OSI's Presentation and Application layers.
What each layer does
These descriptions follow ITU-T X.200, the OSI reference model.
Layer 1, Physical: the mechanical, electrical, functional and procedural means to activate, maintain and release physical connections for bit transmission.
Layer 2, Data link: transfers data between network entities over one or more physical connections. It detects and possibly corrects errors which may occur in the Physical layer.
Layer 3, Network: moves data between transport entities and gives them independence from routing and relaying, including when several subnetworks are crossed in tandem.
Layer 4, Transport: transparent transfer of data between end systems. Its protocols have end-to-end significance and include end-to-end error detection, error recovery, sequence control and flow control.
Layer 5, Session: lets the communicating parties organize and synchronize their dialogue, establish a connection and release it in an orderly manner.
Layer 6, Presentation: a common representation of the data being transferred, so applications do not have to agree on syntax themselves.
Layer 7, Application: the highest layer and the only way an application process reaches the OSI environment. It has no layer above it.
Hop by hop or end to end
Error handling appears at two layers, and the exam tests which is which. The Data link layer handles errors on one physical hop, before the Network layer sees the data. The Transport layer handles errors end to end, between the two communicating end systems only.
Not every transport protocol recovers errors. RFC 768 says UDP is transaction oriented and that delivery and duplicate protection are not guaranteed. If a UDP datagram arrives twice, UDP passes both up, and the application must notice and discard the duplicate. TCP, by contrast, provides a reliable, in-order byte stream (RFC 9293).
OSI layers and the Internet protocol suite
RFC 1122 lists the Internet suite's layers as application, transport, internet and link. It states that the Internet application layer essentially combines the functions of the top two OSI layers, Presentation and Application.
TCP and UDP belong to the transport layer, which lines up with OSI layer 4. IP belongs to the internet layer, which lines up with OSI layer 3.
Where the exam catches people
- Believing the Network layer corrects transmission errors on a link: X.200 gives that job to the Data link layer, hop by hop.
- Believing UDP drops duplicate datagrams: RFC 768 says UDP gives no duplicate protection, so the application must detect them.
- Believing the Session layer handles data format or encoding: that is the Presentation layer. The Session layer organizes and synchronizes the dialogue.
- Believing the Internet suite's application layer matches only OSI layer 7: RFC 1122 says it combines the Presentation and Application layers.