Back to Dashboard
Module 2
OSI Model Deep Dive
β Previous Module
Next Module β
# π CCNA 200-301 - Video 2: OSI Model Deep Dive ## Deep Study Notes --- ## π Learning Objectives By the end of this video, you should understand: - What the OSI model is and why it was created - All 7 layers in detail with their functions - How data flows through the OSI model (encapsulation & decapsulation) - Protocol Data Units (PDUs) at each layer - Key devices and protocols associated with each layer - Comparison with TCP/IP model --- ## π§ Core Concepts ### 1. What is the OSI Model? **Definition:** The Open Systems Interconnection (OSI) model is a conceptual framework that standardizes the functions of a networking system into seven distinct layers. It was developed by the **International Organization for Standardization (ISO)** in 1984. **Analogy:** Think of the OSI model like a company's shipping department: | OSI Layer | Shipping Analogy | |-----------|------------------| | Application | Customer placing an order | | Presentation | Translator converting the order to company format | | Session | Salesperson managing the conversation | | Transport | Shipping manager deciding delivery method (priority vs. standard) | | Network | Logistics planning the route | | Data Link | Warehouse packing boxes with labels | | Physical | Truck driver physically moving the boxes | **Why the OSI Model Matters:** | Purpose | Explanation | |---------|-------------| | **Standardization** | Ensures different vendors' equipment can communicate | | **Troubleshooting** | Isolates problems to specific layers | | **Modularity** | Changes in one layer don't affect others | | **Education** | Provides a common language for networking professionals | **Key Principle:** **"Each layer serves the layer above and is served by the layer below."** --- ### 2. The 7 Layers of the OSI Model ``` βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β OSI MODEL (Layer 7 to Layer 1) β βββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β LAYER 7 β APPLICATION β User interaction, network services β βββββββββββββββββΌββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββ€ β LAYER 6 β PRESENTATION β Data format, encryption, compression β βββββββββββββββββΌββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββ€ β LAYER 5 β SESSION β Session management, dialog control β βββββββββββββββββΌββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββ€ β LAYER 4 β TRANSPORT β Reliability, flow control, error recovery β βββββββββββββββββΌββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββ€ β LAYER 3 β NETWORK β Routing, logical addressing (IP) β βββββββββββββββββΌββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββ€ β LAYER 2 β DATA LINK β Physical addressing (MAC), error detection β βββββββββββββββββΌββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββ€ β LAYER 1 β PHYSICAL β Bits, cables, connectors, signals β βββββββββββββββββ΄ββββββββββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββ ``` --- ### 3. Layer 7: Application Layer **Function:** Provides network services directly to end-user applications. This is the layer users interact with. **Key Points:** - **NOT** the application itself (like Chrome or Outlook), but the **protocols** applications use - Identifies communication partners - Determines resource availability - Synchronizes communication **Common Protocols:** | Protocol | Purpose | |----------|---------| | HTTP/HTTPS | Web browsing | | FTP/TFTP | File transfer | | SMTP/POP3/IMAP | Email | | DNS | Domain name resolution | | DHCP | IP address assignment | | SNMP | Network management | | Telnet/SSH | Remote access | **CCNA Exam Tip:** Memorize these protocols as Application layer protocols. The exam frequently asks which protocols belong to which layer. --- ### 4. Layer 6: Presentation Layer **Function:** Translates, encrypts, and compresses data so it can be understood by the receiving application. Acts as a **translator**. **Three Main Jobs:** | Function | Description | Examples | |----------|-------------|---------| | **Translation** | Converts between different data formats | ASCII β EBCDIC, JPEG, GIF, MPEG | | **Encryption** | Secures data during transmission | SSL/TLS, AES, DES | | **Compression** | Reduces data size for transmission | ZIP, RAR, JPEG compression | **Analogy:** A translator at the UN - takes English and converts it to French so the French delegate can understand. **Important:** Encryption often happens at this layer, though some security protocols (like IPsec) operate at lower layers. --- ### 5. Layer 5: Session Layer **Function:** Manages sessions (connections) between applications. Establishes, maintains, and terminates communication sessions. **Key Responsibilities:** | Responsibility | Description | |----------------|-------------| | **Session Establishment** | Creates connection between applications | | **Dialog Control** | Determines whose turn to transmit (half-duplex vs. full-duplex) | | **Session Maintenance** | Keeps session active during communication | | **Session Termination** | Properly closes connection when done | | **Checkpointing** | Inserts checkpoints for resynchronization | **Analogy:** A meeting moderator who starts the meeting, ensures people don't talk over each other, and ends the meeting. **Common Protocols:** - NetBIOS - RPC (Remote Procedure Call) - PPTP (Point-to-Point Tunneling Protocol) - SMB (Server Message Block) **Simplex, Half-Duplex, Full-Duplex:** ``` βββββββββββββββββββ SIMPLEX βββββββββββββββββββ β TV Station β βββββββββββββββββΊβ TV β β (Transmit) β One direction β (Receive) β βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ β Walkie-Talkieβ ββββββββββββββββΊ β Walkie-Talkieβ β β One at a time β β βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ β Phone β ββββββββββββββββΊ β Phone β β β Both at once β β βββββββββββββββββββ βββββββββββββββββββ ``` --- ### 6. Layer 4: Transport Layer **Function:** Provides reliable or unreliable delivery of data, error checking, flow control, and segmentation/reassembly. **Key Responsibilities:** | Responsibility | Description | |----------------|-------------| | **Segmentation** | Breaks data into smaller segments | | **Reliability** | Ensures data arrives (or reports failure) | | **Flow Control** | Prevents sender from overwhelming receiver | | **Error Recovery** | Retransmits lost or corrupted data | | **Multiplexing** | Allows multiple applications to use network simultaneously | **Two Main Protocols:** | Protocol | Reliability | Connection | Best For | Ports | |----------|-------------|------------|----------|-------| | **TCP** | Reliable (ACKs) | Connection-oriented | Web, Email, File Transfer | 20,21,25,80,443 | | **UDP** | Unreliable (no ACKs) | Connectionless | Streaming, VoIP, DNS | 53,69,123 | **TCP Features:** - Three-way handshake (SYN, SYN-ACK, ACK) - Sequence numbers for ordering - Acknowledgment numbers - Window size for flow control - Error checking with checksums **UDP Features:** - No handshake (faster) - No sequence numbers - No acknowledgments - Still has checksum (optional) **Analogy:** TCP is like certified mail (tracking, signature required). UDP is like a postcard (you hope it arrives, but no confirmation). --- ### 7. Layer 3: Network Layer **Function:** Handles routing, logical addressing, and path determination. **Key Responsibilities:** | Responsibility | Description | |----------------|-------------| | **Logical Addressing** | Adds source and destination IP addresses | | **Routing** | Determines best path through internetwork | | **Packet Forwarding** | Moves packets between networks | | **Fragmentation** | Breaks packets if needed for different networks | **Key Protocols:** | Protocol | Purpose | |----------|---------| | **IPv4** | Primary logical addressing protocol | | **IPv6** | Next-generation addressing | | **ICMP** | Error reporting (ping, traceroute) | | **ARP** | Resolves IP to MAC addresses | | **IGMP** | Multicast group management | **Core Concept:** **Routers operate at Layer 3.** They use IP addresses to forward packets between networks. **Routing Table Components:** ``` Destination Network Next Hop Interface 192.168.1.0/24 0.0.0.0 Gig0/0 0.0.0.0/0 203.0.113.1 Gig0/1 ``` --- ### 8. Layer 2: Data Link Layer **Function:** Provides node-to-node delivery, error detection (but not correction), and access to physical media. **Key Responsibilities:** | Responsibility | Description | |----------------|-------------| | **Physical Addressing** | Adds source and destination MAC addresses | | **Error Detection** | Uses Frame Check Sequence (FCS) to detect errors | | **Media Access Control** | Controls who can transmit on shared media | | **Frame Delineation** | Marks beginning and end of frames | **Two Sublayers of Data Link Layer:** ``` βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β DATA LINK LAYER β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β LLC (Logical Link Control) 802.2 β β β β β β β’ Multiplexing protocols (IP, IPX, etc.) β β β β’ Flow control β β β β’ Error notification β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β MAC (Media Access Control) β β β’ Physical addressing (MAC addresses) β β β’ Frame delimiting β β β’ Media access methods (CSMA/CD, CSMA/CA) β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ``` **Switches vs. Hubs:** | Device | Layer | Behavior | |--------|-------|----------| | **Hub** | Layer 1 | Broadcasts all traffic to all ports | | **Switch** | Layer 2 | Learns MAC addresses, forwards only to destination port | **MAC Address Format:** ``` 00:1A:2B:3C:4D:5E ββββββββ΄βββββββ€ OUI β (Organizationally Device-specific Unique Identifier) OUI = Vendor identifier (Cisco, Intel, etc.) ``` --- ### 9. Layer 1: Physical Layer **Function:** Transmits raw bit streams over physical medium. Defines electrical, mechanical, and procedural specifications. **What Layer 1 Defines:** | Category | Specifications | |----------|----------------| | **Cables** | Category 5e, 6, 6a, coaxial, fiber | | **Connectors** | RJ45, LC, ST, SC | | **Signaling** | Voltage levels, timing, bit rates | | **Topology** | Physical layout of devices | | **Media** | Copper, fiber, wireless | **Common Physical Layer Standards:** | Standard | Media | Max Speed | Max Distance | |----------|-------|-----------|--------------| | 10Base-T | Cat3 UTP | 10 Mbps | 100m | | 100Base-TX | Cat5 UTP | 100 Mbps | 100m | | 1000Base-T | Cat5e/Cat6 | 1 Gbps | 100m | | 1000Base-SX | Multimode Fiber | 1 Gbps | 550m | | 10GBase-SR | Multimode Fiber | 10 Gbps | 400m | **CCNA Exam Tip:** You don't need to memorize all standards, but know the common ones and that **UTP is limited to 100 meters**. --- ### 10. Encapsulation and Decapsulation **Encapsulation Process (Sending Data):** ``` Application Data β βΌ ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β Layer 7-5 β Data (Upper layer data) β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β Layer 4 β TCP Header β Data (Segment) β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β Layer 3 β IP Header β TCP Header β Data (Packet) β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β Layer 2 β MAC Header β IP Header β TCP Header β Data β FCSβ β β (Frame) β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β Layer 1 β Bits (on the wire) β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ``` **Protocol Data Units (PDUs):** | Layer | PDU Name | What Happens | |-------|----------|--------------| | Application | Data | User data created | | Transport | Segment | Transport header added | | Network | Packet | IP header added | | Data Link | Frame | MAC header + trailer added | | Physical | Bits | Converted to signals | **Decapsulation Process (Receiving Data):** - Physical layer receives bits - Data Link layer checks FCS, strips MAC header - Network layer checks IP header, strips it - Transport layer processes port numbers, strips header - Upper layers deliver data to application --- ### 11. OSI Model vs. TCP/IP Model ``` βββββββββββββββββββββ βββββββββββββββββββββ β OSI MODEL β β TCP/IP MODEL β βββββββββββββββββββββ€ βββββββββββββββββββββ€ β 7. Application β β β β 6. Presentation β β Application β β 5. Session β β (Layer 4) β βββββββββββββββββββββ€ βββββββββββββββββββββ€ β 4. Transport β β Transport β β β β (Layer 3) β βββββββββββββββββββββ€ βββββββββββββββββββββ€ β 3. Network β β Internet β β β β (Layer 2) β βββββββββββββββββββββ€ βββββββββββββββββββββ€ β 2. Data Link β β β βββββββββββββββββββββ€ β Network Access β β 1. Physical β β (Layer 1) β βββββββββββββββββββββ βββββββββββββββββββββ ``` **Key Differences:** | Aspect | OSI Model | TCP/IP Model | |--------|-----------|--------------| | **Layers** | 7 layers | 4 layers | | **Development** | Theoretical (ISO) | Practical (DoD) | | **Protocols** | Protocol independent | Built around TCP/IP | | **Usage** | Teaching, troubleshooting | Actual internet implementation | **Why Both Matter:** - **OSI** is used for troubleshooting and conceptual understanding - **TCP/IP** is what actually runs on the internet - CCNA tests BOTH models and their mapping --- ## π Text-Based Diagrams ### Data Flow Through OSI Model ``` SENDING DEVICE RECEIVING DEVICE Application ββββββ ββββ Application Presentation βββββ€ ββββ Presentation Session ββββββββββ€ Encapsulation Decapsulation ββββ Session β βββββββ β Transport ββββββββΌββββββΊβ ββββββββββββββββββββΌβββ Transport β β β β Network ββββββββββΌββββββΊβ NET ββββββββββββββββββββΌβββ Network β β β β Data Link ββββββββΌββββββΊβWORK ββββββββββββββββββββΌβββ Data Link β β β β Physical βββββββββΌββββββΊβ ββββββββββββββββββββΌβββ Physical β βββββββ β β β β βββββββββββΌββββββββββββββββββββββ β Physical Medium (Copper/Fiber/Wireless) ``` ### Layer-by-Layer Device Map ``` βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β Layer 7-5: End Devices (PCs, Servers, Phones) β β Firewalls (some functions) β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β Layer 4: End Devices (TCP/UDP processing) β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β Layer 3: Routers, Layer 3 Switches, Firewalls β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β Layer 2: Switches, Bridges, NICs β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β Layer 1: Hubs, Repeaters, Cables, Transceivers β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ``` --- ## π§ Commands to Remember *No CLI commands in Video 2 - still foundational theory.* However, when you start using Packet Tracer (likely Video 3 or 4), you'll use: ``` show ip route # View Layer 3 routing table show mac address-table # View Layer 2 MAC table show interfaces # View Layer 1 and 2 statistics ``` --- ## β Exam Tips (For CCNA 200-301) | Common Question | Answer Strategy | |-----------------|-----------------| | "Which layer does HTTP operate at?" | Application (Layer 7) | | "Which layer handles routing?" | Network (Layer 3) | | "Which layer uses MAC addresses?" | Data Link (Layer 2) | | "TCP and UDP are at which layer?" | Transport (Layer 4) | | "Which layer encrypts data?" | Presentation (Layer 6) | ### Mnemonics to Memorize OSI Layers: **From Layer 7 to Layer 1 (Top to Bottom):** - **A**ll **P**eople **S**eem **T**o **N**eed **D**ata **P**rocessing - **A**way **P**izza **S**ausage **T**hrow **N**ot **D**o **P**lease **From Layer 1 to Layer 7 (Bottom to Top):** - **P**lease **D**o **N**ot **T**hrow **S**ausage **P**izza **A**way - **P**eople **D**on't **N**eed **T**o **S**ee **P**aul **A**llen ### Protocol-to-Layer Mapping (Must Know): | Protocol | Layer | |----------|-------| | HTTP, FTP, SMTP, DNS, DHCP | Application (7) | | SSL/TLS | Presentation (6) | | NetBIOS, SMB | Session (5) | | TCP, UDP | Transport (4) | | IP, ICMP, ARP | Network (3) | | Ethernet, PPP, Frame Relay | Data Link (2) | | 10Base-T, 100Base-TX | Physical (1) | **Common Trick Question:** ARP is often confused as Layer 3, but it's actually **Layer 2** (operates within a local network) or sometimes considered "Layer 2.5" - for CCNA, know it's associated with Layer 2 functions. --- ## π Summary (1-Minute Revision) ``` OSI MODEL (7 Layers) - "Please Do Not Throw Sausage Pizza Away" 7 - APPLICATION βββββΊ HTTP, FTP, SMTP, DNS, DHCP 6 - PRESENTATION ββββΊ Translation, Encryption, Compression 5 - SESSION βββββββββΊ Session mgmt, Dialog control 4 - TRANSPORT βββββββΊ TCP (reliable), UDP (fast) 3 - NETWORK βββββββββΊ IP addresses, Routing (Routers) 2 - DATA LINK βββββββΊ MAC addresses, Switching, Error detection 1 - PHYSICAL ββββββββΊ Bits, Cables, Connectors ENCAPSULATION (Sending): Data β Segment β Packet β Frame β Bits DECAPSULATION (Receiving): Bits β Frame β Packet β Segment β Data KEY DEVICES: βββ Router = Layer 3 βββ Switch = Layer 2 βββ Hub = Layer 1 βββ Firewall = Layer 3-4 (usually) ``` --- ## π§ͺ Practice Questions **1. Which OSI layer is responsible for logical addressing and routing?** - A) Data Link - B) Transport - C) Network - D) Session <details> <summary>Answer</summary> <b>C) Network (Layer 3)</b> - This layer handles IP addressing and routing decisions. </details> **2. At which layer of the OSI model does a switch primarily operate?** - A) Physical - B) Data Link - C) Network - D) Transport <details> <summary>Answer</summary> <b>B) Data Link (Layer 2)</b> - Switches forward frames based on MAC addresses. </details> **3. What is the PDU (Protocol Data Unit) at the Transport layer?** - A) Frame - B) Packet - C) Segment - D) Bits <details> <summary>Answer</summary> <b>C) Segment</b> - Transport layer uses segments (TCP) or datagrams (UDP). </details> **4. Which protocol operates at the Transport layer and provides connection-oriented, reliable delivery?** - A) IP - B) UDP - C) TCP - D) HTTP <details> <summary>Answer</summary> <b>C) TCP</b> - Transmission Control Protocol provides reliable, connection-oriented communication. </details> **5. A user opens a web browser and visits https://www.example.com. At which layer does the browser's request originate?** - A) Network - B) Transport - C) Session - D) Application <details> <summary>Answer</summary> <b>D) Application (Layer 7)</b> - User applications initiate requests at the Application layer using protocols like HTTP/HTTPS. </details> **6. Which layer of the OSI model is responsible for data encryption?** - A) Application - B) Presentation - C) Session - D) Transport <details> <summary>Answer</summary> <b>B) Presentation (Layer 6)</b> - This layer handles translation, encryption, and compression. </details> **7. What is the maximum distance for UTP cable according to Ethernet standards?** - A) 50 meters - B) 100 meters - C) 185 meters - D) 500 meters <details> <summary>Answer</summary> <b>B) 100 meters (328 feet)</b> - This is the standard maximum distance for Ethernet over UTP. </details> **8. During the encapsulation process, what is added at the Data Link layer?** - A) IP header - B) TCP header - C) MAC header and trailer - D) Application data <details> <summary>Answer</summary> <b>C) MAC header and trailer (FCS)</b> - The Data Link layer adds source/destination MAC addresses and a trailer with FCS for error detection. </details> **9. Which of the following protocols is connectionless and unreliable?** - A) TCP - B) IP - C) UDP - D) HTTP <details> <summary>Answer</summary> <b>C) UDP</b> - User Datagram Protocol is connectionless and does not guarantee delivery. </details> **10. A router receives a packet and needs to forward it to the next hop. Which layer information does the router primarily use?** - A) MAC addresses (Layer 2) - B) IP addresses (Layer 3) - C) Port numbers (Layer 4) - D) Application data (Layer 7) <details> <summary>Answer</summary> <b>B) IP addresses (Layer 3)</b> - Routers forward packets based on destination IP addresses. </details> --- ## π Next Steps After completing Video 2, you should be ready for: - **Video 3:** TCP/IP Model and Encapsulation Deep Dive - **Video 4:** Introduction to Packet Tracer (Lab Setup) --- **Ready for Video 3?** Share the link or say "next" and I'll continue with the same detailed format through the entire 58-video series. I'll create comprehensive deep notes for **Video 3: TCP/IP Model and Encapsulation** based on the standard CCNA 200-301 curriculum that follows the OSI model foundation. ---