Lecture 6, 7 & 8
Lecture 6, 7 & 8
February 8, 2025
Learning Objective
Protocol Layering
TCP/IP Model
The OSI Model
2
PROTOCOL LAYERING
Protocol layering is a design approach in computer networks where
communication is broken down into multiple layers.
Each layer performs a specific function and communicates with
adjacent layers.
3
Protocol Layering
For simple scenario: We may need a single layer (one
simple protocol)
4
Protocol Layering
For complex scenario: Protocol Layering is required
5
Principles of Protocol Layering
The first principle dictates that
if we want bidirectional
communication, we need to
make each layer so that it is Identical Objects
7
Examples of Protocol Layering
1. OSI Model
2. TCP/IP Model
8
The OSI Model
The OSI (Open Systems Interconnection) Model is a
conceptual framework that describes how data travels
from one device to another over a network.
An open system is a set of protocols that allows any two different
systems to communicate regardless of their underlying architecture.
The purpose of the OSI model is to show how to facilitate
communication between different systems without requiring changes
to the logic of the underlying hardware and software.
9
The OSI Model
The OSI model is not a protocol; it is a model for understanding and
designing a network architecture.
The OSI model is composed of seven ordered layers: physical (layer 1),
data link (layer 2), network (layer 3), transport (layer 4), session (layer
5), presentation (layer 6), and application (layer 7).
10
End-to-End message exchange
using the OSI Model
Application Layer
Presentation Layer
Session Layer
Transport Layer
Network Layer
Data Link Layer
Physical Layer
11
D7 means the data unit at layer 7, D6 means the data unit at layer 6,
and so on. The process starts at layer 7 (the application layer), then
moves from layer to layer in descending, sequential order.
At each layer, a header, or possibly a trailer, can be added to the data
unit. Commonly, the trailer is added only at layer 2.
When the formatted data unit passes through the physical layer (layer
1), it is changed into an electromagnetic signal and transported along
a physical link.
12
Upon reaching its destination, the signal passes into layer 1 and is
transformed back into digital form. The data units then move back up
through the OSI layers.
As each block of data reaches the next higher layer, the headers and
trailers attached to it at the corresponding sending layer are removed,
and actions appropriate to that layer are taken.
By the time it reaches layer 7, the message is again in a form
appropriate to the application and is made available to the recipient.
13
Brief History of the OSI Model
1970s – Different networking systems used proprietary protocols, making
communication between different manufacturers' devices difficult.
1977 – The International Organization for Standardization (ISO) started
working on a standard model for network communication.
1983 – The OSI model was introduced with 7 layers to provide a structured
way of networking.
1984 – The OSI model was officially published as an international standard
(ISO 7498).
Present – While the TCP/IP model is more widely used, the OSI model
remains a fundamental reference for understanding and designing
networks.
14
Why was it created?
15
Description of each layer
We briefly describe the functions of each layer in the
OSI model.
1. Physical Layer
2. Data Link Layer
3. Network Layer
4. Transport Layer
5. Session Layer Application Layer for TCP/IP Model
6. Presentation Layer
7. Application Layer
16
Physical Layer (Layer 1)
The Physical Layer is the lowest layer of the OSI model.
It is responsible for the actual transmission of raw bits (0s and 1s)
over a communication medium.
17
Key Functions: Physical Layer
Bit Transmission – Converts digital data into electrical, optical, or radio
signals for transmission.
Defines Transmission Medium – Specifies the physical connection, such
as cables (Ethernet, fiber optics) or wireless signals (Wi-Fi, Bluetooth).
Data Rate Control – Determines how fast data is transmitted (measured
in Mbps or Gbps).
Synchronization – Ensures sender and receiver are in sync for accurate
data transmission.
Topology & Wiring – Defines network layout (e.g., Bus, Star, Mesh) and
connector types.
18
Examples of Physical Layer
Technologies
Ethernet cables (Cat5, Cat6) – Wired network
communication.
Fiber optics – High-speed data transfer over long
distances.
Wi-Fi & Bluetooth – Wireless communication.
Example:
When you send an email, the Physical Layer converts the data
into electrical signals and transmits it through cables or
wireless signals to reach the receiver.
19
Data Link Layer (Layer 2)
The Data Link Layer is the 2nd layer of the OSI model.
It ensures reliable communication between devices on
the same network (local link) by organizing raw data
into frames and handling error detection and correction.
20
Key Functions: Data Link Layer
Framing – Converts raw bits into structured frames for transmission.
Error Detection & Correction – Identifies errors in data transmission
using techniques like CRC (Cyclic Redundancy Check).
Flow Control – Prevents fast senders from overwhelming slow
receivers.
MAC Addressing – Uses MAC (Media Access Control) addresses to
identify devices in a network.
Media Access Control – Manages how multiple devices share the
same communication medium (e.g., Ethernet, Wi-Fi).
21
Examples of Data Link Layer Technologies
Ethernet (IEEE 802.3) – Wired LAN communication.
Wi-Fi (IEEE 802.11) – Wireless network communication.
PPP (Point-to-Point Protocol) – Used for direct
communication between two network nodes.
Example:
When you connect your laptop to Wi-Fi, the Data Link Layer
ensures your data frames are sent without collision and reach
the correct device in the local network.
22
Lecture # 7
February 11, 2025
Network Layer (Layer 3)
The Network Layer is the 3rd layer of the OSI model.
The network layer is responsible for the delivery of individual packets
from the source host to the destination host.
24
Key Functions: Network Layer
Logical Addressing (IP Addressing) – Assigns unique IP addresses to
devices for identification.
Routing – Finds the best route for data packets to travel between
networks.
Packet Forwarding – Moves packets from one network to another
using routers.
25
Examples of Network Layer Technologies &
Protocols
IP (Internet Protocol - IPv4/IPv6) – Defines addressing and routing.
ICMP (Internet Control Message Protocol) – Used for error messages (e.g., ping
command).
ICMP (Internet Control Message Protocol) is a network layer protocol used for diagnostics
and error reporting in computer networks. It helps devices communicate issues related to
network connectivity and performance
Ping is a network utility tool that uses ICMP (Internet Control Message Protocol) to test
connectivity between devices.
Routers – Devices that operate at the Network Layer to forward data between
networks.
Example:
When you open a website, the Network Layer uses IP addresses to send your request from
your computer to the web server, ensuring the data takes the most efficient path.
26
Transport Layer (Layer 4)
The Transport Layer is the 4th layer of the OSI model.
The transport layer ensures that messages (data) are delivered from
one process (running application) on one device to the correct
process on another device
27
Key Functions: Transport Layer
Segmentation & Reassembly – Divides large data into smaller
segments and reassembles them at the destination.
Reliable & Unreliable Transmission – Uses TCP (reliable) or UDP
(unreliable) based on the application's needs.
Error Detection & Recovery – Ensures data is received correctly,
requesting retransmission if needed.
Multiplexing & Demultiplexing – Allows multiple applications to
communicate over the network simultaneously using port numbers.
28
Examples of Transport Layer Protocols
TCP (Transmission Control Protocol) – Provides reliable and ordered
data delivery (e.g., web browsing, emails).
UDP (User Datagram Protocol) – Provides fast but unreliable
transmission (e.g., video streaming, VoIP calls).
Example:
When you download a file, TCP ensures that all packets arrive in the correct
order, and if any packet is lost, it requests a retransmission to ensure
complete delivery.
29
Lecture # 8
February 15, 2025
Session Layer (Layer 5)
The Session Layer is the 5th layer of the OSI model.
The session layer is responsible for dialog control and synchronization.
31
Key Functions: Session Layer
Establishing, Managing, and Terminating Sessions – Creates and closes
communication sessions between applications.
Synchronization – Inserts checkpoints in data streams to resume
transmission in case of failure.
Dialog Control – Manages duplex communication (who talks when –
full-duplex or half-duplex).
32
Example of Session Layer
Online Banking
You log in to your bank's website.
The session layer creates a secure session between your browser and the bank’s server.
Video Calls (Zoom, Skype)
The session layer ensures that both users can send and receive audio/video smoothly.
It synchronizes the conversation so both people hear each other properly without
interruptions.
PPTP (Point-to-Point Tunneling Protocol)
Establishes VPN (Virtual Private Network) connections by creating secure communication
sessions.
Example: Used in corporate VPNs to connect remote employees securely.
33
Well-Known Session Layer Protocols
NetBIOS (Network Basic Input/Output System) – Provides services for
network communication, including name resolution and session
establishment.
RPC (Remote Procedure Call) – Allows programs to request services
from other programs over a network.
PPTP (Point-to-Point Tunneling Protocol) – Used for implementing
VPNs (Virtual Private Networks).
34
Presentation Layer (Layer 6)
The Presentation Layer is the 6th layer of the OSI
model.
The presentation layer is responsible for translation,
compression, and encryption.
35
Key Functions: Presentation Layer
Data Translation – Converts data into a format that both
sender and receiver can understand (e.g., ASCII,
Unicode, JPEG, MP3).
Data Compression – Reduces the size of data for faster
transmission (e.g., ZIP, MP4).
Data Encryption & Decryption – Ensures secure
communication by encrypting data before transmission
and decrypting it upon reception (e.g., SSL/TLS).
36
Examples of Presentation Layer Protocols
JPEG, PNG – Image compression formats.
MP3, MP4 – Audio & video compression.
SSL/TLS – Encrypts web traffic for secure browsing
Example-1:
You send an email with confidential information.
The presentation layer encrypts the email before sending it.
The receiver’s presentation layer decrypts it so they can read the
message.
Example-2: When you watch a YouTube video, the
Presentation Layer compresses and formats the video so it
loads smoothly while maintaining quality.
37
Application Layer (Layer 7)
The Application Layer is the topmost layer of the OSI.
The application layer is responsible for providing
services to the user.
38
Key Functions: Application Layer
Provides user interfaces – Allows users to interact with network
services (e.g., web browsers, email clients).
Supports communication protocols – Uses protocols like HTTP, FTP,
SMTP, DNS for data exchange.
Manages data formatting and encryption – Ensures data is properly
structured and secure before transmission.
39
Examples of Application Layer
Protocols
HTTP/HTTPS – Web browsing
FTP – File transfers
SMTP, IMAP, POP3 – Email communication
DNS – Resolving domain names to IP addresses
40
Summary of OSI Model
41
TCP/IP Model (Internet Model)
The TCP/IP Model (Transmission Control Protocol/Internet Protocol
Model) is a practical networking framework that defines how data is
sent and received over the internet.
TCP/IP (Transmission Control Protocol/Internet Protocol) is the
foundation of the modern Internet. It was developed to enable
reliable communication between computers across different
networks.
It is widely used in real-world communication, including web
browsing, emails, and file transfers
42
OSI Vs TCP/IP
43
TCP/IP Model (4 Layers)
Application Layer
Transport Layer
Internet Layer (Network Layer)
Network Access Layer (Physical Layer + Data Link Layer)
44
Comparison of OSI & TCP/IP
45
What is PDU (Protocol Data Unit)?
A Protocol Data Unit (PDU) is a specific block of information
transmitted over a network at each layer of the TCP/IP or OSI model.
Each layer adds its own headers and trailers to the data.
Application Layer → Data (e.g., an email or a web request)
Transport Layer → Segment (TCP) / Datagram (UDP)
Network Layer → Packet (IP packet with source and destination addresses)
Data Link Layer → Frame (Ethernet Frame or Wi-Fi frame with MAC
addresses)
Physical Layer → Bits (electrical or optical signals)
46
47
Sending an Email (Following TCP/IP Layers)
Step-by-Step Process Through TCP/IP Layers
Application Layer (SMTP - Simple Mail Transfer Protocol)
The email client (e.g., Gmail, Outlook) uses SMTP to send the email.
It prepares the email message, including the recipient's address, subject, and body.
Transport Layer (TCP - Transmission Control Protocol)
TCP breaks the email into smaller segments to ensure reliable delivery.
It assigns sequence numbers so that data can be reassembled correctly at the destination.
Internet Layer (IP - Internet Protocol)
IP assigns the source and destination IP addresses to each packet.
The data is placed into packets and forwarded to the correct network.
Network Access Layer (Ethernet/Wi-Fi - Physical Transmission)
The email packets are converted into electrical or wireless signals and transmitted over the network.
Routers and switches forward these packets toward the recipient’s mail server.
Receiving End (Reverse Process Happens)
The recipient’s mail server receives the email.
POP3, IMAP, or SMTP retrieves the email for the recipient.
The user opens their email client, and the email is displayed
48
Real-World Examples of TCP/IP Usage (1)
Web Browsing (HTTP/HTTPS)
When you open a website like Google.com, your browser uses HTTP/HTTPS over TCP/IP to
request and load web pages.
Email Communication (SMTP, POP3, IMAP)
Sending an email via Gmail, Outlook, or Yahoo uses SMTP (Simple Mail Transfer Protocol)
over TCP/IP.
Receiving emails uses POP3 (Post Office Protocol) or IMAP (Internet Message Access
Protocol).
File Transfers (FTP, SFTP)
When downloading/uploading files from a web server or cloud storage (like Google Drive,
Dropbox, or FTP servers), FTP (File Transfer Protocol) or SFTP (Secure File Transfer Protocol) is
used over TCP/IP.
49
Real-World Examples of TCP/IP
Usage (2)
Video Streaming (YouTube, Netflix, Zoom)
Watching videos on YouTube, Netflix, or live streaming platforms uses TCP/IP with protocols
like RTP (Real-time Transport Protocol) and HTTP Live Streaming (HLS).
Remote Desktop & Virtualization (RDP, SSH, VMware, Cloud Services)
Connecting to another computer remotely via RDP (Remote Desktop Protocol) or SSH (Secure Shell) relies on TCP/IP.
VMware and cloud computing services (AWS, Azure, Google Cloud) use TCP/IP for virtualized network connections.
VoIP (Voice over IP) - Internet Calling (Skype, WhatsApp, Zoom, Google Meet, etc.)
When making a voice or video call over the Internet, VoIP uses TCP/IP with protocols like SIP
(Session Initiation Protocol) and RTP (Real-time Transport Protocol).
50
Key Milestones in TCP/IP History
51
Layered Architecture
Let us assume that
computer A
communicates
with computer B.
We have five
communicating
devices in this
communication
Each device is 3
involved with a set
of layers
depending on the 1 2 4 5
role of the device
in the internet.
52
Layers in the TCP/IP Protocol Suite
Logical Connections
53
Multiplexing and Demultiplexing
The concept of multiplexing and demultiplexing at the three upper layers
54