0% found this document useful (0 votes)
3 views

OSI Ref Model

Uploaded by

Pharoah
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

OSI Ref Model

Uploaded by

Pharoah
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 60

OSI REFERENCE

MODEL
OSI Model

Communication Architecture
Strategy for connecting host computers and other
communicating equipment.
Defines necessary elements for data communication
between devices.
A communication architecture, therefore, defines a
standard for the communicating hosts.
A programmer formats data in a manner defined by
the communication architecture and passes it on to
the communication software.
Separating communication functions adds flexibility,
for example, we do not need to modify the entire
host software to include more communication
devices.
Need For Protocol Architecture
• E.g. File transfer
—Source must activate comms. Path or inform network
of destination
—Source must check destination is prepared to receive
—File transfer application on source must check
destination file management system will accept and
store file for user
—May need file format translation
• Task broken into subtasks
• Implemented separately in layers in stack
• Functions needed in both systems
• Peer layers communicate
Protocol

 protocols define format, order of msgs sent


and received among network entities, and
actions taken on msg transmission, receipt
a human protocol and a computer network protocol:
time
Hi
TCP connection
req.
Hi
TCP connection
Got the reply.
time? Get http://gaia.cs.umass.edu/index.htm

2:00
<file>

4
Layered Tasks
An example from the everyday life

Hierarchy?
Services

5
Key Elements of a Protocol
• Syntax
—Data formats
—Signal levels
• Semantics
—Control information
—Error handling
• Timing
—Speed matching
—Sequencing
Simplified File Transfer Architecture
OSI Model

Layer Architecture
Layer architecture simplifies the network design.
It is easy to debug network applications in a layered
architecture network.
The network management is easier due to the
layered architecture.
Network layers follow a set of rules, called protocol.
The protocol defines the format of the data being
exchanged, and the control and timing for the
handshake between layers.
Standardized Protocol Architectures
• Required for devices to communicate
• Vendors have more marketable products
• Customers can insist on standards based
equipment
• Two standards:
—OSI Reference model
• Never lived up to early promises
—TCP/IP protocol suite
• Most widely used
OSI Model

Open Systems Interconnection


(OSI) Model
International standard organization (ISO)
established a committee in 1977 to develop an
architecture for computer communication.
Open Systems Interconnection (OSI) reference
model is the result of this effort.
In 1984, the Open Systems Interconnection (OSI)
reference model was approved as an international
standard for communications architecture.
Term “open” denotes the ability to connect any two
systems which conform to the reference model and
associated standards.
OSI Model

OSI Reference Model


The OSI model is now considered the primary
Architectural model for inter-computer
communications.
The OSI model describes how information or data
makes its way from application programmes (such
as spreadsheets) through a network medium (such
as wire) to another application programme located
on another network.
The OSI reference model divides the problem of
moving information between computers over a
network medium into SEVEN smaller and more
manageable problems .
This separation into smaller more manageable
functions is known as layering.
OSI Model

OSI Reference Model: 7 Layers


OSI Model

OSI: A Layered Network Model


The process of breaking up the functions or tasks of
networking into layers reduces complexity.
Each layer provides a service to the layer above it in
the protocol specification.
Each layer communicates with the same layer’s
software or hardware on other computers.
The lower 4 layers (transport, network, data link and
physical —Layers 4, 3, 2, and 1) are concerned with
the flow of data from end to end through the
network.
The upper four layers of the OSI model (application,
presentation and session—Layers 7, 6 and 5) are
orientated more toward services to the applications.
Data is Encapsulated with the necessary protocol
information as it moves down the layers before
Seven layers of the OSI model

14
Exchange using OSI Model

15
OSI Layers and Encapsulation
Application
Application Data Data Application
Header of
Application
Application Application
Layer
Layer AH Data Layer

Presentation Presentation
Layer
PH AH Data Layer

Session Session
Layer SH PH AH Data Layer

Transport Transport
Layer TH SH PH AH Data Layer

Network NH TH SH PH AH Data Network


Layer Layer

