Models - An Overview
Models - An Overview
Unit 2
Protocol Reference Model of
OSI
THE OSI MODEL
Established in 1947 by ISO,
The International Standards Organization (ISO) is a multinational body
dedicated to worldwide agreement on international standards.
An ISO standard that covers all aspects of network communications is the
Open Systems Interconnection (OSI) model.
It was first introduced in the late 1970s.
Layers :
Application layer
Presentation layer
Session layer
Transport layer
Network layer
Data link layer
Physical layer
Introduction to the OSI layer
Open Systems Interconnection (OSI)
Each layer support the layers above it and offers
services to the layers below
Each layer performs unique and specific task
A layer has knowledge of its neighbour layers only
A layer’s service is independent of its implementation
How OSI was created
An attempt to design a framework to develop
networking technologies
OSI became a tool for explaining Networking in
general
Before OSI was created people created their
Software/Hardware as they wanted it to be.
There was no compatibility.
OSI is used as a rule set for all vendors to create their
Software/Hardware by using the standards.
Protocol Reference Model of OSI
II OSI Overview
OSI Overview
4. Data Encapsulation
a) PDU conception –
each protocol on the diff.
layer has its own format.
b) Headers are added
while a packet is going
down the stack at each
layer.
c) Trailers are usually
added on the second
layer.
1. Application
2. Transport
3. Internet
4. Network Interface
5. Hardware
TCP/IP Network Model
Different view – 4 layers
Layer 1 : Link
Layer 2 : Network
Layer 3 : Transport
Layer 4 : Application
Comparison with TCP/IP
Pretty similar to OSI
TCP/IP has fewer layers(four)
The main difference in layers is after the 4th layer
Layers
Application layer(Layer 7)
Applications and Services run on it
Enables users to interface with the underlying data network
Applications on that layer (E-mail clients, web browsers, Chats,
etc.) – top-stack applications (As users are on the top of the
stack)
Applications provide users with a way to create messages
Application layer services establish an interface to the network
Protocols provide the rules and formats that govern how data
is treated
Protocols on the destination and the host must match
Application layer
Protocol Reference Model of OSI
Translation
(connects different
computer systems)
Compression
(transmission
efficiency)
Encryption (SSL
security)
Session layer(Layer 5)
Functions at this layer create and maintain dialogs
between source and destination applications
Authentication
Permissions
Session Restoration (Checkpoint or recovery)
Session layer
Protocol Reference Model of OSI
Session
establishment,
maintenance and
termination
(Deciding who sends,
and when.)
Session support
(security, name
recognition, logging )
Transport layer(Layer 4)
Tracking the individual communication between applications on the
source and destination hosts
Segmenting data and managing each piece
Reassembling the segments into streams of application data
Identifying the different applications – use of port numbers
Conversation Multiplexing
Segments
Connection-oriented conversations
Reliable delivery
Ordered data reconstruction
Flow control
TCP – Web Browser
UDP – Video Streaming Applications
Transport layer
Reliable process-to-process delivery of a message
Protocol Reference Model of OSI
The OSI Layers
4. Transport Layer
Connectionless and
connection-oriented services
– TCP and UDP
Process-Level Addressing
Multiplexing and
Demultiplexing
Segmentation, Packaging
and Reassembly
Connection Establishment,
Management and
Termination
Acknowledgments and
Retransmissions
Flow Control
Network layer(Layer 3)
Addressing (IPV4)
Encapsulation (Inserts a header with source and
destination IPs)
Routing (Move a packet over the Internet)
Decapsulation (Open the packet and check the
destination host)
IP is connectionless
Network layer
Source-to-destination delivery
Protocol Reference Model of OSI
The OSI Layers
3. Network Layer
Logical Addressing - IP
Routing (where the packet
is addressed to)
Datagram Encapsulation
Fragmentation and
Reassembly (handling too
big packets )
Error Handling and
Diagnostics ( using status
messages for example )
Protocol Reference Model of OSI
End to end packet delivery
Data link layer(Layer 2)
It is the role of the OSI Data Link layer to prepare Network layer packets
for transmission and to control access to the physical media.
Allows the upper layers to access the media using techniques such as
framing
Controls how data is placed onto the media and is received from the media
using techniques such as media access control and error detection
Frame - The Data Link layer PDU
Node - The Layer 2 notation for network devices connected to a common
medium
Media/medium - The physical means for the transfer of information
between two nodes
Network - Two or more nodes connected to a common medium
The Data Link layer is responsible for the exchange of frames between
nodes over the media of a physical network.
Data link layer
Hop-to-hop delivery
Protocol Reference Model of OSI
The OSI Layers
2. Data Link Layer
2.1. Logical Link Control (LLC )
Establishment and control of logical links
between local devices on a network.
2.2. Media Access Control (MAC)
The procedures used by devices to control
access to the network medium.
• Frame sequencing
• Frame acknowledgment
• Addressing
• Frame delimiting
• Frame error checking
• PDU: frame
Physical layer (Layer 1)
The role of the Physical layer is to encode the binary
digits that represent Data Link layer frames into
signals and to transmit and receive these signals
across the physical media that connect network
devices.
Copper cable
Fiber
Wireless
Physical layer
Protocol Reference Model of OSI
The OSI Layers
1. Physical Layer
OSI Summary
Application
E-Mail:
•Recipient
Presentation
•Message:
Subject
•Body
Recipient – CHAR(9)
Session Frame:
Session
•SubjectMessage:
– CHAR (17)
•Data Link Header
••Session Header
Body – CHAR (243)
Transport •Transport
Network Header
•Network
RecipientFrame:
Message:
•Transport
TransportHeader
Header
Network ••Subject
Network Header
•Session
Session Header
Header
••Body
Transport Header
Data link ••Recipient
Recipient
Session Header
••Subject
Subject
Recipient
Physical ••Body
Body
Subject
01001101111010010011001…
•Body Network
Summary of layers
TCP/IP PROTOCOL SUITE
Layer Protocols
Internet IP ICMP
Network Access
ETHERNET PACKET RADIO
(Host-to-network)
Protocols at the application layer
HTTP:
browser and web server communication
FTP :
file transfer protocol
TELNET:
remote login protocol
POP3: Retrieve email
POP3 is designed to delete mail on the server as soon as the user has downloaded it
Reliable
7th
Application Layer
6th
Presentation Layer Application Layer
5th
Session Layer
4th
Transport Layer
Transport Layer
3rd
Network Layer
Network Layer
2nd
Link Layer
Link Layer
1st
Physical Layer
OSI
OSI Model Equipment Words to TCP/IP
Model Pneumonic Equipment Data Protocols
Name Purpose Remember Model
Layer
Redirector,
Layer 7 Application All FTP, Telnet, Browsers Application
Regular Computer SMTP,
or A Special SNMP, Common Data
Layer 6 Presentation People Computer Data Application
Gateway. Used to Netware Format
combine networks Core
using different NFS, SQL, Dialogues and
Layer 5 Session Seem communication RPC, X-Win
Application
Conversations
protocols Quality of
Layer 4 Transport To Computer Segment TCP and UDP Service, and Transport
Reliability
Segment Network Routable
Path Selection,
into Smaller Protocols.
Layer 3 Network Need Router Packet (IP, IPX,
Routing, and Internet
Broadcast Addressing
AppleTalk)
Domains
Bridge (2
Data Link Segment Network NDIS, ODI, Frames and
Ports) or Network
Layer 2 -MAC Data into Smaller Frame MAC Address, Media Access
Switch and Ether Talk Control (MAC) Access
-LLC Collision Domains
NIC
Repeater,
One Collision AND
Hub (Multi- Signals and Network
Layer 1 Physical Processing One Broadcast Bit Physical
Media
port), Access
Domain
Cabling
Internet applications
TCP/IP takes care of the hard problems
Location of the destination host
Making sure the data is received in the correct order and error
free
Port 1
Physical Addresses
Logical Addresses
Port Addresses
Specific Addresses
Addresses in TCP/IP
Relationship of layers and addresses in TCP/IP
Example 1
07:01:02:01:2C:4B
753
Email addresses
layer
TCP/IP has no session layer
Not significant: It does little in modern networks
In TCP/IP a session is typically managed by the application
layer
The TCP/IP Protocol in Action
Consider the following simplified network route
The source (S) and destination (D) are separated by
two routers (R1, R2)
S R1 R2 D
The TCP/IP Protocol in Action
Let’s consider a web browser, using HTTP (Hypertext
Transfer Protocol)
The web browser on S sends a packet to the web server on D
The application layer (i.e. the browser) provides the logical
(IP) addresses for S (IPS) and D (IPD)
The application layer also provides the port numbers for the
source (PortS) and destination (PortD) – usual ports 80 or
8080
S R1 R2 D
HTTP Req
The TCP/IP Protocol in Action
The Transport layer (TCP) uses the port numbers
(e.g. 2765 and 80) to create a TCP packet
(sometimes called a segment):
S R1 R2 D
Source Port: 2765
Destination Port: 80
HTTP Req
The TCP/IP Protocol in Action
The Internet (i.e. IP) layer uses the IP addresses
specified by the application layer to create an IP
datagram
e.g. 137.207.140.71, 24.87.204.16
Next, a route is determined for the packet, using S’s
routing table
S only needs one router’s address (R1)
S R1 R2 D
Source IP: 137.207.140.71
Dest IP: 24.87.204.16
TCP Segment
HTTP Req
The TCP/IP Protocol in Action
The MAC addresses of S and R1 (MACS and MACR1)
are used to create a network frame
If the MAC address of R1 is not known, ARP (Address
Resolution Protocol) is used
S R1 R2 D
Source MAC: MACS
Dest MAC: MACR1
IP Datagram
TCP Segment
HTTP Req
The TCP/IP Protocol in Action
Let’s simplify the picture (for clarity)
In subsequent steps the IP datagram and its contents
will not change very much
S R1 R2 D
Source MAC: MACS
Dest MAC: MACR1
IP Datagram
The TCP/IP Protocol in Action
The network frame is transmitted on the network
to R1
This is possible since S and R1 are both members of
the same network
S R1 R2 D
Source MAC: MACS
Dest MAC: MACR1
IP Datagram
The TCP/IP Protocol in Action
R1 will extract the IP datagram from the payload of
the network frame
R1 looks up the destination IP address (IP ) in it’s
D
routing table, to determine which router should get
the datagram next (R2)
S R1 R2 D
IP Datagram
The TCP/IP Protocol in Action
R1 uses its own MAC address (MACR1) and R2’s
MAC address (MACR2) to create another network
frame
S R1 R2 D
Source MAC: MACR1
Dest MAC: MACR2
IP Datagram
The TCP/IP Protocol in Action
The network frame is received by R2, and the IP
datagram is extracted from it’s payload
R2 uses its routing table to lookup IPD
In this case, R2 is directly connected to D
This is called direct routing
S R1 R2 D
Source MAC: MACR1
Dest MAC: MACR2
IP Datagram
The TCP/IP Protocol in Action
Most likely, R2 does not have the MAC address of D
(MACD)
The address resolution protocol (ARP) is used to
determine the MAC address:
S R1 R2 ARP Request
D
IP: 24.87.204.16
IP Datagram
MAC: ?
The TCP/IP Protocol in Action
D recognizes it’s IP address and responds with its
MAC address (MACD)
e.g. 08-7F-3C-90-0C-DF
S R1 R2 ARP Response
D
IP: 24.87.204.16
IP Datagram
MAC: 08-7F-3C-90-0C-DF
The TCP/IP Protocol in Action
A network frame is created by R2 now that the
MAC address is known
The frame is sent directly to D
S R1 R2 D
Source MAC: MACR2
Dest MAC: MACD
IP Datagram
The TCP/IP Protocol in Action
D extracts the IP datagram from the network frame
(which is discarded)
The IP datagram’s payload is passed to the
transport layer
S R1 R2 D
Source MAC: MACR2
Dest MAC: MACD
IP Datagram
The TCP/IP Protocol in Action
The Transport layer (within D’s operating system),
will use the port numbers specified in the TCP
segment to determine to which application it
should send the segment
In this case, to the application bound to port 80 (the
web server)
S R1 R2 D
Source Port: 2765
Destination Port: 80
HTTP Req
The TCP/IP Protocol in Action
Now, the web server on D has the HTTP request,
and it processes it
An HTTP response is sent back using the same
process
The web server uses the same IP addresses and
logical addresses as the last message
S R1 R2 D
HTTP Req
The Postal Analogy
How would the OSI compare to the regular Post Office
7 - Application All
6 - Presentation People
5 - Session Seem
4 - Transport To
3 - Network Need
2 - Data Link Data
1 - Physical Processing
Protocol Stack
Connecting Networks
Repeater: physical layer
Bridge: data link layer
Router: network layer
Gateway: network layer and above.
REPEATER
Bridge
Copies frames from one network to another
Can operate selectively - does not copy all frames
(must look at data-link headers).
Extends the network beyond physical length
limitations.
can be implemented in hardware or software
BRIDGE
Router
Copies packets from one network to another.
Makes decisions about what route a packet should take
(looks at network headers).
typically implemented in software so that they can be
extended to handle new protocols
ROUTER
ROUTER
Gateway
Operates as a router
Data conversions above the network layer.
Conversions:
encapsulation - use an intermediate network
translation - connect different application protocols
encrpyption - could be done by a gateway
typically implemented in software so that they can be
extended to handle new protocols
Encapsulation Example
Gateway Gateway
Data
Encapsulation
6. Presentation
Data
Stripping
5. Session
Data Encapsulation In TCP/IP
At each layer in the TCP/IP protocol stack
Outgoing data is packaged and identified for delivery to the layer underneath
PDU – Packet Data Unit – the “envelop” information attached to a packet at
a particular TCP/IP protocol
e.g. header and trailer
Header
PDU’s own particular opening component
Identifies the protocol in use, the sender and intended recipient
Trailer (or packet trailer)
Provides data integrity checks for the payload
Encapsulation example: E-mail
Encapsulation
Packet Encapsulation
The data is sent down the protocol stack
Each layer adds to the data by prepending headers
64 to 1500 Bytes
What Each Layer Does
2
Gives end-user applications access to
network resources
Where is it on my computer?
Workstation or Server Service in
MS Windows
3
Presentation Layer
3
Session Layer
Allows applications to
maintain an ongoing session
Where is it on my computer?
Workstation and Server
Service (MS)
Windows Client for
NetWare (NetWare)
3
Transport Layer
Provides reliable data
delivery
It’s the TCP in TCP/IP
Responsibilities:
Network addressing
Routing
Example:
IP from TCP/IP 3
Network layer
Where is it on my computer?
TCP/IP Software
Data Link Layer
3
Data link layer
GW ? GW
?
?
Insecure Network