Bird
Raised Fist0
Computer Networksknowledge~10 mins

OSI model seven layers in Computer Networks - Step-by-Step Execution

Choose your learning style10 modes available
Concept Flow - OSI model seven layers
Application Layer
↓
Presentation Layer
↓
Session Layer
↓
Transport Layer
↓
Network Layer
↓
Data Link Layer
↓
Physical Layer
↓
Transmission
Data starts at the Application layer and moves down through each layer to the Physical layer for transmission, then back up on the receiving side.
Execution Sample
Computer Networks
User types message -> Application Layer processes
Application Layer passes data -> Presentation Layer encodes
Presentation Layer passes data -> Session Layer manages connection
Session Layer passes data -> Transport Layer segments data
Transport Layer passes data -> Network Layer routes packets
Network Layer passes data -> Data Link Layer frames data
Data Link Layer passes data -> Physical Layer sends bits
Shows how data moves step-by-step down the OSI layers before transmission.
Analysis Table
StepLayerActionData StateNext Layer
1ApplicationUser data createdRaw user dataPresentation
2PresentationData encoded/encryptedEncoded dataSession
3SessionConnection establishedSession dataTransport
4TransportData segmented and error-checkedSegmentsNetwork
5NetworkPackets addressed and routedPackets with addressesData Link
6Data LinkFrames created with error detectionFramesPhysical
7PhysicalBits transmitted over mediumBits on wireTransmission
8TransmissionData sent to receiverBits receivedPhysical (receiver)
9Physical (receiver)Bits converted to framesFramesData Link (receiver)
10Data Link (receiver)Frames checked and passedFramesNetwork (receiver)
11Network (receiver)Packets routed to transportPackets with addressesTransport (receiver)
12Transport (receiver)Segments reassembledSegmentsSession (receiver)
13Session (receiver)Connection managedSession dataPresentation (receiver)
14Presentation (receiver)Data decoded/decryptedUser dataApplication (receiver)
15Application (receiver)Data presented to userReadable dataEnd
💡 Data reaches Application layer on receiver side, completing transmission.
State Tracker
LayerData State StartAfter Processing
ApplicationUser inputRaw user data
PresentationRaw user dataEncoded data
SessionEncoded dataSession data
TransportSession dataSegments
NetworkSegmentsPackets with addresses
Data LinkPackets with addressesFrames
PhysicalFramesBits on wire
Physical (receiver)Bits on wireFrames
Data Link (receiver)FramesFrames
Network (receiver)FramesPackets with addresses
Transport (receiver)Packets with addressesSegments
Session (receiver)SegmentsSession data
Presentation (receiver)Session dataUser data
Application (receiver)User dataReadable data
Key Insights - 3 Insights
Why does data change form at each layer?
Each layer adds or removes information needed for its specific task, as shown in the execution_table where data changes from raw to encoded, segmented, addressed, framed, and finally bits.
What happens if an error is detected at the Data Link layer?
The Data Link layer can request retransmission or correct errors before passing data up, as indicated in step 6 and 10 of the execution_table where frames are checked.
Why is the Physical layer last in sending data but first in receiving?
Physical layer sends raw bits over the medium and on receiving side it first converts bits back to frames, shown by steps 7 and 8 for sending and 8 and 9 for receiving in the execution_table.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, at which step does the data get segmented?
AStep 2 - Presentation Layer
BStep 4 - Transport Layer
CStep 6 - Data Link Layer
DStep 1 - Application Layer
💡 Hint
Check the 'Action' column in execution_table row 4 where segmentation is mentioned.
At which step does the Physical layer send bits over the medium?
AStep 7
BStep 5
CStep 3
DStep 9
💡 Hint
Look for 'Bits transmitted over medium' in the 'Action' column of execution_table.
If the Presentation layer did not encode data, what would happen to the data state at step 3?
AData would be segmented
BData would be framed
CData would still be raw user data
DData would be bits on wire
💡 Hint
Refer to variable_tracker for Presentation layer showing data changes after encoding.
Concept Snapshot
OSI Model Seven Layers:
1. Application - user interface
2. Presentation - data encoding
3. Session - connection management
4. Transport - data segmentation
5. Network - routing packets
6. Data Link - framing and error detection
7. Physical - bit transmission
Data flows down layers to send, up layers to receive.
Full Transcript
The OSI model has seven layers that data passes through when sent over a network. Starting at the Application layer, user data is created and passed down. Each layer changes the data form to add necessary information: Presentation encodes it, Session manages connections, Transport segments it, Network routes packets, Data Link frames data with error checks, and Physical sends bits over the medium. On the receiving side, data moves up these layers in reverse order, being decoded and reassembled until it reaches the user. This step-by-step flow ensures reliable and organized communication between devices.