Data Link Data Link


Layer DH NH TH SH PH AH Data Layer

Physical Physical
Layer Bits Layer

Copyright by Jorg Liebeherr 98, 99


Issues, to be resolved by the
layers
 Larger bandwidth at lower cost
 Error correction
 Flow control
 Addressing
 Multiplexing
 Naming
 Congestion control
 Mobility
 Routing
 Fragmentation
 Security
 ....

17
OSI - The Layer Model
• Each layer performs a subset of the required
communication functions
• Each layer relies on the next lower layer to
perform more primitive functions
• Each layer provides services to the next higher
layer
• Changes in one layer should not require
changes in other layers

18
OSI Layers
OSI Model in a Switched
Communication Network
Node (Router)

Network
Application
Data Link
Presentation
Physical
Network Session
Application
Network Data Link Transport
Presentation
Data Link Physical Network
Session
Physical Data Link
Transport
Physical
Network
Data Link Network
Physical Data Link
Physical

Station (Host)

Copyright by Jorg Liebeherr 98, 99


Physical layer
physical
connection

Transporting bits from one end node to the next


- type of the transmission media (twisted-pair, coax, optical fiber, air)
- bit representation (voltage levels of logical values)
- data rate (speed)

21
OSI Model

Physical Layer
Provides physical interface for transmission of
information.

Defines rules by which bits are passed from one


system to another on a physical communication
medium.
Covers all - mechanical, electrical, functional and
procedural - aspects for physical communication.
Such characteristics as voltage levels, timing of
voltage changes, physical data rates, maximum
transmission distances, physical connectors, and
other similar attributes are defined by physical layer
specifications.
Data Link layer
logical
connection

Transporting frames from one end node to the next one

- framing - physical addressing


- flow control - error control
- access control

23
Data Link Layer – Accessing the Media
• 2 basic services –
• Allows upper layers to access the media
• Controls how data is placed onto the media using media access
control and error detection
Data link layer terms

Frame – PDU for layer 2


Node – device on a network
Media – physical means to
carry the signals
Network – 2 or more nodes
connected to a common
medium
Data Link layer
- example-

25
Formatting data for transmission

• Framing (layer 2 PDU) breaks this stream into


groupings that have control information in the
header/trailer.

• Typical fields include:


• Start/Stop indicator fields – mark beginning/end of the frame
• Naming/Address fields – who sent/receives this frame
• Type – type of PDU in this frame
• Data – the actual payload (Layer 3 packet)
OSI Model

Data Link Layer


Data link layer attempts to provide reliable
communication over the physical layer interface.

Breaks the outgoing data into frames and


reassemble the received frames.
Create and detect frame boundaries.
Handle errors by implementing an
acknowledgement and retransmission scheme.
Implement flow control.
Supports points-to-point as well as broadcast
communication.
Supports simplex, half-duplex or full-duplex
communication.
Cont…
• Data Link
• Basic services: error detection and control, flow control at the link
level (point to point)
• Higher layers may assume error free transmission
• Later a sublayer is added to Data Link Layer
• MAC (Medium Access Control) sublayer
• to deal with broadcast networks
Data-link layer DIVIDED!
• Logical Link Control (LLC) – defines the software
process that provide services to the network layer
protocols. Places information in the frame that identifies
which protocol is being used (IP, IPX, Appletalk, etc.).
• closest to the Network Layer
• Media Access Control (MAC) – defines the media
access processes performed by the hardware. Will be
specific to the type of media being used.
• closest to the physical layer
Media Access Control Techniques
• Uses CSMA/CD (Ethernet), CSMA/CA (wireless) or
token-passing to transmit data.
Media Access Control Addressing and Framing Data
• Start – beginning of frame
• Source/destination address fields – nodes on the network
• Type field – upper layer service in the frame
Media Access Control Addressing and Framing Data
• Purpose – support any error detection issues
• FCS –CRC (cyclic redundancy check) value is placed in
the trailer’s FCS field. Upon arriving at it’s destination, it is
recalculated and checked to make sure the frame has no
errors.
• This calculation occurs at every sending/receiving point in
the route of that frame. (entering & exiting a device)
Media Access Control Addressing and Framing Data
• Layer 2 uses MAC addresses (NIC card). BIA,
hardware, physical, adapter…same thing.
• Layer 3 uses IP addresses (logical, network,
hierarchical) that reflect the network on which they
reside.
• If a device is MOVED from one subnet to another…
layer 2 address is the same. Will need to change the
layer 3 address for the device to communicate.
OSI Model

