0% found this document useful (0 votes)
3 views61 pages

Network Plus Chapter 2

Uploaded by

cissp4all
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views61 pages

Network Plus Chapter 2

Uploaded by

cissp4all
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

The Open Systems Interconnection (OSI) Reference Model

Part 1 – Introduction to Internetworking and the OSI


Model
Section: Early Network Limitations
● Concept: In the early days of networking, computers from different manufacturers
couldn’t talk to each other.
● Example: A business using Digital Equipment Corporation (DEC) systems couldn’t
connect with another business using IBM systems.
● Problem: No shared standards = No interoperability.

Section: Why the OSI Model Was Created


● Developer: International Organization for Standardization (ISO)
● Timeframe: Late 1970s
● Purpose: To standardize how computers communicate, regardless of brand or
technology.
● Goal: Create a universal framework so all hardware and software can communicate
reliably.

Classroom Analogy: Departments in a Company


● Imagine starting a business with your friends:
○ You create departments like Customer Service, Inventory, and Shipping.
○ Each department has its own job and doesn’t interfere with others.
○ They rely on each other to complete the process.
● This is exactly how the OSI model works – each layer has a specific task and depends
on the other layers to complete communication.

Part 2 – OSI Overview & Mnemonics


Section: The 7 OSI Layers (Bottom-Up)
1. Physical
2. Data Link
3. Network
4. Transport
5. Session
6. Presentation
7. Application

Mnemonic to Remember:
● "Please Do Not Throw Sausage Pizza Away" (Layer 1 → 7)
● "All People Seem To Need Data Processing" (Layer 7 → 1)

Visual Aids:
● Diagram of Layer Stack (Figures 2.1, 2.2, 2.3 simulated)
● Color-coded chart showing layer functions, protocols, and devices

Part 3 – Deep Dive Into Each Layer (45 minutes)


For each layer, provide:

● Name & Position


● Definition & Key Functions
● Real-World Example
● Associated Protocols & Devices
● Network+ Exam Clues

Layer 1: Physical Layer


● Definition: Handles raw transmission of bits over a medium.
● Functions:
○ Defines electrical signals, voltages
○ Specifies cables, connectors, pins
○ Deals with data transmission as light, electricity, or radio
● Examples: Ethernet cables, fiber optics, Wi-Fi signals
● Devices: Hubs, NICs, repeaters
● Exam Clue: If it’s physical hardware (cables, signals), it’s Layer 1

Layer 2: Data Link Layer


● Definition: Provides local delivery and error detection over the physical medium.
● Functions:
○ Adds MAC addresses
○ Breaks data into frames
○ Detects and may correct errors
● Sublayers:
○ MAC (Media Access Control) – Controls access to physical medium
○ LLC (Logical Link Control) – Coordinates with Layer 3
● Examples: Ethernet, VLAN tagging
● Devices: Switches
● Exam Clue: MAC address = Layer 2
Layer 3: Network Layer
● Definition: Selects paths for data and forwards packets between networks.
● Functions:
○ Routing with IP addresses
○ Packet delivery across networks
● Examples: IP, ICMP, ARP
● Devices: Routers
● Exam Clue: IP address, routing = Layer 3

Layer 4: Transport Layer


● Definition: Manages end-to-end data delivery, error checking, flow control.
● Functions:
○ Segmentation and reassembly
○ Reliability (TCP) vs. speed (UDP)
○ Flow control, windowing
● Examples: TCP, UDP
● Devices: Firewalls, host OS
● Exam Clue: Ports (e.g., 80, 443) = Layer 4

Layer 5: Session Layer


● Definition: Manages the start, continuation, and end of communication sessions.
● Functions:
○ Session setup and teardown
○ Manages multiple conversations
● Examples: NetBIOS, RPC
● Exam Clue: If question says "session" or "dialog," think Layer 5

Layer 6: Presentation Layer


● Definition: Translates, encrypts, and compresses data for applications.
● Functions:
○ Format translation (e.g., EBCDIC ↔ ASCII)
○ Data compression
○ Encryption and decryption
● Examples: SSL, TLS, JPEG, MPEG
● Exam Clue: If question mentions encryption or format conversion, it's Layer 6

Layer 7: Application Layer


● Definition: Closest to the user; enables application access to network services.
● Functions:
○ Provides interfaces for email, web browsing, file transfers
● Examples: HTTP, FTP, DNS, SMTP
● Devices: Web browsers, mail clients
● Exam Clue: If a user is interacting with the service, it's Layer 7
Part 4 – Encapsulation Process
Definition:
● Encapsulation is the process of wrapping data with protocol headers as it moves down
the OSI layers.

How It Works:
1. Application Layer creates the message.
2. Transport Layer breaks it into segments.
3. Network Layer adds IP addresses to form packets.
4. Data Link Layer adds MAC addresses to form frames.
5. Physical Layer converts the frames to bits and sends them over the medium.

Analogy:
● Writing a letter → Putting it in an envelope → Addressing it → Putting it in a
mailbox → Postal truck delivers

Visual:
● Provide diagram showing data wrapped with headers at each layer

Part 5 – Activities
Activity 1: OSI Flashcard Stack Race
● Students arrange layer flashcards in correct order.

Activity 2: Protocol Matching


● Match protocols (DNS, IP, TCP) to their OSI layer.

Activity 3: Troubleshooting Scenarios


● "Wi-Fi not working" = Layer 1
● "Website not loading" = Layer 7 or 4
● "Cannot ping remote host" = Layer 3

Part 6 – Review Questions (10 minutes)


Knowledge Check (Sample):
1. What does the Presentation Layer do?
2. What layer uses IP addresses?
3. At which layer do switches operate?
4. What’s the purpose of encapsulation?
5. Which protocol is found at Layer 4?

Answers:

1. Translates/encrypts data
2. Layer 3 (Network)
3. Layer 2 (Data Link)
4. Packages data with headers to transmit it
5. TCP or UDP

Assessment / Homework
● Worksheet: Label OSI layers, identify where protocols/devices belong
● Practice Questions: 15 Network+ style questions
● Optional: Watch video clip from Todd Lammle's OSI module

Introduction to the OSI Model (30 minutes)