Practice

(1/5)
1. Which layer of the OSI model is responsible for establishing, managing, and terminating connections between applications?
easy
A. Session layer
B. Physical layer
C. Network layer
D. Data Link layer

Solution

  1. Step 1: Understand the role of the Session layer

    The Session layer manages sessions or connections between applications, including setup and teardown.
  2. Step 2: Compare with other layers

    The Physical layer deals with cables, Network layer routes packets, and Data Link layer handles frames and error detection.
  3. Final Answer:

    Session layer -> Option A
  4. Quick Check:

    Session layer = connection management [OK]
Hint: Session layer manages connections between apps [OK]
Common Mistakes:
  • Confusing Session layer with Transport layer
  • Thinking Physical layer manages connections
  • Mixing Network and Session layer roles
2. Which of the following correctly lists the OSI layers from bottom to top?
easy
A. Physical, Data Link, Network, Transport, Session, Presentation, Application
B. Application, Presentation, Session, Transport, Network, Data Link, Physical
C. Network, Data Link, Physical, Transport, Session, Presentation, Application
D. Physical, Network, Data Link, Transport, Session, Presentation, Application

Solution

  1. Step 1: Recall the OSI layer order

    The OSI model layers from bottom to top are: Physical, Data Link, Network, Transport, Session, Presentation, Application.
  2. Step 2: Match options with correct order

    Physical, Data Link, Network, Transport, Session, Presentation, Application matches the correct order exactly; others have layers misplaced.
  3. Final Answer:

    Physical, Data Link, Network, Transport, Session, Presentation, Application -> Option A
  4. Quick Check:

    Bottom to top = Physical to Application [OK]
Hint: Remember: Please Do Not Throw Sausage Pizza Away [OK]
Common Mistakes:
  • Reversing the order of layers
  • Mixing Network and Data Link layers
  • Confusing Application layer as bottom
3. In a network communication, if a packet is being routed between different networks, which OSI layer is primarily responsible for this task?
medium
A. Session layer
B. Transport layer
C. Data Link layer
D. Network layer

Solution

  1. Step 1: Identify the layer responsible for routing

    The Network layer handles routing packets between different networks using logical addressing.
  2. Step 2: Eliminate other layers

    Transport layer manages end-to-end communication, Data Link layer handles local network frames, Session layer manages connections.
  3. Final Answer:

    Network layer -> Option D
  4. Quick Check:

    Routing = Network layer [OK]
Hint: Routing happens at Network layer [OK]
Common Mistakes:
  • Confusing Transport layer with Network layer
  • Thinking Data Link layer routes packets
  • Mixing Session layer with routing tasks
4. A network engineer claims that the Presentation layer is responsible for routing data packets. Identify the error in this statement.
medium
A. Presentation layer encrypts data and routes packets
B. Presentation layer only formats data, it does not route packets
C. Presentation layer manages physical connections, not routing
D. Presentation layer handles error detection and routing

Solution

  1. Step 1: Understand Presentation layer role

    The Presentation layer formats, encrypts, and compresses data but does not route packets.
  2. Step 2: Clarify routing responsibility

    Routing is done by the Network layer, not the Presentation layer.
  3. Final Answer:

    Presentation layer only formats data, it does not route packets -> Option B
  4. Quick Check:

    Presentation = data format, not routing [OK]
Hint: Presentation layer formats data, routing is Network layer [OK]
Common Mistakes:
  • Attributing routing to Presentation layer
  • Confusing Presentation with Network layer
  • Thinking Presentation manages physical connections
5. You are designing a secure communication system that requires data encryption and compression before transmission. Which OSI layer should handle these tasks, and why?
hard
A. Session layer, because it manages connections
B. Transport layer, because it ensures reliable delivery
C. Presentation layer, because it formats and encrypts data
D. Application layer, because it interacts with user software

Solution

  1. Step 1: Identify layer for encryption and compression

    The Presentation layer is responsible for data translation, encryption, and compression before sending data.
  2. Step 2: Differentiate from other layers

    Session layer manages connections, Transport layer ensures delivery, Application layer interfaces with users but does not encrypt.
  3. Final Answer:

    Presentation layer, because it formats and encrypts data -> Option C
  4. Quick Check:

    Encryption/compression = Presentation layer [OK]
Hint: Encryption and compression belong to Presentation layer [OK]
Common Mistakes:
  • Assigning encryption to Session or Transport layers
  • Confusing Application layer with Presentation layer
  • Ignoring Presentation layer's formatting role
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard