OSI Model
OSI Model
Layered Architecture
The OSI model is built of seven ordered layers: physical (layer 1),
data link (layer 2), network (layer 3), transport (layer 4), session
(layer 5), presentation (layer 6), and application (layer 7).
Figure 3.2 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.
Figure 2.1 Tasks involved in sending a letter
Fig. 3-1 The OSI model
Fig. c
Fig. b
Fig. a
Fig. 3-2 OSI layers
Fig. d
These intermediate nodes usually involve only the first three
layers of the OSI model. In developing the model, the designers
distilled the process of transmitting data down to its most
fundamental elements. They identified which networking
functions had related uses and collected those functions into
discrete groups that became the layers. Each layer defines a
family of functions distinct from those of the other layers. By
defining and localizing functionality in this fashion, the designers
created an architecture that is both comprehensive and flexible.
Most important, the OSI model allows complete transparency
between otherwise incompatible systems.
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. This communication is governed by an agreed-upon
series of rules and conventions called protocols. 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.
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
to that layer are taken. By the time it reaches layer 7, the message is
again in a form appropriate to the application and is made available
to the recipient.
Fig. 3-3 An exchange using the OSI model
Functions Of The Layers
Physical Layer
This first layer receives a data unit from the second layer and puts it
into a format capable of being carried by a communications link. It
oversees the changing of a bit stream into electromagnetic signals,
and their transmission onto and across a medium (see Figure 3.4).
Fig. 3-4 Physical layer
This seemingly simple task requires a number of considerations:
The data link layer is responsible for delivering data units (groups of
bits) from one station to the next without errors. It accepts a data
unit from the third layer and adds meaningful bits to the beginning
(header) and end (trailer) that contain addresses and other control
information. A data unit with this additional information is called a
frame (see Figure 3.5).
Headers and trailers at this level are added by the sending node,
then checked and interpreted by the receiving node. Once a
receiving node accepts a frame, it strips off the header and trailer
and passes the remaining data unit on to the network layer.
Specific responsibilities of the data link layer include the
following:
When the standards were developed for local area networks, the
data link layer was subdivided into two sublayers: logical link
control (LLQ and media access control (MAC). This subdivision
allows for inconsistencies between the protocols of different
vendors.
Example 3.1
Network Layer
Routing means selecting the best path for sending a packet from
one point to another when more than one path is available. In
this case, each packet may take a different route to the
destination, where the packets are collected and reassembled into
their original order. Routing considerations include speed, cost,
and the ability to change pathways in midtransmission.
Routing and switching require the addition of a header that
includes, among other information, the source and destination
addresses of the packet. These addresses are different from the
physical (node) addresses included in the data link header. Data
link addresses are of the current and next node only (the physical
addresses). They change as a frame moves from one node to the
next. Network layer addresses are those of the original source and
the final destination. They do not change during transmission and
are often called the logical addresses. The addition of the network
layer header is shown in Figure 3.7.
Fig. 3-7 Network layer
Specific responsibilities of the network include the following:
Now imagine that in Figure 3.8 we want to send data from a node
with network address A and physical address 10, located on one
local area network, to a node with a network address P and physical
address 95, located on another local area network. Because the two
devices are located on different networks, we cannot use link
addresses only; the link addresses have only local jurisdiction. What
we need here are universal addresses that can pass through the
boundaries of local area networks. The network (logical) addresses
have this characteristic. The packet at the network layer contains
the logical addresses, which remain the same from the original
source to the final destination (A and P, respectively, in the figure).
They will not change when we go from network to network.
However, the physical addresses will change when the packet moves
from one network to another. The box with the R is a router
(internetwork device), which we will discuss in Chapter 15****.
Fig. 3-8 Network layer (Example 3.2)
Transport Layer
Computers often run several programs at the same time. For this
reason, source-to-destination delivery means delivery not only from
one computer to the next but also from a specific application on one
computer to a specific application on the other. The transport layer
header must therefore include a type of address called a service-
point address (also called a port address or socket address).
The network layer gets each packet to the correct computer; the
transport layer gets the entire message to the correct application
on that computer.
The header for this layer includes control information such as the
type of the data unit being sent and synchronization point
information. The relationship of the session layer to the transport
and presentation layers is shown in Figure 3.13.
Fig. 3-11 Session layer
Specific responsibilities of the session layer include the following:
Example 3.4
Example 3.5
The sending station uses an encryption algorithm (see Chapter
20****) to protect the data from eavesdropping. The encrypted
data are decrypted at the destination presentation layer before
being delivered to the application layer.
Application Layer