● History: In the early days of networking, companies like IBM and DEC built proprietary
networks that couldn’t communicate with each other. The ISO developed the OSI
Model in 1984 to provide a common framework.
● Why It Matters: The OSI model allows different systems and devices to interoperate. It
provides a layered, standardized approach to communication.
● Analogy: Compare network communication to sending a letter:
○ Writing letter = Application Layer
○ Translating into another language = Presentation Layer
○ Attaching conversation ID = Session Layer
○ Sorting and sealing = Transport Layer
○ Addressing envelope = Network Layer
○ Giving to delivery truck = Data Link Layer
○ Physically mailing it = Physical Layer
● Visual Demo: Teacher shows a physical packet/box going through each "station" in a
classroom setup.

Part 2: Mnemonics to Remember the Layers (5 minutes)


● From Layer 1 to 7: Please Do Not Throw Sausage Pizza Away
● From Layer 7 to 1: All People Seem To Need Data Processing
● Student Task: Have each student create their own mnemonic.
Part 3: Deep Dive into the Seven OSI Layers (90 minutes)
Each layer will be taught with the following structure:

● Definition and Tasks


● Services/Technologies
● Common Protocols
● Devices
● Real-World Examples
● Exam-Style Clues

Layer 7: Application Layer


● What It Does: Provides network services directly to user applications (web browsers,
email clients).
● Protocols: HTTP, HTTPS, FTP, SMTP, POP3, DNS, SNMP, Telnet
● Examples:
○ Web browsing (HTTP)
○ Sending emails (SMTP)
○ Resolving domain names (DNS)
● Real-World: Typing "[Link]" and clicking enter—your browser uses HTTP to
talk to Netflix servers.
● Key Misunderstanding: The application (Chrome, Outlook) is not the layer—it uses
protocols at this layer.

Key Summary: Application Layer (Layer 7 - OSI Model)


The Application Layer is the topmost layer in the OSI model and acts as the interface
between user applications and the network stack.

🧠 Main Functions

Function Description

User Interaction Where the user initiates communication with the network (e.g.,
sending an email, accessing a website).

Interface Provision Provides APIs and interfaces for applications (like browsers, FTP
clients) to interact with the operating system and network.

Resource Identifies communication partners and checks for available


Coordination system/network resources.

Protocol Interaction Interfaces with protocols like HTTP, FTP, TFTP—not actual user
apps (e.g., Chrome) but the services they rely on.

Error Recovery & Coordinates procedures for ensuring data integrity and error control
Integrity between apps.

💡 Clarifications & Misconceptions

Concept Clarification

Applications vs. Apps like Chrome or Word are not part of the Application Layer.
Application Layer They interface with it through protocols like HTTP, SMTP, etc.

Local Use of Apps Applications (e.g., Chrome) can be used offline for local files (like
.html) without needing the Application Layer.

Online Access When these apps attempt network activity (like loading a website
via HTTPS), they invoke Application Layer services.

🧩 Example Workflow: Opening a Webpage in Chrome

