0% found this document useful (0 votes)
76 views50 pages

Chapter 2 LAYERs in The OSI Model

The document discusses network models and describes how tasks in sending data from one location to another can be broken down into layers, using the example of sending a letter through the postal system. It explains that in the layered model each layer uses the services of the layer below it, from the highest layer where the sender writes the letter down to the lowest layer of physical delivery. The OSI model provides a standardized 7-layer framework for network communication.

Uploaded by

Omar Zamzami
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
76 views50 pages

Chapter 2 LAYERs in The OSI Model

The document discusses network models and describes how tasks in sending data from one location to another can be broken down into layers, using the example of sending a letter through the postal system. It explains that in the layered model each layer uses the services of the layer below it, from the highest layer where the sender writes the letter down to the lowest layer of physical delivery. The OSI model provides a standardized 7-layer framework for network communication.

Uploaded by

Omar Zamzami
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 50

Chapter

Network Models
LAYERED TASKS

• A network is a combination of hardware and software that sends


data from one location to another. The hardware consists of the
physical equipment that carries signals from one point of the
network to another. The software consists of instruction sets that
make possible the services that we expect from a network.

• The task of sending an e-mail from one point in the world to


another can be broken into several tasks, each performed by a
separate software package. At the lowest layer, a signal, or a set
of signals, is sent from the source computer to the destination
computer.
LAYERED TASKS

• We use the concept of layers in our daily life. As an example, for


two friends who communicate through postal mail. The process
of sending a letter to a friend would be complex if there were no
services available from the post office.
LAYERED TASKS

At the Sender Site:

• Higher layer: The sender writes the letter, inserts the


letter in an envelope, write the sender and receiver
addresses, and drops the letter in a mailbox.

• Middle layer: The letter is picked up by a letter carrier


and delivered to the post office.

• Lower layer: The letter is sorted at the post office; a


carrier transports the letter.
LAYERED TASKS

On the Way:

• The letter is then on its way to the recipient. On the way


to the recipient's local post office, the letter may actually
go through a central office. In addition, it may be
transported by truck, train, airplane, boat, or a
combination of these.
LAYERED TASKS

At the Receiver Site


• Lower layer: The carrier transports the letter to the post
office.
• Middle layer: The letter is sorted and delivered to the
recipient's mailbox.
• Higher layer: The receiver picks up the letter, opens the
envelope, and reads it.
LAYERED TASKS

In the previous example, each layer at the sending site uses


the services of the layer immediately below it. The
sender at the higher layer uses the services of the middle
layer. The middle layer uses the services of the lower layer.
The lower layer uses the services of the carrier.
Reasons for a layered model
 Change: When changes are made to one layer, the impact on the other layers is
minimized. If the model consists of a single, all-encompassing layer, any change
affects the entire model.
 Design: A layered model defines each layer separately. As long as the
interconnections between layers remain constant, protocol designers can
specialize in one area (layer) without worrying about how any new
implementations affect other layers.
 Learning: The layered approach reduces a very complex set of topics,
activities, and actions into several smaller, interrelated groupings. This makes
learning and understanding the actions of each layer and the model generally
much easier.
 Troubleshooting: The protocols, actions, and data contained in each layer of
the model relate only to the purpose of that layer. This enables troubleshooting
efforts to be pinpointed on the layer that carries out the suspected cause of the
problem.
 Standards: Probably the most important reason for using a layered model is
that it establishes a prescribed guideline for interoperability between the various
vendors developing products that perform different data communications tasks.
Remember, though, that layered models, including the OSI model, provide only a
guideline and framework, not a rigid standard that manufacturers can use when
THE OSI MODEL

• 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.

• 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.
ISO is the organization.
OSI is the model.

 It consists of seven separate


but related layers, each of
which defines a part of the
process of moving information
across a network

Seven layers of the OSI model


THE OSI MODEL

The animation given explains how data exchange between two devices using OSI model

http://www.mhhe.com/engcs/compsci/forouzan/dcn/graphics/animations/03_03.swf
Layered Architecture
 Figure shows the layers
involved when a message
is sent from device A to
device B.
 As the message travels
from A to B, it may pass
through many
intermediate nodes. These
intermediate nodes usually
involve only the first three
layers of the OSI model.
Layered Architecture
 Within a single machine, each layer calls
