2-2008 UP-Copyrights reserved 1
ITGD4103 Data Communications and Networks
Lecture-5: OSI Reference ModelOSI Reference Model
week 5- q-2/ 2008
Dr. Anwar Mousa
University of Palestine InternationalFaculty of Information Technology
2-2008 UP-Copyrights reserved 2
Contents:
1.1.OSI Reference ModelOSI Reference Model
2.TCP/IP
2-2008 UP-Copyrights reserved 3
Layers and Stacks
Many different protocol stacks:
OSI Open Systems Interconnection.
TCP/IP Internet Protocols.
SS7 Signaling System #7
The number of layers, and the name, contents, and
function of each layer differ for each protocol stack.
OSI Reference ModelOSI Reference Model
2-2008 UP-Copyrights reserved 5
Layering
The separation of the communication functions is
called layering. layering is the communication into separate steps that
are performed sequentially, defined by specific
interfaces for passing the result of each step to the next
layer until the overall function, such as the sending or
receiving of some amount of information, is completed.
Each layer communicates with the layers above and
below through a standard interface.
2-2008 UP-Copyrights reserved 6
Reasons for layering
Divides interrelated aspects of network operation into
less complex elements.
Simplifies the network model.
Enables programmers to specialize in a particular level
or layer of the networking model.
Provides design modularity. Prevent changes in one area from impacting other
areas, so each area can evolve more quickly.
2-2008 UP-Copyrights reserved 7
Layering Responsibility
End- to- end delivery of packets to the network.
Selecting routes for the packets to take.
Implies knowledge of the network topology.
Managing utilization of the links.
Provide flow control (across multiple links).
Spread load among different routes.
2-2008 UP-Copyrights reserved 8
Layering Principle
Each layer uses its own protocol to communicate with
its peer layer in the other system (receiver).
Layer N software on the destination computer must
receive exactly the message sent by layer N software
on the sending computer.
A layer N+1 entity sees the lower layers N only as a
service provider.
Each layer depends on the service function of the layer
below.
2-2008 UP-Copyrights reserved 9
An entity of a particular layer can only communicate with:
Peer layer entity using a common protocol (Peer Protocol)
Adjacent layers to provide services and to receive services.
2-2008 UP-Copyrights reserved 10
OSI Reference ModelOSI Reference Model
Open Systems Interconnection Reference Model (OSI).
A seven-layer structure designed to describe computer
network architectures and the way that data passes
through them.
It is a layered model used to describe network protocols
and services.
2-2008 UP-Copyrights reserved 11
Seven Layer Reference Model
Layered model consists of seven layers:
7. Application
6. Presentation
5. Session
4. Transport
3. Network
2. Data Link
1. Physical
2-2008 UP-Copyrights reserved 12
2-2008 UP-Copyrights reserved 13
1. The Physical Layer
Responsibility: Transmission of raw bits over a communication
channel (how to transfer bits correctly).
Issues: Physical characteristics of interfaces and
media. Representation of bits. Data rate and transmission mode.
2-2008 UP-Copyrights reserved 14
The physical layer coordinates all the functions required
to transmit a bit stream over the physical medium.
2-2008 UP-Copyrights reserved 15
2. The Data Link Layer
Responsibility: Transfer data frames correctly and successfully. Provide an error-free communication link. Error control and flow control.
Issues: Framing (dividing data into chunks). Addressing.
10110110101 01100010011 10110000001
2-2008 UP-Copyrights reserved 16
3. The Network Layer
Responsibilities:
Move packet inside the network and send it to the
destination.
Path selection between end-systems (routing).
Fragmentation & reassembly.
Translation between different network types.
Issues:
Forwarding, routing, addressing, switching, and
congestion control.
2-2008 UP-Copyrights reserved 17
4. The Transport Layer
Responsibilities:
Delivery of the data between two peer processes.
Connection establishment, management,
termination, error control and flow control.
Issues: Headers. Error detection. Reliable communication.
2-2008 UP-Copyrights reserved 18
5. The Session Layer
Responsibilities:
Enables two applications on the network to have an
ongoing conversation or dialog.
Allows users to establish, manages, and terminate
session.
Issues: Control for data exchange
Data synchronization.
Failure recovery.
2-2008 UP-Copyrights reserved 19
6. The Presentation Layer
Responsibilities:
Data translation.
Data formatting.
Data encryption.
Data compression.
Data syntax restructuring.
2-2008 UP-Copyrights reserved 20
7. The Application Layer
Responsibilities:
Providing services to applications.
Enable the user to access the network.
Variety of protocols that are commonly used.
Anything not provided by any of the other layers.
Issues:
File Transfer.
Appropriate selection of “type of service”.
2-2008 UP-Copyrights reserved 21
Data transmission using the OSI model:
2-2008 UP-Copyrights reserved 22
Layering & Headers
Each layer needs to add some control information to
the data in order to do its job.
This information is added to the data before being
given to the lower layer.
Once the lower layers deliver the data and control
information, the peer layer uses the control
information.
2-2008 UP-Copyrights reserved 23
2-2008 UP-Copyrights reserved 24
2-2008 UP-Copyrights reserved 25
Important Notes
Data-Link Layer :
Communication between machines on the same network.
Network Layer :
Communication between machines on possibly different networks.
Transport Layer :
Communication between processes (running on machines on possibly different networks).
2-2008 UP-Copyrights reserved 26
Conclusion
TCP/IP
2-2008 UP-Copyrights reserved 28
TCPTransmission Control Protocol
TCP is one of the main protocols in TCP/IP networks.
Whereas the IP protocol deals only with packets.
TCP enables two hosts to establish a connection and
exchange data.
TCP - is responsible for verifying the correct delivery
of data from client to server.
2-2008 UP-Copyrights reserved 29
TCP
TCP guarantees delivery of data and also
guarantees that packets will be delivered in the
same order in which they were sent.
TCP provides:
Connection-oriented
Reliable
Full-duplex
Byte-Stream
2-2008 UP-Copyrights reserved 30
Connection-Oriented
Connection oriented means that a virtual connection
is established before any data is transferred.
If the connection cannot be established, the user
program is notified.
If the connection is ever interrupted, the user
program is notified.
2-2008 UP-Copyrights reserved 31
Reliable means that every transmission of data is
acknowledged by the receiver.
If the sender does not receive acknowledgement
within a specified amount of time, the sender
retransmits the data.
Full Duplex:
TCP provides transfer in both directions.
2-2008 UP-Copyrights reserved 32
Buffering: TCP is responsible for buffering data and
determining when it is time to send a datagram.
Stream means that the connection is treated as a
stream of bytes.
The user application does not need to package data
in individual datagrams.
2-2008 UP-Copyrights reserved 33
TCP Segments
The chunk of data that TCP asks IP to deliver is called
a TCP segment.
Each segment contains:
Data bytes from the byte stream.
Control information that identifies the data bytes.
2-2008 UP-Copyrights reserved 34
TCP/IP
The TCP/IP is a protocol suite.
It was initially successful because it delivered a few basic
services that everyone needs (file transfer, electronic mail,
remote logon) across a very large number of client and
server systems.
All TCP/IP protocol suite specifications are in the
public domain. No license fees.
Used to create open system networking environments.
2-2008 UP-Copyrights reserved 35
TCP/IP
TCP/IP is a way to communicate reliably between hosts.
The advantages of TCP/IP:
TCP/IP is bound to no manufacturer.
TCP/IP is usable in LANs and WANs.
TCP/IP makes application independent of the transmission system.
2-2008 UP-Copyrights reserved 36
TCP/IP Model
TCP/IP Model consists of only five layers.
Physical layer
Network access layer (Data link layer)
Internet layer (Network layer)
Transport layer
Application layer
Session layer and Presentation layer are not actually
defined by TCP/IP.
2-2008 UP-Copyrights reserved 37
Protocol layering and data
Each layer takes data from above. Adds header information to create new data unit. Passes new data unit to layer below.
ApplicationTransportNetwork
LinkPhysical
ApplicationTransportNetwork
LinkPhysical
Source Destination
M
M
M
M
Ht
HtHn
HtHnHl
M
M
M
M
Ht
HtHn
HtHnHl
message
segment
datagram
frame
2-2008 UP-Copyrights reserved 38
5. Application Layer : Concerned with how data at both ends is handled.
4. Transport Layer : Manages flow of data.
3. Internet Layer : Consists of several protocols, primary protocol is IP
(providing addressing scheme).
2. Network Access Layer : Manages transmission of data within the network.
1. Physical Layer : TCP/IP leaves the physical connection to manage itself.
2-2008 UP-Copyrights reserved 39
1. Physical Layer
Covers the physical interface between a data
transmission device and a transmission medium or
network.
Physical layer specifies:
Characteristics of the transmission medium.
The nature of the signals.
The data rate.
2-2008 UP-Copyrights reserved 40
2. Network Access Layer
Equivalent to the OSI’s physical and data link layers.
Concerned with the exchange of data between an end
system and the network to which it's attached.
Software used depends on type of network
Circuit switching
Packet switching
LANs
2-2008 UP-Copyrights reserved 41
3. IP Internet Layer
Uses Internet Protocol (IP)
Provides routing functions to allow data to traverse
multiple interconnected networks.
Its function is:
Permit hosts to inject packets into any network and
have them travel independently to the destination.
They may even arrive in a different order than they
were sent, in which case it is the job of higher layers
to rearrange them, if in-order delivery is desired.
2-2008 UP-Copyrights reserved 42
4. Transport Layer
Defines two standard transport protocols: TCP and UDP
TCP implements a reliable data-stream protocol.
(connection oriented)
TCP is responsible for data recovery.
Provides reliability during data exchange.
UDP implements an unreliable data-stream.
(connectionless)
2-2008 UP-Copyrights reserved 43
TCP How it works
The source establishes a connection and sends a limited
number of segments and waits for an ACK
(acknowledgment) from the destination for some of the
segments before sending more.
If no ACK is received within a "timeout" period, then
source assumes unacknowledged segments were lost and
resends those segments (flow control).
The destination sends a NACK (negative acknowledgement)
for any segments with errors and source resends it.
2-2008 UP-Copyrights reserved 44
Protocol Data Unit (PDU)
A Protocol Data Unit comprises of data and control
information which is passed between layers in a protocol
stack.
Unreliable, meaning no guarantees that data coming from
the upper layer :
Will arrive at their destination.
Will arrive in the order in which the were sent.
Will arrive intact.
2-2008 UP-Copyrights reserved 45
The User Datagram Protocol (UDP) is composed at the
Transport Layer.
Done by taking the data received from the application
program at the Application Layer and adding a small
header to it.
This datagram is then sent down to the Internet layer to
be encapsulated into an IP datagram and sent out in a
connectionless mode.
UDP can send its datagrams to multiple destinations.
2-2008 UP-Copyrights reserved 46
UDP Features
Simple protocol:
No connection establishment delays.
No connection state at sender and receiver.
No congestion control.
Small segment header.
2-2008 UP-Copyrights reserved 47
UDP Applications
Useful for Applications such as voice and video,
where:
Retransmission should be avoided.
The loss of a few packets does not greatly affect
performance.
Rate sensitive.
2-2008 UP-Copyrights reserved 48
5. Application Layer
This layer provides services suitable for the
different types of application that might wish to
use the network .
Common TCP/IP Applications:
Simple mail transfer protocol (SMTP)
File Transfer Protocol (FTP)
2-2008 UP-Copyrights reserved 49
TCP/IP Protocol Graph
2-2008 UP-Copyrights reserved 50
The TCP/IP Communication
The flow of data from user to web browser and back.
At each layer, information is either added or removed
Depends on whether data is leaving or arriving at a workstation
Encapsulation - adding information over pre-existing information
2-2008 UP-Copyrights reserved 51
TCP/ IP Network Communication
2-2008 UP-Copyrights reserved 52
2-2008 UP-Copyrights reserved 53
OSI versus TCP/IP Model TCP/IP does not map its layers precisely to OSI
model
OSI = 7 layers
TCP/IP = 5 layers
The OSI and TCP/IP reference models have much in
common. Both are based on the concept of a stack of independent
protocols.
The functionality of the layers is roughly similar.
2-2008 UP-Copyrights reserved 54
OSI versus TCP/IP Model
In TCP/IP,
Session Layer’s
characteristics(OSI) are
provided by the
Transport Layer.
The function of
presentation layer(OSI)
is provided by the
Application Layer.
2-2008 UP-Copyrights reserved 55
OSI vs TCP/IP
Session
Physical
Transport
Network
Data Link
Presentation
ApplicationApplication
Layer
Transport
Data Link
Internet
2-2008 UP-Copyrights reserved 56
Conclusion TCP enables two hosts to exchange data.
TCP provides: Connection-oriented, Reliable,
Full-duplex, and Byte-Stream.
TCP/IP Layers: five layers
Physical layer, Network access layer, Internet layer,Transport layer, and Application layer.
TCP and UDP
OSI versus TCP/IP
2-2008 UP-Copyrights reserved 57
Conclusion
2-2008 UP-Copyrights reserved 58
Summary