Network Layer
Implements routing of (packets) through the
network.

Defines the most optimum path the packet should


take from the source to the destination
Defines logical addressing so that any endpoint can
be identified.
Handles congestion in the network.
Facilitates interconnection between heterogeneous
networks (Internetworking).
The network layer also defines how to fragment a
packet into smaller packets to accommodate
different media.
Network Layer Protocols and Internet Protocol (IP)

Provides services
to exchange data
over the network
between end
devices.

4 Processes:
Addressing
Encapsulation
Routing
Decapsulation
Network Layer protocols
 Internet Protocol version 4 (IPv4) –most widely used
 Internet Protocol version 6 (IPv6) –
 Novell Internetwork Packet Exchange (IPX)
 AppleTalk
 Connectionless Network Service (CLNS/DECNet)
Network Layer Protocols and Internet Protocol (IP)
 Source/Destination IP addresses get added at the
network layer (layer 3).
Network Layer Protocols and Internet Protocol (IP)
 IP packet looks like this. Now let’s break down the 6
key fields.
6 key fields of IP header
 IP source address – 32 bit ip address of the source host
 IP destination address - 32 bit ip address of the destination host –
used to forward the packet by the router!
 Time-to-live (TTL) – 8-bit binary that tells the ‘remaining life’ of the
packet. Countdown mechanism at each hop. When is reaches
zero (0), packet is dropped to prevent routing loops.
 Type-of-service (ToS) – 8-bit binary used to determine the priority
of each packet. Different types of packets get processed at higher
priorities.
 Protocol – indicates the data payload type carried in the packet.
01=ICMP, 06=TCP, 17=UDP, etc.
 Fragment Offset – used in case a packet has to be split because
of changing media type to re-construct the packet at the
destination.
Transport Layer Role and Services
Transport layer
 Purpose:
Track individual communication between applications on
source/destination hosts
Segment data and manage each piece of data – prepares it to
be sent across the network (network layer). Encapsulation is
required on each piece of data including information that will
allow that data to be tracked. WITHOUT SEGMENTATION, only
ONE application would be able to receive data.
Re-assemble segments back into streams of application data at
the receiving host. Prepares it to be passed back to the
application layer.
Identify the different applications using port numbers. Each
software process that needs to access the network is assigned
a port # that is unique in that host. Indicates which application
that piece of data is associated with.
Controlling conversations
 Segmentation and reassembly – Transport layer divides
application data into blocks of data that are the appropriate
size. At the destination, the transport layer reassembles the
data before sending it up to the application or service.
 Conversation multiplexing – Many applications or services
might be running on each host. Each is assigned a port # so
that the Transport layer can determine which application or
service is associated with that data.
 TCP at the transport layer also provide
Connection-oriented conversations
Reliable/accurate delivery
Ordered data reconstruction
Flow control
Controlling Conversations (cont’d)
 Establish a session – connection-oriented (TCP) or
connectionless (UDP)
 Reliable delivery – ensures that all pieces reach their
destination by having the source device retransmit any
data that is lost
 Same order delivery – numbering and sequencing
segments ensures the transport layer segments are
reassembled in the proper order
 Flow control – hosts have limited resources (memory,
bandwidth, etc.) If these get over-taxed, transport layer
can request the flow of data be slowed. Why do this?
Prevent the receiver from being overwhelmed with data!
TCP & UDP protocols

Web browsers

E-mail

File transfers

DNS

VoIP