upon the services of the layer just below
it.
 Layer 3, for example, uses the services
provided by layer 2 and provides services
for layer 4.
 Between machines, layer x on one
machine communicates with layer x on
another machine.
 The processes on each machine that
communicate at a given layer are called
peer-to-peer processes.
 Communication between machines is
therefore a peer-to-peer process using
the protocols appropriate to a given layer.
Peer-to-Peer Processes
 At the physical layer, communication is direct: device A sends a stream of
bits to device B.
 At the higher layers, however, communication must move down through the
layers on sending device; and then back up through the layers on receiving
device.
 Each layer in the sending device adds its own information to the message it
receives from the layer just above it and passes the whole package to the
layer just below it.
 At the receiving device, the message is unwrapped layer by layer, with each
process receiving and removing the data meant for it.

 The animation given explains how Peer-to-Peer communication happens in OSI

 http://scisweb.ulster.ac.uk/~kevin/com320/labs/Simulations/osipeer.swf
Interfaces Between Layers

 The passing of the data


(and network
information) down
through the layers of the
sending device and back
up through the layers of
the receiving device is
made possible by an
interface between each
pair of adjacent layers.
Organization of the Layers
 The seven layers can be thought of as
belonging to three subgroups.
A. Layers 1, 2, and 3-physical, data link,
and network-are the network support
layers; they deal with the physical
aspects of moving data from one
device to another.
B. Layers 5, 6, and 7-session,
presentation, and application-can be
thought of as the user support layers.
C. Layer 4, the transport layer, links the
two subgroups and ensures that what
the lower layers have transmitted is in
a form that the upper layers can use.
The OSI Model Animation

 https://www.youtube.com/watch?v=-6Uoku-M6oY

 The video explained the OSI model in animated format


and compare the Model with the real life example
Encapsulation
 When the information goes down
through layers (from top to bottom),
a header is added to it. The Header
contains information about that layer.
 This is called encapsulation because it
is like wrapping an object in a
capsule.
 Each header can be understood only
by the corresponding layer at the
receiving side. Other layers only see
that layer’s header as a part of data.
 At the receiving side, corresponding
header is stripped off in the same
layer it was attached.

(Question: what do you mean by encapsulation in OSI model?)


An exchange of data using the OSI model
 The process starts at layer 7 (the
application layer), then moves
from layer to layer in descending, D7 means the data unit at layer 7,
sequential order. D6 means the data unit at layer 6,
and so on.
 At each layer, a header, or
possibly a trailer, can be added to
the data unit.
 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 Figure 2.4 An exchange using the OSI model

transported along a physical link.


An exchange of data using the OSI model
 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 Figure 2.4 An exchange using the OSI model
to that layer are taken.
 By the time it reaches layer 7, the
message is again in a form
appropriate to the application and
Q: Explain how data is exchanged
is made available to the recipient.
using the OSI model?
LAYERS IN THE OSI MODEL : Class Activity

OSI Layered : Students Participation class Activity

OSI Layered : Students Participation Named OSI Layer


http://scisweb.ulster.ac.uk/~kevin/com320/labs/Simulations/osi.swf

OSI Layered : Students Participation OSI description / Definition

http://scisweb.ulster.ac.uk/~kevin/com320/labs/Simulations/osidesc.swf
7. Application layer
This is the closest layer to the end user. It provides the interface between the
applications we use and the underlying layers.

But notice that the programs you are using (like a web browser – IE, Firefox
or Opera…) do not belong to Application layer. Telnet, FTP, email client
(SMTP), HyperText Transfer Protocol (HTTP) are examples of Application
layer.
6. Presentation layer
This layer ensures the presentation of data, that the communications passing
through are in the appropriate form for the recipient.
In general, it acts as a translator of the network. For example, you want to send an
email and the Presentation will format your data into email format. Or you want to
send photos to your friend, the Presentation layer will format your data into GIF,
JPG or PNG… format.
This layer is also responsible for data encoding, compression, and encryption.
5. Session layer
The Session layer establishes, maintains, and manages the
communication session with the receiving device.
The session layer is also responsible for dialog control and
synchronization.
5. Session layer
 Dialog control. The session layer allows two systems to
