You are on page 1of 53

OSI Layer Model &

TCP/IP Model
Peer-to-Peer
Peer to Peer Communication
Encapsulation/Decapsulation
Encapsulation
• As the data flows down through the layers in
the hierarchy,
hierarchy each layer adds some extra
information to the data in the form of headers
or tailors.
• This process of wrapping data with headers and
tailors is called encapsulation.
Tasks involved in sending a letter
ISO - Organization for Standardization.
Standardization
• International standards organisation is
responsible
ibl for
f a wide
id range off standards,
t d d
including many that are relevant to computer
networking.
networking
• In 1984 , the Open Systems Interconnection
(OSI) Reference Model was approved as an
international standard for communications
architecture.
OSI
• Open Systems Interconnection
• Developed by the International Organization for
Standardization (ISO)
• Seven layers
- Application - Data link
- Presentation - Physical
- Session
- Transport
- Network
OSI Model
OSI - The Model
• Layered Architecture
• Peer to Peer Process
• Interface between Layers
• Organization of the Layers
--------------------------------------------------------------
• Each layer performs a subset of the required
communication functions
• Layer 1,2,3-Network support layer
• Layer 5,6,7-User Support Layer
• Layer 4-Links the two subgroups.
Layers of OSI Reference Model.
Model
OSI Layers
The OSI Environment
Encapsulation.
Encapsulation
OSI Layers (1)
• Physical
y
— Bottommost layer
— Implements an unreliable bit link
— Uses synchronization bits to synchronize the receiver
— Specify the modulation scheme
— Physical interface between devices
• Mechanical
• Electrical
• Functional
• Procedural
— For activating, maintaining and deactivating the physical
l k between
link b communicating networkk systems
Physical Layer
The major duties performed by physical layer are:

• Physical characteristics of interface and media


• Representation of bits
• Data rate
• Synchronization of bits
• Line Configuration
• Topology
• Transmission Mode
Physical Layer
OSI Layers (2)
• Data Link
— Supervises transmission of packets by physical layer
— Means of activating, maintaining and deactivating a
reliable link
— Adds sequence number and CRC
— Error detection and control
— Encapsulation
p and Decapsulation
p are performed
p
— Regulates the access to the link
— Higher layers may assume error free transmission
• A) Medium Access Control
MAC address will be added
B) Logical Link Control
CRC will
ill be
b added
dd d
Data Link Layer.
Layer
• The data link layer is responsible for moving frames
f om one hop (node) to the ne
from next.
t
• The major duties of the data link layer are:
— Framing
g
— Physical addressing:
• Physical address is the MAC address, which is hard coded
into NIC and is of 48-bit represented by Hexadecimal
format.
format
– 00.27.AB.CC.EE.23
00.27.AB-Vendor
CC EE 23-User
CC.EE.23 User
– Cmd Ipconfig/all to show the system details
— Flow control
— Error Control
— Access Control
— Data Link layer protocols are CSMA/CD, CSMA/CA, Token
passing etc.
Data Link Layer.
Layer
Data Link Layer
Network Layer.
Layer
• The network layer is responsible for the source -
t d ti ti delivery
to-destination d li off a packet
k t possibly
ibl
across multiple networks.
—It
It two systems are connected to the same link
link, there
is usually no need for a network layer.
—However,, if the two systems
y are attached to different
networks with connecting devices between the
networks, there is need for the network layer to
accomplish the delivery
delivery.
• The major duties performed by the network
layer are:
Network Layer.
Layer
— Logical addressing:
• Logical address is also called IP address which is of 32
32-bits
bits
and represented in decimal format.
• 192.168.32.97
— Routing:
• To route the packets from the source to destination in an
internetwork, the router uses network layer information.
• The PDU of network layer is packet
packet.
• Network layer protocols are IP, IPX, AppleTalk.
Network Layer.
Layer
Network Layer
OSI Layers (4)
• Transport
— Exchange
E change of data bet
between
een end ssystems
stems
— Multiplexes several low rate transmissions with different Service
Access Points (SAP’s) onto one virtual circuit
— Decomposes messages into packets and combines packets into
messages
— Error free (Connection Oriented)
— In sequence
— No losses
— No duplicates
— Connectionless service – no guarantee on the order of the
messages (possibly with some errors)
— Requests retransmission of corrupted packets
— Quality of service
Transport Layer.

• The transport layer is responsible for process-to-


process delivery of the entire message
message.
• The major duties performed by the transport layer are:
— Port address:
• C
Computers
t often
ft running
i severall processes ((running
i programs))
at the same time:
— Segmentation and reassembly:
• A message received form the upper layers is divided into
transmittable segments, each segment contains a sequence
number.
• These number enables the transport layer to reassemble the
message correctly upon arrival at the destination and to identify
and replace packets that were lost in the transmission.
Transport Layer.
Layer
— Connection Control:
• The transport
p layer
y can be either connectionless or
connection oriented.
— Flow control
— Error control

• Transport layer 4 protocols include TCP


