Overview
The OSI model is a troubleshooting map — when a connection fails, ask which layer broke. This guide covers PDUs, encapsulation, protocol vs port, end-to-end flows, and Jeremy's IT Lab bottom-up verification workflow.
Why the OSI model matters for CCNA
The OSI model is not a memorization exercise — it is a troubleshooting map. When Jeremy's IT Lab walks through a broken connection, the question is always: which layer failed? Cable errors live at Layer 1. VLAN and MAC problems live at Layer 2. Routing and subnet mistakes live at Layer 3. Port blocks and TCP retransmits live at Layer 4. DNS, HTTP, and application auth live at Layer 7.
CCNA still uses OSI language in exam questions even though production networks run the TCP/IP model. You need a practical mapping between the two, not a song about all seven layers.
OSI layers — responsibilities and examples
| Layer | Name | PDU | Key protocols / concepts | Devices |
|---|---|---|---|---|
| 7 | Application | Data | HTTP, DNS, DHCP, SSH, SNMP | Host software |
| 6 | Presentation | Data | TLS/SSL, encoding, compression | Often bundled with L7 |
| 5 | Session | Data | Session management | Often bundled with L7 |
| 4 | Transport | Segment (TCP) / Datagram (UDP) | TCP, UDP, port numbers | End-to-end on hosts |
| 3 | Network | Packet | IP, ICMP, routing | Routers, L3 switches |
| 2 | Data Link | Frame | Ethernet 802.3, MAC, VLAN tags, ARP | Switches, bridges |
| 1 | Physical | Bits | Cables, optics, voltage, pinouts | Hubs (legacy), NIC PHY |
Transport layer PDU = segment (TCP) or datagram (UDP). Network layer PDU = packet. Data link layer PDU = frame. Layer 1 moves bits. Layers 5–7 are generally called data at the PDU level.
CCNA collapses layers 5–7 into "Application" for most questions. Focus on where a problem lives, not reciting layer names backward.
TCP/IP model vs OSI
| TCP/IP layer | Maps to OSI | What actually runs here |
|---|---|---|
| Application | L5–L7 | DNS lookups, web requests, SSH sessions |
| Transport | L4 | TCP three-way handshake, UDP streams |
| Internet | L3 | IP addressing, routing, ICMP ping |
| Network Access | L1–L2 | Ethernet frames, switches, cables |
The TCP/IP model is what networks run. The OSI model is how we talk about and isolate problems. Both are valid — exam questions may use either framing.
Protocol vs port — do not confuse them
These terms appear together constantly but mean different things:
- Protocol — a system of rules governing how two entities communicate. Defines syntax, semantics, timing, and error recovery. May be implemented in hardware, software, or both. Examples: TCP, IP, Ethernet, OSPF.
- Port — a 16-bit logical endpoint (0–65535) inside a host OS that identifies a specific process or service. TCP and UDP use port numbers so multiple applications can share one IP address.
- Ephemeral port — a short-lived client-side port allocated automatically (IANA suggests 49152–65535). Your browser picks an ephemeral source port when connecting to a web server's well-known port 443.
"Port 80" is not a protocol — HTTP is the protocol, TCP is the transport, and 80 is the well-known port number. OSPF runs at Layer 3 and has no port number.
Encapsulation and decapsulation
When Host A sends data to Host B across a routed network, each layer adds its own header (and sometimes trailer) as the data moves down the stack. At each hop, the receiving device strips headers appropriate to its layer and passes the payload up.
Encapsulation (sender, top to bottom):
- L7–L5 — Application data (e.g., HTTP GET request)
- L4 — TCP header added → creates a segment (source/dest ports, seq/ack, flags, window)
- L3 — IP header added → creates a packet (source/dest IP, TTL, protocol field)
- L2 — Ethernet header + FCS trailer added → creates a frame (source/dest MAC, EtherType)
- L1 — Bits transmitted on the wire or fiber
Decapsulation (receiver, bottom to top): Each device processes only what it understands. A switch reads the frame header (MAC addresses). A router strips the frame, reads the packet (IP addresses), makes a forwarding decision, then re-encapsulates in a new frame toward the next hop.
When a packet crosses a router, Layer 3 information stays the same (original source and destination IP). Layer 2 information is rewritten at every hop (new source MAC = router exit interface, new dest MAC = next-hop device).
End-to-end traffic flow — same subnet
PC A (10.1.1.1/24) pings PC C (10.1.1.2/24) on the same Ethernet segment:
- A checks the destination IP — same subnet, so the target is local
- A checks its ARP cache for C's MAC address
- If missing, A sends an ARP request (broadcast): "Who has 10.1.1.2? Tell 10.1.1.1"
- C replies with an ARP reply (unicast) containing its MAC
- A builds an ICMP echo inside TCP/IP, wraps it in a frame with DA = C's MAC, SA = A's MAC
- The switch forwards based on MAC table (or floods if unknown)
- C receives, decapsulates, replies — process reverses
End-to-end traffic flow — remote subnet
PC A (10.1.1.1/24, gateway 10.1.1.100) pings PC B (10.1.2.1/24):
- A sees 10.1.2.1 is not on its /24 network → sends to default gateway
- A ARPs for the gateway MAC (10.1.1.100)
- A sends frame: L2 SA=A, DA=Gateway MAC | L3 SA=10.1.1.1, DA=10.1.2.1
- Router receives, strips L2, reads L3 destination
- Router checks routing table → 10.1.2.0/24 out Fa0/1
- Router ARPs for 10.1.2.1 on the exit segment (if needed)
- Router forwards with new L2: SA=Router Fa0/1 MAC, DA=B's MAC | L3 unchanged
Communication types
| Type | Description | Example |
|---|---|---|
| Unicast | One sender, one receiver | PC to web server |
| Broadcast | One sender, all hosts in subnet | ARP request, DHCP discover |
| Multicast | One sender, subscribed receivers | OSPF 224.0.0.5 (All OSPF routers) |
Multicast MAC addresses have the last bit of the first octet set to 1. Switches flood unknown multicast; routers handle multicast routing separately.
Jeremy's IT Lab troubleshooting workflow
Jeremy's approach maps directly to OSI layers. Use this sequence on every break:
- Physical (L1) — Is the link up? Correct cable?
show ip interface brief— admin/oper status? - Data link (L2) — ARP working? Correct VLAN? MAC table populated?
show vlan brief,show mac address-table - Network (L3) — Can you ping the gateway? Routing table correct?
show ip route,ping,traceroute - Transport (L4) — Is the port open? TCP handshake completing?
telnet host 443or equivalent - Application (L7) — DNS resolving? Correct URL? Certificate valid?
nslookup, browser dev tools
Worked example: "I can ping google.com but Chrome won't load."
- Ping works → L3 routing and ICMP are fine
- DNS may still be broken for the browser → test
nslookup google.com - Browser uses TCP 443 → test connectivity to port 443
- Conclusion: likely L4/L7 (proxy, TLS, firewall on 443), not basic routing
Jumping straight to "the app is broken" when the interface is down/down wastes time. Start at L1 and work up — Jeremy's IT Lab drills this habit in Week 1 for a reason.
Ethernet frame and IP packet essentials
802.3 Ethernet frame fields: Preamble, SFD, Destination MAC, Source MAC, EtherType/Length, Data, FCS. The FCS uses a CRC computed over all fields except FCS itself.
IPv4 header highlights: Version, IHL, DSCP (QoS marking), Total Length, Identification, Flags, Fragment Offset, TTL, Protocol (6=TCP, 17=UDP, 1=ICMP), Header Checksum, Source IP, Destination IP.
TCP three-way handshake: SYN → SYN-ACK → ACK. Window size advertises receive buffer. Flags (SYN, ACK, FIN, RST) control connection state.
Store-and-forward switching
Modern switches use store-and-forward: the entire frame is received, CRC checked, then forwarded. This catches corrupted frames before they propagate. Cut-through switching (exam awareness) begins forwarding before the frame fully arrives — lower latency, no CRC check on ingress.
Quick reference — layer isolation commands
show ip interface brief show interfaces status show arp show mac address-table show ip route ping 10.1.1.1 traceroute 10.1.1.1
telnet 192.168.1.1 443 nslookup example.com curl -I https://example.com
Legacy bus topology awareness
Early Ethernet (10BASE-2 coax) used a bus physical topology with terminators at each end. A single cable break isolated part of the network. CSMA/CD managed collisions because the entire segment was one collision domain. Modern switched star topologies eliminated this, but exam questions still reference bus/CSMA/CD concepts when contrasting hubs with switches.
Exam checklist
- Name the PDU at each layer (bits, frame, packet, segment)
- Explain encapsulation direction (down) and decapsulation (up)
- Describe what changes at L2 vs L3 when a packet crosses a router
- Distinguish protocol, port, and ephemeral port
- Map unicast, broadcast, and multicast to ARP and OSPF examples
- Apply the JITL bottom-up troubleshooting sequence to a scenario
- Contrast hub flooding behavior with switch MAC-based forwarding