enter into a dialog. It allows the communication between
two processes to take place in either half-duplex (one way at
a time) or full-duplex (two ways at a time) mode.
 Synchronization. The session layer allows a process to add
checkpoints, or synchronization points, to a stream of data.
 For example, if a system is sending a file of 2000 pages, it is
advisable to insert checkpoints after every 100 pages to ensure
that each 100-page unit is received and acknowledged
independently. In this case, if a crash happens during the
transmission of page 523, the transfer can be resumed after
system recovery from pages 501 to onwards.
4. Transport layer
This layer maintains flow control of data and provides for error
checking and recovery of data between the devices. The most
common example of Transport layer is Transmission Control
Protocol (TCP) and User Datagram Protocol (UDP).
The functions defined in this layer provide for the reliable
transmission of data segments, as well as the disassembly and
assembly of the data before and after transmission.
3. Network layer
This layer provides logical addresses which routers will use to
determine the path to the destination. In most cases, the logic
addresses here means the IP addresses (including source &
destination IP addresses).
The network layer is responsible for the delivery of individual
packets from the source host to the destination host.

http://www.mhhe.com/engcs/compsci/forouzan/dcn/graphics/animations/03_08.swf
3. Network layer
Hop-to-hop delivery (intermediate hopes)

 To send data from A to F,


three partial deliveries are
made.
 First, the data link layer at A
sends a frame to the data
link layer at B (a router).
 Second, the data link layer
at B sends a new frame to
the data link layer at E.
Hop-to-hop delivery
 Finally, the data link layer
at E sends a new frame to
the data link layer at F.
3. Network layer
Hop-to-hop delivery (source and dest. addresses)
 The frames that are exchanged
between the three nodes have
different values in the headers.
 The frame from A to B has B as
the destination address and A as
the source address.
 The frame from B to E has E as
the destination address and B as
the source address.
Hop-to-hop delivery
 The frame from E to F has F as
the destination address and E as
the source address.
3. Network layer

(A) Sends packet to


destination (F)
The network layer
at A sends the packet to
the network layer at B.
When the packet
arrives at router B, the
router makes a decision
based on the final
destination (F) of the
packet, and so on…

Source-to-destination delivery

http://www.mhhe.com/engcs/compsci/forouzan/dcn/graphics/animations/03_08.swf
2. Data link layer
 The Data Link layer formats the message into a data frame, and adds a
header containing the hardware destination and source address to it. This
header is responsible for finding the next destination device on a local
network.
 Notice that layer 3 is responsible for finding the path to the last destination
(network) but it doesn’t care about who will be the next receiver. It is the
Layer 2 that helps data to reach the next destination.
 This layer is subdivide into 2 sub-layers: logical link control (LLC) and media
access control (MAC).
 The LLC functions include:
+ Managing frames to upper and lower layers
+ Error Control
+ Flow control
 The MAC sublayer carries the physical address of each device on the
network. This address is more commonly called a device’s MAC address.
MAC address is a 48 bits address which is burned into the NIC card on the
device by its manufacturer.
http://www.mhhe.com/engcs/compsci/forouzan/dcn/graphics/animations/03_08.swf
2. Data link layer

Data link layer


2. Data link layer
Other responsibilities of the data link layer include the following:
1) Framing. The data link layer divides the stream of bits received from the
network layer into manageable data units called frames.
2) Flow control. If the rate at which the data are absorbed by the receiver is
less than the rate at which data are produced in the sender, the data link
layer imposes a flow control mechanism to avoid overwhelming the receiver.
3) Error control. The data link layer adds reliability to the physical layer by
adding mechanisms to detect and retransmit damaged or lost frames. It
also uses a mechanism to recognize duplicate frames.
4) Physical addressing. data link layer adds a header to each frame to define
the sender and/or receiver of the frame.
5) Access control. When two or more devices are connected to the same link,
data link layer protocols are necessary to determine which device has
control over the link at any given time.

Q. What are different responsibilities of Data link layer?


2. Data link layer

Note

The data link layer is responsible for moving


frames from one hope (node) to the next.
1. Physical layer
The Physical Layer defines the physical characteristics of the
network such as connections, voltage levels and timing.
The physical layer is responsible for movements of
individual bits from one node to the next.