Video
streaming
TCP vs. UDP - characteristics
UDP – Connectionless
Advantage – low overhead data delivery
pieces – datagrams
‘Best Effort’ delivery
Used by application that don’t require reliable delivery
Minimal delays

TCP – connection-oriented
More overhead
Same order delivery
Reliability
flow-control
Source vs. Destination Port #’s
 Source ports –
Dynamically and randomly assigned by the originating device
from port #’s > 1023
Must not conflict with other ports in use at the time
 Destination port
Port # assigned to the service daemon running on the remote
host
Must know which layer 4 protocol (TCP/UDP) and which
application (port #)
Many common applications have default port # assignments
 Socket - combination of IP address and port #
192.168.100.48:80 would be HTTP on that IP address
Transport Layer Role and Services
IANA & Port #’s
 IANA – Internet Assigned Numbers Authority – assign port
#’s
 Port #’s
0-1023 – Well know ports reserved for services & applications
1024-49151 – registered ports assigned to user processes or
applications. May be used as a dynamically selected source port
49152-65535 – Dynamic or private ports (Ephemeral ports).
Port #’s (know these)
 TCP  TCP/UDP
20&21 – FTP  53 – DNS
23 – Telnet
 161 – SNMP
25 – SMTP
80 – HTTP
110 – POP3
443 - HTTPS
 UDP
69 – TFTP
520 – RIP
Netstat

 Utility that can be used to verify connections. Lists the


protocol, the local address and port #, foreign address
& port #, and the state of the connection

 Drop out to command line and try it


 >netstat
 >netstat –n (notice the port # after the : in the foreign ip
address) (you will have to identify port # here on your
test!)
 >netstat –e –s
Segmentation & reassembly

 TCP & UDP do this differently


 TCP – sequence #’s are used for reassembly at the
destination in the correct order. Data is ensured to be
in the exact form the sender intended.
 UDP – not concerned with order or maintaining a
connection. Generates less overhead which means
faster data transfer. Applications that use UDP must
tolerate the fact that data may not arrive in the order
that it was sent. Does NOT require reliable delivery of
packets.
3-way Handshake
 Steps to establish a connection
1) The sender sends an initial SEQ value (set by TCP) to
begin communication!
2) The receiver responds with an ACK value = to the SEQ
value + 1. The ACK should always be the NEXT expected
Byte.
3) Sender responds with an ACK value = to SEQ value it
received + 1.
Managing TCP Sessions
Managing TCP Sessions
If an acknowledgement wasn’t sent, the host will RESEND
the data because it has reached a timeout.
UDP Protocol
 Go over characteristics of UDP – used by DNS, SNMP,
DHCP, RIP, TFTP, Online games, streaming video, etc.
UDP Protocol
 UDP doesn’t care if datagrams are out of order!
OSI Model

Session Layer
Session layer provides mechanism for controlling the
dialogue between the two end systems. It defines how to
start, control and end conversations (called sessions)
between applications.
This layer requests for a logical connection to be
established on an end-user’s request.
Any necessary log-on or password validation is also
handled by this layer.
Session layer is also responsible for terminating the
connection.
This layer provides services like dialogue discipline
which can be full duplex or half duplex.
Session layer can also provide check-pointing
mechanism such that if a failure of some sort occurs
between checkpoints, all data can be retransmitted from
the last checkpoint.
OSI Model

Presentation Layer
Presentation layer defines the format in which the
data is to be exchanged between the two
communicating entities.
Also handles data compression and data encryption
(cryptography).
OSI Model

Application Layer
Application layer interacts with application
programs and is the highest level of OSI model.
Application layer contains management functions to
support distributed applications.
Examples of application layer are applications such
as file transfer, electronic mail, remote login etc.
OSI Model

OSI in Action
A message begins at the top
application layer and moves down
the OSI layers to the bottom
physical layer.
As the message descends, each
successive OSI model layer adds
a header to it.
A header is layer-specific
information that basically explains
what functions the layer carried
out.
Conversely, at the receiving end,
headers are striped from the
message as it travels up the
corresponding layers.

You might also like