((Transmission Control Protocol)) and UDP (User
(
Datagram Protocol).
Transport Layer.
Layer
Reliable Process-
Process-to-
to-Process
Delivery.
Delivery
Transport Layer
OSI Layers (5)
• Session
— Supervises the control of dialogues between
applications (two computers)
—Dialogue
Di l discipline
di i li
—Sets up the connection prior to exchange of
information between the machines
—Inserts synchronization points
—Grouping
—Recovery
R
Session Layer.
Layer
• The session layer
y defines how to establish, maintaining
g
and terminates session between two communication
hosts.
• The major
j duties of the session layer
y are:
— Synchronization
— Dialog control:
• Session
Sess o layer
aye dete
determines
es tthat
at which
c role
o e iss to be p
played
ayed at a
anyy
given time by a host.
– Duplex: Two-way simultaneous.
– Half-Duplex: Two-way alternate.
– Simplex:
Si l O
One-way.
• Session layer protocols are SQL, ASP(AppleTalk Session
Protocol), Remote Procedure Call (RPC), X Window
S t
System.
Session Layer.
Layer
OSI Layers (6)
• Presentation
—Defines the data format
—Defines coding and conversion functions
• Common Data Representation
• Data compression
• Encryption
• Conversion of Characters
Examples:
• MPEG
• ASCII
• JPEG
Presentation Layer.
Layer
• The presentation layer ensures that the information
that the application layer of one system sends out is
readable by the application layer of another system.
• The major duties of the presentation layer are:
— Format
F t conversion:
i
• Convert message from one format into another format .
— Compression.
• Comp
Compress
ess the message to take less band
bandwidth
idth on the
transmission media and less time for transmission.
— Encryption:
• Convert the message into a form that will not be readable by
others.
• Provides security to the message.
• Protocols of the p
presentation layer
y are JPEG,, MPEG,,
ASCII etc.
Presentation Layer.
Layer
OSI Layers (7)
• Application
—This layer is closest to the user
—Means for applications to access OSI environment
—Provides
Provides network services directly to applications
—Determines the identity and availability of
communication partners and determines if sufficient
resources are available to start program to program
communication
—Examples
p of application
pp layer
y protocols:
p
• Telnet
• SMTP
• FTP
• SNMP
Use of a Relay
Summary of the Layers.
TCP/IP Protocol Architecture
• Developed by the US Defense Advanced
R
Researchh Project
P j t Agency
A (DARPA) for
f its
it packet
k t
switched network (ARPANET)
• Used
U ed by
b the global
glob l Internet
Inte net
• No official model but a working one.
—Application
A li ti layerl
—Transport layer
—Internet
Internet layer
—Network access layer
y
—Physical layer
y
Physical Layer
• Physical interface between data transmission
d i (e.g.
device ( computer)
t ) and
d transmission
t i i
medium or network
• Characteristics
Ch te i ti of transmission
t n mi ion medium
medi m
• For activating, maintaining and deactivating the
physical link between communicating network
systems
• Signal levels
• Data rates
Network Access Layer
• Also called as host to host network layer
• Exchange of data between end system and
network
• Destination address provision
• Includes the LAN and WAN technology details
and all the details contained in the OSI physical
and data-link layers
• Invoking services like priority
Internet Layer (IP)
• Defines a packet and an addressing scheme
• Transfers the data between the Internet layer and the
Network access layers
• The purpose of the Internet layer is to select the best path
through the network for packets to travel
• The main protocol that functions at this layer is Internet
Protocol (IP)
— Internet Protocol: Connectionless, best effort delivery routing of
packets IP is not concerned with the content of the packets but
packets.
looks for a path to the destination. It is an unreliable protocol. It
does not perform error checking and correction
— Internet Control Message Protocol: Provides control and messaging
capabilities
— Reverse Address Resolution Protocol: Determines the IP address
when the MAC address is known
• Systems may be attached to different networks
• Routing functions across multiple networks and remote hosts
• Implemented in end systems and routers
Transport Layer (TCP)
• The transport layer provides transport services from the
source host to the destination host.
• Logical connection between the endpoints of the network, the
sending host and the receiving host
• End to End control p provided byy sliding
g windows and reliabilityy
in sequencing numbers and acknowledgements
• Also defined as end to end connectivity between host
applications
• Reliable
R li bl delivery
d li off data
d
• Ordering of delivery
— TCP and UDP
• Segmenting upper layer application data
• Sending segments from one end device to another end device
— TCP only
• Establishing end to end operations
• Flow
l controll provided
id d by
b sliding
lidi windows
i d
• Reliability provided by sequence numbers and acknowledgements
Application Layer
• Support for user applications
• Handles high level protocols
• e.g. FTP, HTTP, NFS (Network File Server),
SMTP, SNMP, Telnet (Terminal Emulation), TFTP
(Trivial File Transfer Protocol), DNS (Domain
Name Server or System)
OSI v TCP/IP
TCP
• Usual transport layer is Transmission Control Protocol
— Reliable connection
• Connection
— Temporary
p y logical
g association between entities in different
systems
• TCP PDU
— Called TCP segment
— Includes source and destination port (c.f. SAP)
• Identify respective users (applications)
• Connection
C ti refers
f to
t pair
i off ports
t
• TCP tracks segments between entities on each
connection
UDP
• Alternative to TCP is User Datagram Protocol
• Not guaranteed delivery
• No preservation of sequence
• No protection against duplication
• Minimum overhead
• Adds port addressing to IP
TCP/IP Concepts
Addressing level
• Level in architecture at which entity is named
• Unique address for each end system (computer)
and router
• Network level address
—IP or internet address (TCP/IP)
—Network
N t k service
i access point
i t or NSAP (OSI)
• Process within the system
—Port
Port number (TCP/IP)
—Service access point or SAP (OSI)
PDUs in TCP/IP
Some Protocols in TCP/IP Suite
TCP/IP and the OSI Model