Physical layer
Summery of layers

http://scisweb.ulster.ac.uk/~kevin/com320/labs/Simulations/osidesc.swf
Encapsulation (Packaging)
 For application data to travel uncorrupted from one host to another,
header (or control data), which contains control and addressing
information, is added to the data as it moves down the layers.
 The process of adding control information as it passes through the
layered model is called encapsulation. Decapsulation is the process
of removing the extra information and sending only the original
application data up to the destination application layer.

 In general, the package of data that moves through the layers is


called a Protocol Data Unit (PDU). However, as the data is
reformatted and repackaged, it takes on unique names on certain
layers. Table below lists the name each layer uses to refer to a
message.
OSI Model
Data unit Layer Function

7. Application Network process to application


Data representation, encryption and
6. Presentation decryption, convert machine dependent
Data
Host data to machine independent data

layers Interhost communication, managing


5. Session
sessions between applications
End-to-end connections, reliability and
Segments 4. Transport
flow control
Packet/
3. Network Path determination and logical addressing
Media Datagram
layers Frame 2. Data link Physical addressing

Bit 1. Physical Media, signal and binary transmission


TCP/IP and OSI model
TCP/IP and OSI model

 Physical and Data


Link Layers
 Network Layer
 Transport Layer
 Application Layer
2-5 ADDRESSING

• There are millions of computers in use on the web


and billions of messages traversing networks at
any given time, so proper addressing is essential
to make sure that the sent message arrives intact at
the proper destination.

• Addressing of data happens in three different


layers of the OSI model.Four levels of addresses
are used in an internet employing the TCP/IP
protocols: physical, logical, port, and specific.
Addresses in TCP/IP
Relationship of layers and addresses in TCP/IP
Addresses in TCP/IP

Getting Data to the End Device:


• Address identifiers are added to the data as it travels down on the source host.
There are two layers of addressing added to ensure that data is delivered to the
destination.

• The first identifier, the host physical address, is contained in the header of the
Layer 2 PDU, called a frame. Layer 2 is concerned with the delivery of messages
on a single local network. The Layer 2 address is unique on the local network and
represents the address of the end device on the physical media.

• When two end devices communicate on the local Ethernet network, the frames
that are exchanged between them contain the destination and source MAC
addresses.

• After a frame is successfully received by the destination host, the Layer 2 address
information is removed as the data is decapsulated and moved up the protocol
stack to Layer 3.
Addresses in TCP/IP (Getting Data Through the Internetwork):

• Layer 3 protocols are primarily designed to move data from one local network to
another local network within an internetwork.

• Layer 3 addresses must include identifiers that enable intermediary network


devices (router) to locate hosts on different networks.

• Every IP host address contains information about the network where the host is
located.

• At the boundary of each local network, an intermediary network device, usually


a router, decapsulates the frame to read the destination host address contained in
the header of the packet, the Layer 3 PDU.

• When the path is determined, the router encapsulates the packet in a new frame
and sends it on its way toward the destination end device.

• When the frame reaches its final destination, the frame and packet headers are
• removed and the data moved up to Layer 4.
Addresses in TCP/IP (Getting Data to the Right Application):

• At Layer 4, information contained in the PDU header identifies the specific


process or service running on the destination host device that will act on the data
being delivered.

• The transport layer adds port numbers to its segment header information to
ensure that the destination host knows which application process is to receive the
packet.

• The end host assigns a port number to each type of traffic going in and out.

• The segment contains both source and destination ports in case the receiver needs
to contact the sender.
Example 2.1 (Physical addresses)

In Figure 2.19 a node with physical address 10 sends a


frame to a node with physical address 87. The two nodes
are connected by a link (bus topology LAN). As the
figure shows, the computer with physical address 10 is
the sender, and the computer with physical address 87 is
the receiver.
Example 2.2

As we will see in Chapter 13, most local-area networks


use a 48-bit (6-byte) physical address written as 12
hexadecimal digits; every byte (2 hexadecimal digits) is
separated by a colon, as shown below:

07:01:02:01:2C:4B

A 6-byte (12 hexadecimal digits) physical address.


Note

The physical addresses change from hop to hop,


but the logical and port addresses usually remain the same.

You might also like