flowchart TD
A[User opens Chrome] --> B[Types URL: [Link]

B --> C[Chrome interfaces with HTTP/HTTPS protocol]

C --> D[Application Layer prepares request]

D --> E[Passes data to Presentation Layer & Transport Layers]

E --> F[Data sent over network]

Common Protocols at Application Layer

Protocol Purpose

HTTP/HTTPS Web browsing

FTP / SFTP / TFTP File transfers

SMTP / IMAP / POP3 Email transmission and retrieval

DNS Resolves domain names to IP


addresses

SNMP Network management

Telnet / SSH Remote access

🧠 Memory Aids
● 🔑 The Application Layer does not contain apps like Word or Chrome.

● 🎯 Instead, it supports communication services needed by those apps (e.g., send


email, retrieve files).

● It's activated only when networking is needed (not when viewing local files).

● 🤝 It determines who to talk to, if they’re available, and if there are enough
resources to communicate.

Real-Time Examples

Scenario Application Layer Role

Opening a website Uses HTTP/HTTPS via Chrome

Downloading a file Uses FTP or SFTP

Sending an email Uses SMTP

Using network printers Coordinates through client-server protocols

DNS Lookup Resolves domain names to IPs

🔁 Process Overview: Application Layer in Action


1. User Action Initiates Process (e.g., opening Outlook)

2. Application Invokes Network Function (e.g., send/receive email)

3. Application Interfaces with Application Layer Protocol (e.g., SMTP, IMAP)


4. Application Layer Determines Partner & Resources

5. Information is Passed Down the Stack

📝 Teaching Tip
Emphasize the difference between the applications the user interacts with (e.g.,
Chrome, Word) and the protocols and services in the Application Layer (e.g.,
HTTP, SMTP). Use analogies like:

● 🔌 The Application Layer is the translator that connects apps to the network,
not the app itself.

Layer 6: Presentation Layer


● What It Does: Translates, encrypts, and compresses data.
● Functions:
○ Translation: ASCII to EBCDIC
○ Encryption: TLS/SSL for HTTPS
○ Compression: JPEG, MP3
● Examples:
○ Watching YouTube (video compressed)
○ Logging into online banking (SSL/TLS encrypts session)
● Exam Tip: If the data is being made readable or secure, it’s Presentation.

Presentation Layer (Layer 6 – OSI Model)


The Presentation Layer is responsible for how data is formatted, translated, encrypted, and
compressed before it is delivered to (or received from) the Application Layer.

🧠 Main Functions

Function Description

Data Translation Converts data between formats (e.g., EBCDIC ↔


ASCII, Unicode ↔ ASCII) so systems can understand
each other.

Data Formatting Ensures the data is presented in a standard structure,


readable across different platforms.

Encryption/Decryption Secures data by encrypting before transmission and


decrypting after reception.

Compression/ Reduces the size of the data before transmission and


Decompression restores it afterward to save bandwidth.

🧩 Example Workflow: Sending an Encrypted Document

flowchart TD

A[App Layer: Email App creates document] --> B[Presentation Layer:


Formats file for transfer]

B --> C[Encrypts and Compresses document]

C --> D[Passes to Session Layer for transmission]

Real-Time Examples

Scenario Presentation Layer Role

Sending a secure email Encrypts the message content


Viewing a video stream Handles decompression and format compatibility

Reading an international Translates Unicode text


document

SSL/TLS handshake Works with encryption protocols to format data securely

Downloading a compressed file Compresses before sending; decompresses after


receiving

🎯 Memory Aids
● Think of the Presentation Layer as the “translator and formatter” for the network.

● 🔐 It ensures that what is sent = what is received and understood, securely and
efficiently.

● 📦 It wraps the data in the right format, much like packaging a gift box for transport.

🧩 Where Does It Fit?

Application Layer You use apps like Zoom, Chrome

⬇️

Presentation Layer 🎁 Formats, encrypts, compresses

⬇️

Session Layer 🔄 Starts/stops/manages connection


📋 Common Protocols/Standards Associated

Protocol/Standard Role

SSL/TLS Encrypts data in secure communications

JPEG, GIF, MP4 Multimedia format standards

MIME Email content encoding (e.g.,


attachments)

ASCII, EBCDIC, Unicode Character encoding standards

📝 Teaching Tip
Use the analogy of a translator at the UN: They ensure all delegates understand
the speaker, no matter the language. That’s what the Presentation Layer does for
computers—everyone speaks a different language, but still understands each
other.

🧠 Key Differences vs. Application Layer

Aspect Application Layer Presentation Layer

Deals With Application-specific services (e.g., email, Data formatting and translation
browsing)

Real Apps? No, but interacts with them No


Example Email client sends email Formats, encrypts that email
Role

Data Passes data to be sent Ensures data is in the right format


Handling and secure

Layer 5: Session Layer


● What It Does: Starts, maintains, and ends communication sessions.
● Functions:
○ Checkpoints for data recovery
○ Full/Half-duplex control
○ Tracks dialog between devices
● Examples:
○ A Zoom call (maintains session)
○ Multiple browser tabs = multiple sessions
● Protocols: NetBIOS, RPC, SQL sessions

Session Layer (Layer 5 – OSI Model)


The Session Layer is responsible for starting, managing, and ending sessions between
devices. It ensures that communication is organized, coordinated, and doesn’t get mixed up
when multiple applications are running.

🧠 Main Functions

Function Description

Session Sets up the connection between devices before data transfer


Establishment begins.
Session Maintains, manages, and monitors the data exchange session.
Maintenance

Session Properly closes the session after communication ends.


Termination

Dialogue Control Manages direction and timing of data flow: simplex, half-duplex, or
full-duplex.

Session Separation Keeps data streams from different applications isolated.

🔁 Communication Modes

Mode Direction Example

Simplex One way only Keyboard →


Computer

Half-Duplex Two-way, but one at a Walkie-talkie


time

Full-Duplex Two-way, simultaneously Phone call or video call

🧩 Example Workflow: Multiple Browser Tabs


mermaid

CopyEdit
flowchart TD

A[User opens 3 browser tabs] --> B[Each tab starts separate


session]

B --> C[Session Layer tracks each session independently]

C --> D[Keeps YouTube, Gmail, and Facebook data separate]

D --> E[Sessions terminated when tabs closed]

Real-Time Examples

Scenario Session Layer Role

Running multiple browser Keeps sessions distinct so Gmail data doesn’t end up in
tabs YouTube tab

Remote desktop session Manages start, communication, and end of session

Logging into a website Starts and maintains user session until logout

Video conferencing Maintains full-duplex session between participants

Online multiplayer gaming Coordinates persistent game sessions between players

🧠 Memory Aids
● 🧶 Think of the Session Layer as the "session manager"—like a receptionist who starts
and ends your meetings and ensures no two conversations get crossed.
● Useful when multiple programs or browser windows need to communicate
simultaneously without confusion.

● Handles who talks, when, and how in a digital conversation.

🧩 Where It Fits in OSI


plaintext

CopyEdit

Application Layer You click “Login”

⬇️

Presentation Layer Formats/encrypts your credentials

⬇️

Session Layer 🔄 Starts and maintains the login session

⬇️

Transport Layer 🚚 Sends data reliably

📝 Teaching Tip
Use the analogy of Zoom breakout rooms. Even though many sessions happen
simultaneously, each is separate, organized, and started/stopped independently.
That’s the Session Layer’s job.

🎯 Layer Comparison Recap (Layers 5–7)

Layer Name Key Role Example


7 Application Interfaces with user-facing software Gmail, Chrome

6 Presentatio Translates, compresses, encrypts JPEG, SSL


n data

5 Session Manages start/stop of Multiple browser tabs, RDP


conversations session

Layer 4: Transport Layer


● What It Does: Delivers data reliably or quickly using TCP or UDP.
● Key Concepts:
○ TCP = Reliable, handshake, acknowledgments (e.g., email, file download)
○ UDP = Fast, no handshake, best-effort (e.g., online gaming, VoIP)
● Real-World:
○ Downloading a file (TCP)
○ Zoom or WhatsApp call (UDP)
● Protocols: TCP, UDP
● Diagram: Show 3-way TCP handshake
● Ports:
○ HTTP: 80
○ HTTPS: 443
○ DNS: 53 (UDP/TCP)

Transport Layer (Layer 4 – OSI Model)


The Transport Layer is responsible for end-to-end communication,
segmentation/reassembly, reliable data transfer, and flow control. It acts as the backbone
for delivering data between devices across networks.

🧠 Main Functions
Function Description
Segmentation & Breaks data into smaller segments for transmission and
Reassembly reassembles them at the destination.

Logical Connections Creates virtual circuits between source and destination hosts.

Multiplexing Allows multiple applications to share the same transport


connection.

Reliable Delivery Uses acknowledgments, sequencing, and retransmission to


ensure error-free delivery (TCP).

Flow Control Prevents sender from overwhelming the receiver.

Error Handling Detects and corrects data loss or corruption.

🚦 Protocols at Transport Layer


Protocol Type Description

TCP (Transmission Control Connection- Reliable, ensures data delivery, ordered,


Protocol) oriented error-checked

UDP (User Datagram Connectionless Faster, no reliability, used for


Protocol) voice/video/gaming

🧩 Connection-Oriented Communication (TCP)


🧱 The 3-Way Handshake (TCP Session Setup)

sequenceDiagram
participant A as Host A (Sender)
participant B as Host B (Receiver)
A->>B: SYN (synchronize)
B->>A: SYN-ACK (synchronize + acknowledge)
A->>B: ACK (acknowledge)
Note over A,B: Connection established; data transfer begins

Step Action
1
1️⃣ Sender sends SYN to initiate connection

2️⃣ Receiver replies with SYN-ACK

3️⃣ Sender replies with ACK, completing handshake

🧵 Flow Control
Technique Description

Buffering Receiver stores incoming data temporarily to prevent overflow.

Stop/Go Receiver sends “Stop” if overwhelmed, and “Go” when ready again.
Signaling

Prevents Lost data, buffer overflows, congestion

🛑🟢 Real-Life Analogy
Like a traffic light at a toll booth: Red to pause, green to resume traffic flow.

📦 Windowing
Window size determines how much data (in bytes) can be sent before an acknowledgment
must be received.

Window Size Behavior

1 Sender sends one segment, waits for ACK

3 Sender sends three segments, waits for


ACK
mermaid
CopyEdit
graph LR
A[Sender sends segment 1] --> B[Waits for ACK]
A2[Sender sends segments 1-3] --> C[Waits for ACK after segment 3]
● If acknowledgment is delayed or missing, window size may be reduced.

● Windowing optimizes bandwidth by allowing multiple segments in transit.

✅ Acknowledgment & Retransmission


Step What Happens

1️⃣ Sender transmits segments 1, 2, 3

2️⃣ Receiver replies: "Got 1, 2, 3 – Send 4"

3️⃣ Sender sends 4, 5, 6

4️⃣ If segment 5 lost, receiver requests resend of


5

5️⃣ Sender resends segment 5

🔄 Reliable Delivery Ensures:


● Segments are acknowledged.

● Lost/damaged segments are retransmitted.

● Data arrives in the correct order.

⚖️TCP vs. UDP Comparison


Feature TCP UDP

Connection Connection-oriented Connectionless

Reliable Yes No

Sequencing Yes No

Acknowledgment Yes No
s
Flow Control Yes No

Speed Slower Faster

Use Case Email, web, file transfer Streaming, VoIP,


gaming

🔂 Transport Layer Workflow


flowchart TD
A[App Layer: Sends Data] --> B[Transport Layer: Segments Data]
B --> C[Creates Virtual Connection (TCP)]
C --> D[Adds Sequencing, ACK, Flow Control]
D --> E[Passes to Network Layer for Routing]
🧠 Memory Aids
● 🧩 "T" in TCP = Transport, Three-Way Handshake, Tracking Segments

● 💌 Think of Transport Layer as a courier service: labels, tracks, confirms delivery.

● It's the layer that ensures delivery is reliable, ordered, and complete—like certified
mail.

📝 Teaching Tip
Use the analogy of sending a multi-page legal document via courier:

● Each page = a data segment

● Courier requests a signature for each batch (ACKs)

● Only sends next batch when prior one is received (Windowing)

● Stops if mailbox full (Flow control)

● Retries delivery if lost (Retransmission)

🎯 Layer Comparison Recap (Layers 4–7)


Layer Name Role Key Feature

7 Application User interface Browser, email client

6 Presentatio Data formatting Encryption, compression


n

5 Session Session Login tracking, session control


management

4 Transport Reliable delivery TCP/UDP, flow control, ACKs

Layer 3: Network Layer


● What It Does: Handles IP addressing, routing, and logical path selection.
● Devices: Routers
● Protocols: IP, ICMP, OSPF, BGP, RIP
● Real-World:
○ Sending an email from the U.S. to India: IP packets routed across continents.
● Functions:
○ Adds source and destination IP
○ Fragmentation of packets if needed

The Network Layer

✅ What Is the Network Layer?


The Network Layer (Layer 3) is the part of a network that finds the best path for
your data to travel from one computer to another across multiple networks.

📬 Think of it like...
● Sending a package to a friend who lives in another city.

● You write their home address (IP) on the box.

● The post office (router) checks the address and picks the best roads to deliver it.

That’s exactly what the Network Layer does—but with data instead of boxes.

🧠 Core Responsibilities of the Network Layer

Responsibility What It Does Real-World Analogy

Logical Addressing Adds an IP address so devices Like writing a home address on


can be found on a network a letter

Routing Finds the best path to send data Like GPS for your data

Packet Forwarding Sends the data to the next stop Like passing a baton in a relay
on the path race

Fragmentation Breaks large data into smaller Like slicing a pizza so it fits in
packets boxes

Inter-Network Connects separate networks Like delivering between cities,


Communication not just within one house

🔑 Key Technical Concepts (Simplified)

Term What It Means Example / Analogy

LAN (Local Area A group of connected devices in a Your home or school network
Network) small area

WAN (Wide Area A big network made up of many The internet


Network) LANs

IP Address A unique number that identifies a Like a mailing address (e.g.,


device [Link])

MAC Address A unique hardware ID burned into Like a fingerprint—never


each device changes

Packet A chunk of data that travels across a Like a box with a label
network

Router A device that reads the IP address Like a post office or GPS
and sends data system
Routing Table A list inside a router that shows the Like Google Maps directions
best directions

Broadcast Domain An area where messages are sent Like a school intercom
to all devices

Collision Domain An area where data "collides" if sent Like two people talking over
at the same time each other

Frame A data container at Layer 2 (Data Like the box that holds the
Link) packet inside

Interface A router’s network port Like a road that leads to a


neighborhood

🎓 PDU: Protocol Data Unit

OSI Layer PDU Name Description

Layer 3 (Network) Packet Holds the IP address and Layer 4


segment

Layer 2 (Data Link) Frame Holds the packet and MAC addresses

Layer 1 (Physical) Bits Electrical or optical signals

📦 Packet Workflow: How a Router Delivers Data


flowchart TD

A[Device creates data to send] --> B[Transport Layer adds port


numbers]

B --> C[Network Layer adds IP addresses → creates a packet]

C --> D[Data Link Layer wraps it in a frame with MAC addresses]

D --> E[Sent to router]

E --> F[Router reads IP address and checks routing table]

F --> G{Is destination known?}

G -- Yes --> H[Router forwards packet to next router or device]

G -- No --> I[Packet is dropped]

Two Types of Packets Used

Type Purpose Examples

Data Packets Carry user data (like a message or IP, IPv6


file)

Route-Update Help routers share routing info RIP, OSPF,


Packets EIGRP

📚 Important Protocols at Layer 3

Protocol Type Description


IP (Internet Protocol) Routed Delivers data using IP addresses

IPv6 Routed Newer version of IP, supports more


addresses

RIP, RIPv2 Routing Shares routes using hop count

OSPF Routing Shares routes using shortest path algorithm

EIGRP Routing Cisco's advanced routing protocol

🖧 Router Routing Table Example

Destination Network Next Hop Exit Interface Metric

[Link]/24 [Link] Gig0/1 1

[Link]/8 Direct Gig0/0 0

📘 The router checks this table to decide where to send a packet.

🌍 Real-Life Scenario #1: Visiting a Website


1. You type [Link] on your phone.

2. Your phone gets the IP address of the site.

3. The Network Layer puts that IP in a packet.


4. Your router checks the routing table.

5. The packet travels through multiple routers across the internet.

6. The website responds, and your phone shows the page.

🏫 Real-Life Scenario #2: Printing from a Laptop to a Lab


Printer
● Your laptop and printer are in different LANs (e.g., 1st floor and 2nd floor).

● The router checks its routing table and uses the IP address to forward the packet to the
right floor.

● The printer gets your file and starts printing.

🎯 Summary Table – What the Network Layer Does

Function Layer Example

Assigns IP addresses Layer 3 [Link]

Sends packets across Layer 3 Visiting a website


networks

Chooses best route Layer 3 Google Maps-like routing

Uses routers Layer 3 device Home or school router

Adds packet header Layer 3 PDU Packet with IP addresses


🧠 Easy Memory Tricks

Trick Helps Remember

🧭 Network = Navigation Picks the best route for data

Router = Mail sorter Reads address and sends


packet

🧾 IP = Mailing address Used to find devices anywhere

📦 Packet = Box Carries data from place to


place

🏠 MAC = Fingerprint Unique to each device

📬 LAN = Your house Devices in same building

❗Final Tips
● The Network Layer uses IP addresses to send data between different networks.

● Routers live at this layer and use routing tables to figure out where to send packets.

● The packet is the PDU of this layer—think of it as a delivery box with a GPS address.

● Routers don’t forward broadcast messages—they reduce unnecessary traffic.

● Without Layer 3, the internet wouldn’t work—you’d only be able to talk to devices in your
own home or school!
The Network Layer is responsible for delivering data across multiple networks. It adds an IP
address to every piece of data so routers can figure out where to send it.

Real-world analogy: Sending a package with a home address and having it delivered through
different post offices (routers).

💡 Core Responsibilities

Task What It Does Analogy

Logical Addressing Adds IP address to identify sender & Like a house number
receiver

Routing Finds the best path across networks Like a GPS

Packet Forwarding Passes data from one device/router to Like handing off a
another package

Fragmentation Breaks big data into smaller parts Like slicing a pizza

Inter-networking Connects separate networks Like connecting cities

🔎 Key Terms Simplified

Term Definition Analogy

LAN Local Area Network (small network) Home Wi-Fi

WAN Wide Area Network (large network) The Internet


IP Address Logical address of a device Mailing address

MAC Address Unique hardware ID Device fingerprint

Packet A data "box" that travels over networks Package with label

Frame Container for packet at Layer 2 Outer box with MAC address

Router Forwards data using IP addresses Post office or GPS

Routing Table Map inside router Google Maps directions

🎨 Protocol Data Units (PDU)

Layer PDU Content

3 (Network) Packet Contains IP address +


data

2 (Data Link) Frame MAC addresses + Packet

1 (Physical) Bits Electrical signals or light

📝 Router Behavior Flow


1. Router receives a frame.
2. It removes the frame and reads the IP address in the packet.
3. It checks its routing table.
4. If a match is found, it forwards the packet.
5. If not, it drops the packet.

Two Types of Layer 3 Packets

Type Purpose Example

Data Packets Carry user messages IP, IPv6

Route Share paths between RIP, OSPF,


Updates routers EIGRP

📈 Important Layer 3 Protocols

Protocol Type Function

IP / IPv6 Routed Sends data using


IP

RIP Routing Hop-based route


selection

OSPF Routing Shortest path


routing

EIGRP Routing Advanced routing


(Cisco)
📚 Real-World Scenarios
1. Visiting a Website

● You type a URL.


● Your device adds an IP address to a packet.
● The router checks its routing table and forwards the packet through the internet.

2. Printing to a School Printer on Another Floor

● Your device is in LAN A.


● The printer is in LAN B.
● The router finds the right path and sends your print job.

🪨 Recap Table

Feature Network Layer Role

IP Addressing Used to identify source and


destination

Routing Path selection for data travel

Routers Devices that operate at Layer 3

Packets Data format used at this layer

Routing Table Used to guide packet delivery

🤔 Memory Tricks
● IP = Home address
● 🤷🏼 Router = Mail sorter
● 📎 Routing Table = Google Maps
● Packet = Box on the move
● 🏠 LAN = House | WAN = City

Layer 2: Data Link Layer


● What It Does: Adds MAC addresses, frames data for transmission.
● Sublayers:
○ MAC: Physical addressing
○ LLC: Interacts with Network layer
● Devices: Switches, NICs
● Protocols: Ethernet, PPP, Frame Relay
● Functions:
○ Error detection (CRC)
○ Flow control
● Real-World: Your laptop sends a frame with the router's MAC address.

What Is the Data Link Layer?


The Data Link Layer ensures that data is sent correctly between devices on the same local
network (LAN). It takes the data from the Network Layer and wraps it up into a frame. It also
uses MAC addresses to identify which device the data should go to.

Real-world analogy: Like writing the name of the student on a note being passed in class. The
name is the MAC address.

💡 Core Responsibilities

Task What It Does Analogy

Physical Uses MAC addresses to deliver Like putting a name tag on a gift
Addressing data

Framing Wraps data into "frames" Like putting your message in an


envelope

Error Detection Detects errors (but doesn't fix Like checking if a page is torn
them)
Flow Control Prevents flooding of data Like traffic lights controlling traffic

Media Access Controls who sends data when Like taking turns in a conversation

🔎 Key Concepts

Term Meaning Example

MAC Address A device's hardware address Looks like 00:1A:2B:3C:4D:5E

Frame The data container at Layer 2 Like an envelope holding a letter

LAN Local Area Network Home Wi-Fi or school network

Router Works at Layer 3; doesn’t use MAC Uses IP addresses instead

Switch Uses MAC addresses to forward Sends frame only to the correct
data device

📰 Frame Creation & Delivery


● Data arrives from the Network Layer (Layer 3).
● Data Link Layer creates a frame.
● Adds source and destination MAC addresses.
● Sends frame to the Physical Layer (Layer 1).
● The receiver checks the MAC address to see if the frame is for them.

Note: At every router, the old frame is removed and a new frame is created for the next hop.
But the original packet from Layer 3 remains unchanged.
Sublayers of the Data Link Layer

Sublayer Role

MAC (Media Access Handles how devices place data on the wire or Wi-Fi. Adds MAC
Control) addresses. Controls access to shared media.

LLC (Logical Link Identifies which Network Layer protocol is being used (like IP).
Control) Helps with flow control and managing errors.

📈 Project 802 Standards (IEEE)


Created by the Institute of Electrical and Electronics Engineers (IEEE) to standardize local
networks.

Standard Purpose

802.1 LAN management and MAC bridges

802.2 LLC sublayer definition

802.3 Ethernet (uses CSMA/CD) ⬆️

802.4 Token passing bus

802.5 Token ring

802.6 Metropolitan Area Network (DQDB)


802.11 Wireless LAN (Wi-Fi) ⬆️

802.15 Wireless Personal Area Network


(Bluetooth) ⬆️

802.16 WiMAX (wireless MAN)

802.17 Resilient packet ring

✅ Active and common standards: 802.3 (Ethernet), 802.11 (Wi-Fi), 802.1 (Switching), 802.15
(Bluetooth)

Real-World Scenario: School Network


● You click "Print" on your Chromebook.
● The Data Link Layer wraps your data into a frame.
● It includes your MAC address and the printer's MAC address.
● A switch reads the frame and sends it only to the printer.
● If you send the file again, and the printer is busy, flow control ensures you don’t
overwhelm it.

🎓 Summary Table

Feature Data Link Layer Role

MAC Addressing Used to identify devices on the same LAN

Frame Container for sending data at Layer 2

Error Detection Checks for corruption (not correction)

Flow Control Regulates data flow to prevent overload

Sublayers MAC and LLC handle different functions

🤔 Memory Tricks
● 🏠 LAN = Home or school Wi-Fi
● 🧠 MAC = Machine's name tag
● 📎 Frame = Envelope
● 🤷 Switch = Traffic officer
● Ethernet = 802.3 | Wi-Fi = 802.11

Layer 1: Physical Layer


● What It Does: Moves bits over cables or air.
● Media: Cables (Cat5, fiber), wireless, radio waves
● Devices: Hubs, repeaters
● Signals: Light, electrical pulses, RF
● Real-World: Plugging an Ethernet cable transfers 1s and 0s using voltage.

What Is the Physical Layer?


The Physical Layer is the bottom layer of the OSI model. It is responsible for the actual
movement of data as electrical signals, light, or radio waves.

Think of it as the cables, Wi-Fi signals, and connectors that make network
communication possible.

Real-world analogy: Like the roads and highways that cars (data) travel on. Without them,
nothing moves!

💡 Core Responsibilities

Task What It Does Analogy

Bit Sends 1s and 0s (bits) over a wire Like Morse code beeps over a
Transmission or air phone line

Encoding Turns bits into signals Like translating letters into sound or
light

Physical Moves data across copper wire, Like a road or pipe carrying vehicles
Medium fiber, or air or water

Connector Defines plugs and cables Like USB, Ethernet, fiber-optic plugs
Types

Topology Describes how cables/devices are Like building a city map


laid out
🪧 What Travels on the Physical Layer?
● Bits: The smallest form of data—just 1s and 0s.
● These are not yet packets or frames—just raw signals!
● Different media send these bits in different ways:
○ Wires: Voltage changes
○ Fiber optic: Light pulses
○ Wi-Fi: Radio waves
○ Audio cables: Tones (in old modems)

🧳 Media Examples

Medium Signal Type Example

Twisted Pair (Ethernet) Electrical LAN cables (Cat5e, Cat6)

Fiber Optic Light pulses Internet backbone cables

Wireless (Wi-Fi) Radio waves Home routers

Coaxial Electrical Cable TV internet

🛏 Physical Layer Devices

Device Description

Hubs Repeats data to all connected devices

Cables Physically connect devices


Connectors Attach cables to ports (RJ45, USB)

Modems / CSU/DSU Converts digital to analog (or vice versa)

🏠 Topologies: How Devices Are Physically Connected

Topology Description Analogy

Bus All devices share one main cable Like a hallway with rooms off the
side

Star All devices connect to a central hub or Like spokes on a bicycle wheel
switch

Ring Devices form a closed loop Like a racetrack

Mesh Devices connect to many others Like roads connecting every house

Note: These are physical topologies—the actual cable layout, not the data path
(which is logical).

🔎 DTE vs DCE

Term Description Example

DTE Data Terminal Equipment – the end device A computer or


router
DCE Data Communication Equipment – provides access to the A modem or switch
network

Real-Life Scenario
You plug your laptop into an Ethernet cable:

● The Physical Layer uses the cable and connector to send electric signals.
● Those signals carry bits (1s and 0s).
● These bits are received by the switch or router.
● The next layer (Data Link) takes those bits and builds them into frames.

🤖 Summary Table

Feature Physical Layer Role

Transmits Bits Raw 1s and 0s across media

Uses Physical Medium Wires, fiber, Wi-Fi

Topology Layout of the network cables

Devices Cables, hubs, modems,


connectors

Encodes Signals Converts digital data into signals

💫 Memory Tricks
● 📀 Physical = Plugs, cables, and light
● 🚗 Bits = Cars on a highway
● 🌌 Fiber optic = Laser flashes
● 🪓 Topology = Network road map
● 🌐 Wi-Fi = Radio station for data

🧱 Frames vs Packets vs Bits

Feature Bits Packets Frames

OSI Layer Layer 1 – Physical Layer 3 – Network Layer 2 – Data Link

Purpose Raw transmission over Routing through Local delivery over a


medium networks physical link

Format Stream of 1s and 0s Header + Payload Header + Trailer +


(binary) Payload

Examples 01101101... IP packet (e.g., with Ethernet frame (e.g., with


IP address) MAC address)

Visible Content Not human-readable Includes IP Includes MAC


addresses addresses, CRC
checksum

Encapsulation Physical signal Encapsulated inside Encapsulates the packet


(electrical, optical, RF) frames

Device NIC, cables, fiber optics Routers Switches, NICs


Concerned
I Layer Protocol Data Unit (PDU)

Layer 7 – Application Data

Layer 6 – Data
Presentation

Layer 5 – Data
Session

Layer 4 – Transport Segment

Layer 3 – Network Packet

Layer 2 – Data Link Frame


Layer 1 – Physical Bits

🔁 Repeater vs Bridge

Feature Repeater Bridge

OSI Layer Layer 1 – Physical Layer 2 – Data Link

Function Amplifies/regenerates signal Connects two LAN segments; filters


by MAC

Traffic Filter ❌ No filtering ✅ Filters traffic using MAC


addresses

Collision Extends existing one Segments collision domains


Domain

Use Case Extend signal range (e.g., beyond Reduce traffic or connect networks
100m) logically

Ports Typically 2 2 or more

🔌 Hub vs Switch vs Router vs Gateway vs NIC vs Modem

Feature Hub Switch Router Gateway NIC Modem


OSI Layer Layer 1 – Layer 2 Layer 3 – Layers 4–7 Layer 1/2 – Layer 1 –
Physical – Data Network (often multi- Physical/Data Physical
Link layered) Link (some
Layer 2–3
logic)

Purpose Broadcas Forward Routes Converts Connects Converts


ts signal s packets between device to digital ↔
to all frames between protocols network analog
to networks (e.g., IP ↔ (ISP
specific VoIP) connecti
MACs on)

Intelligenc ❌ Dumb ✅ ✅ Smarter: ✅ Very ✅ Has MAC ✅ Knows


e device Smart: Uses IP & smart: address & line
Learns routing protocol handles signals &
MAC tables conversion frames encodes
addres data
ses

Traffic None Efficient Best path Protocol Depends on Encodes


Control switchin determinatio translation driver and
g n decodes
data

Broadcast Yes No No No No No
s? (unicast
mostly)

Use Case Legacy Modern Home/ Interconnecti Every DSL/


small LAN business ng different networked Cable
LAN switchin internet architectures computer/devi Internet
g routing ce access

🧠 Easy Memory Hints


● Repeater: Boosts signal. Think “signal booster.”

● Bridge: Divides LAN logically.

● Hub: Like a party megaphone — everyone hears everything.

● Switch: Whisper to the right person — smarter communication.

● Router: Like a GPS — finds best path using IP.

● Gateway: Like a translator between two foreign languages/protocols.

● NIC: Your network ID badge — lets you on the network.

● Modem: Internet entry gate — translates signals from ISP.

📦 Real-World Example
Let’s say you send an email:

1. Application Data (like an email message)

2. Becomes a Segment at the Transport Layer (Layer 4)

3. Becomes a Packet at the Network Layer (Layer 3) → IP header is added

4. Becomes a Frame at the Data Link Layer (Layer 2) → MAC addresses added

5. Becomes Bits at the Physical Layer (Layer 1) → transmitted over the wire as 1s
and 0s

Part 4: Encapsulation/Decapsulation (25 minutes)


● Definition: Each OSI layer adds headers to data as it moves down the stack.
● Process:
1. Data → Layer 7
2. Encapsulated by each layer down to Layer 1
3. Sent over media
4. Received and decapsulated up the stack
● Activity: Paper model of headers; pass “data” across room
Part 5: Real-Life Troubleshooting Examples (20 minutes)
● DNS lookup fails = Layer 7
● IP address misconfigured = Layer 3
● Port issue = Layer 4
● MAC not found = Layer 2
● Cable unplugged = Layer 1

Part 6: Knowledge Check Questions (10)


1. What layer handles encryption?
2. Which layer assigns IP addresses?
3. Name a Layer 2 device.
4. Which protocol operates at Layer 7?
5. What is the main task of Layer 4?
6. What’s the purpose of TCP handshaking?
7. What is the job of Layer 5?
8. Which layer ensures data is readable?
9. What happens at Layer 1?
10. Which layer is responsible for routing?

Part 7: 10 OSI Facts to Memorize


1. DNS works at Application (Layer 7)
2. SSL/TLS = Presentation (Layer 6)
3. Session Layer controls dialogs
4. TCP vs UDP = Transport Layer
5. IP routing = Network Layer
6. MAC addressing = Data Link Layer
7. Switches = Layer 2, Routers = Layer 3
8. Bits and signals = Physical Layer
9. TCP uses handshake; UDP doesn’t
10. Encapsulation = every layer adds headers

Layer Devices Services/ Protocols Common


Functions Ports

7 - Application Web servers, Email Network-based HTTP, HTTPS, FTP, 80, 443, 21,
servers, DNS applications, file TFTP, SMTP, POP3, 20, 25, 110,
servers, transfers, email, IMAP, DNS, SNMP, 143, 53, 161,
Workstations browsing Telnet, SSH, NTP, LDAP, 23, 22, 123,
RDP, SIP, BitTorrent, BGP 389, 636,
Monitoring 3389, 5060,
5061

6 - Presentation Proxies, Application Data translation, SSL, TLS, JPEG, MPEG, Handled at
gateways encryption/decryptio MP3, ASCII, EBCDIC, layer 7
n, compression GIF, XML, JSON, YAML,
BSON, Avro

5 - Session Gateways, Session control, NetBIOS, PPTP, RPC, 137-139, 1723


Application servers authentication, NFS, SMB, ASP, SAP,
dialog control SOCKS

4 - Transport Firewalls, Load Reliable delivery, TCP, UDP, SCTP, DCCP, All TCP/UDP
balancers segmentation, flow QUIC, RSVP ports including
control 443, 80, 20,
21, 53, 110,
3389, 3306

3 - Network Routers, Layer 3 Routing, logical IP, ICMP, IGMP, IPSec, ICMP (N/A),
switches, Firewalls addressing, path GRE, MPLS, RIP, OSPF, RIP (520)
determination BGP, IS-IS, EIGRP

2 - Data Link Switches, NICs, MAC addressing, Ethernet, ARP, PPP, N/A
Bridges, Access framing, error HDLC, Frame Relay, STP,
Points detection VLAN, L2TP, CDP, LLDP

1 - Physical Hubs, Repeaters, Transmission of IEEE 802.3, RS-232, RS- N/A


Cables, Connectors, bits, 485, V.35, DOCSIS, DSL,
Modems electrical/optical SONET, Bluetooth (PHY),
signaling USB, Wi-Fi (PHY)
Vocabulary Terms & Definitions
Term Definition

Encapsulation The process of adding information (like headers) to data as it


moves in a network

OSI Model A seven-layer framework that describes how data travels in a


network

Protocol Data Unit The name for data at each OSI layer
(PDU)

Header Extra information added at the beginning of data to help with


delivery

Trailer Extra information added at the end of data (often for checking
errors)

Segment The name for data at the transport layer

Packet/Datagram The name for data at the network layer


Frame The name for data at the data link layer

Bit The smallest unit of data: a 1 or 0

Clocking A method to make sure the sender and receiver are in sync while
sending bits

Encoding Converting digital data into signals that can travel through a
wire/fiber

Background and Introduction (10 minutes)


Start the lesson by asking students:

"Have you ever sent a message online and wondered what happens behind the
scenes?"

Explain: When you send a message over the internet (like a text or email), that data doesn’t just
jump from your computer to someone else’s. It travels through a network in a very organized
way. This process is called encapsulation.

Use the analogy of sending a package:

● The gift = user data


● You put it in a box (add a header)
● You add the address label (network header)
● You seal the box (trailer)
● A mail carrier (network medium) delivers it

Just like that, data gets wrapped and labeled as it moves through each layer of the OSI model!

Teacher Script with Detailed Layer-by-Layer Explanation (25 minutes)


Step 1: User Data (Application Layer – Layers 7 to 5)

● This is where YOU, the user, create the data. Maybe you're typing an email or uploading
a video.
● At these layers, the computer prepares your message to be sent. It understands what
app you’re using (email, browser) and prepares it accordingly.
● Think of this step as writing the message and getting it ready to send.

Step 2: Segment (Transport Layer – Layer 4)

● Your message might be large. The Transport Layer breaks it into smaller pieces called
segments.
● It also adds a "return address" by including source and destination port numbers.
● It might include information to make sure nothing is lost and all pieces arrive correctly.
● Analogy: You’re sending a big book, so you break it into chapters and label each one.

Step 3: Packet (Network Layer – Layer 3)

● Each segment is wrapped in a packet.


● The packet includes IP addresses of the sender and receiver.
● These addresses are used by routers to deliver your message.
● Analogy: Writing the sender and receiver’s street addresses on the box.

Step 4: Frame (Data Link Layer – Layer 2)

● Each packet is now placed into a frame.


● A frame contains MAC addresses (unique IDs for each physical device on the local
network).
● A trailer might be added to check for errors.
● Analogy: Putting your package on a delivery truck that knows the neighborhood.

Step 5: Bits (Physical Layer – Layer 1)

● Now, the frame is converted into 1s and 0s.


● These binary digits are sent as electrical signals (for wires), light pulses (for fiber), or
radio waves (for wireless).
● Encoding helps convert the frame into the right signal.
● Clocking ensures the sender and receiver are in sync – like clapping at the same time.
● Analogy: The truck drives and drops the package at the right mailbox at the right time.

Visual Aid: Data Encapsulation Flow Diagram


+--------------------------+
| Application Data | (L7-L5: App, Presentation, Session)
+--------------------------+

+--------------------------+
| Segment (Port Numbers) | (L4: Transport)
+--------------------------+

+--------------------------+
| Packet (IP Addresses) | (L3: Network)
+--------------------------+

+--------------------------+
| Frame (MAC, Trailer) | (L2: Data Link)
+--------------------------+

| 101011010101... | (L1: Physical Bits with encoding)

Class Activity: OSI Layer Role Play (10 minutes)


Setup:

● Give 7 students a role (one for each OSI layer).


● Start with a message like "Hello!" written on paper.
● Each student adds their layer's information (using sticky notes):
○ Application adds "Data Type: Text"
○ Transport adds "Port 80"
○ Network adds "IP: [Link]"
○ Data Link adds "MAC: A1:B2:C3"
○ Physical converts the whole thing to a string of 1s and 0s

This makes the process physical and fun!

Formative Assessment / Questions (5 minutes)


1. What does the transport layer do with your data?
2. What is the purpose of a packet?
3. Which layer turns data into binary bits?
4. What does encoding do?
5. What is a PDU?

Answers:

1. It breaks it into segments and adds port info.


2. It wraps the segment with IP addresses for routing.
3. Layer 1 (Physical Layer)
4. Converts data into signals (electrical, light, etc.)
5. Protocol Data Unit – data at each OSI layer
Homework Assignment
Write a story from the point of view of a message being sent through a network.
Include what each OSI layer does to you (like characters in your journey). Example
start: "Hi, I’m a message. Today, I left my sender at the Application layer..."

Common Misconceptions and Clarifications


Misconception Clarification

All data is sent as one big chunk Data is broken down into segments and packets to
make transmission manageable

Only the sender does the Both sender and receiver perform encapsulation
encapsulation and decapsulation

Bits are just random 1s and 0s Bits are precisely timed signals using encoding
schemes to represent data

MAC and IP addresses are the same IP is for network-wide addressing; MAC is for local
device identification

The OSI layers are just theoretical and While abstract, the OSI model helps design and
not practical troubleshoot real networks

Data goes back up through the same Yes! This is called decapsulation and happens on
OSI layers in reverse the receiving end

Conclusion
Review how each OSI layer adds its piece to the puzzle:

● Layers = workers
● Each worker adds information
● Together, they deliver your message safely!

🔍 What is ARP (Address Resolution Protocol)?


ARP (Address Resolution Protocol) is a network protocol used to map an IP address to a
MAC address on a local area network (LAN).
🧠 Simple Explanation
ARP helps devices find each other on a LAN by translating IP addresses (used
by software) into MAC addresses (used by hardware like network cards).

🧩 How ARP Works (Step-by-Step)


Imagine Computer A wants to send data to [Link], but only knows the IP address:

1. ARP Request:
Computer A broadcasts:
👉 "Who has IP [Link]? Tell me your MAC address!"

2. ARP Reply:
Computer B (with IP [Link]) replies directly:
👉 "I’m [Link]. My MAC address is AA:BB:CC:DD:EE:FF."

3. Cache Result:
Computer A saves this in its ARP cache to avoid asking again soon.

🧾 ARP Table (or Cache)


Each device maintains an ARP table that stores mappings like:

IP Address MAC Address

[Link] 00:0c:29:3e:53:0f

[Link] aa:bb:cc:dd:ee:ff

You might also like