Layered Models
Layered Models
Layered Models
C
Chapter -5
Layered Models
Communication and Layer Architecture
Information being transferred from a software application in one computer system to a software
application in another must pass through the OSI layers. For example, if a software application in
System A has information to transmit to a software application in System B, the application program
in System A will pass its information to the application layer (Layer 7) of System A. The application
layer then passes the information to the presentation layer (Layer 6), which relays the data to the
session layer (Layer 5), and so on down to the physical layer (Layer 1). At the physical layer, the
information is placed on the physical network medium and is sent across the medium to System B.
The physical layer of System B removes the information from the physical medium, and then its
physical layer passes the information up to the data link layer (Layer 2), which passes it to the
network layer (Layer 3), and so on, until it reaches the application layer (Layer 7) of System B.
Finally, the application layer of System B passes the information to the recipient application program
to complete the communication process.
A given layer in the OSI model generally communicates with three other OSI layers: the layer
directly above it, the layer directly below it, and its peer layer in other networked computer systems.
The data link layer in System A, for example, communicates with the network layer of System A, the
physical layer of System A, and the data link layer in System B.
OSI is a reference model for network communication across all types of computer systems. It
follows seven layered architecture that defines different functionalities at each layer.
1 Physical Layer
It maintains the physical connection and defines the voltages and data rates.
Everything related to signals is handled here including transmission of digital bits as
electronic signals.
It decides if the transmission mode will be simplex, half-duplex or full-duplex.
It defines the topology configuration, synchronization, and various such issues.
The physical layer is responsible for moving individual bits from one (node) to the
next.
The physical layer is also concerned with the following:
Physical characteristics of interfaces and media. The physical layer defines the
characteristics of the interface between the devices and the transmission media. It also
defines the type of transmission media.
Representation of bits. The physical layer data consists of a stream of bits (sequence of
0s or 1s) with no interpretation. To be transmitted, bits must be encoded into signals—
electrical or optical. The physical layer defines the type of encoding (how 0s and 1s are
changed to signals).
Data rate. The transmission rate—the number of bits sent each second—is also
defined by the physical layer. In other words, the physical layer defines the duration of a
bit, which is how long it lasts.
Synchronization of bits. The sender and receiver must not only use the same bit rate but
must also be synchronized at the bit level. In other words, the sender and the receiver
clocks must be synchronized.
Line configuration. The physical layer is concerned with the connection of devices to
the media. In a point-to-point configuration, two devices are connected together
through a dedicated link. In a multipoint configuration, a link is shared between several
devices.
Physical topology. The physical topology defines how devices are connected to make a
network. Devices can be connected using a mesh topology (every device connected to
every other device), a star topology (devices are connected through a central device), a
ring topology (each device is connected to the next, forming a ring), or a bus topology
(every device on a common link).
Transmission mode. The physical layer also defines the direction of transmission
between two devices: simplex, half-duplex, or full-duplex. In the simplex mode, only
one device can send; the other can only receive. The simplex mode is a one way
communication. In the half-duplex mode, two devices can send and receive, but not at
the same time. In a full-duplex (or simply duplex) mode, two devices can send and
receive at the same time.
The physical layer of the OSI model defines connector and interface specifications, as well as the
medium (cable) requirements. Electrical, mechanical, functional, and procedural specifications
are provided for sending a bit stream on a computer network.
Components of the physical layer include:
As the figure shows, communication at the data link layer occurs between two adjacent nodes.
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. Finally, the data link layer at E sends a new frame to the data link layer at
F. Note that 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. The frame
from E to F has F as the destination address and E as the source address. The values of the
trailers can also be different if error checking includes the header of the frame.
3 Network Layer
The network layer is responsible for the source-to-destination delivery of a packet, possibly
across multiple networks (links). Whereas the data link layer oversees the delivery of the packet
between two systems on the same network (links), the network layer ensures that each packet
gets from its point of origin to its final destination.
If two systems are connected to the same link, there is usually no need for a network layer.
However, if the two systems are attached to different networks (links) with connecting devices
between the networks (links), there is often a need for the network layer to accomplish source-to-
destination delivery. Figure 2.8 shows the relationship of the network layer to the data link and
transportlayers.
As the figure shows, now we need a source-to-destination delivery. 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. As we will see in later chapters, router B
uses its routing table to find that the next hop is router E. The network layer at B, therefore,
sends the packet to the network layer at E. The network layer at E, in tum, sends the packet to the
network layer at F.
4 Transport Layer
Layer 4, the transport layer of the OSI model, offers end-to-end communication between end
devices through a network. Depending on the application, the transport layer either offers
reliable, connection-oriented or connectionless, best-effort communications.
Some of the functions offered by the transport layer include:
Application identification
5 Session Layer
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 only pages that need to
be resent after system recovery are pages 501 to 523. Pages previous to 501 need not be resent.
6 Presentation Layer
Layer 6, the presentation layer, is responsible for how an application formats the data to be sent out onto
the network. The presentation layer basically allows an application to read (or understand) the message.
Examples of presentation layer functionality include:
• Encryption and decryption of a message for security
• Compression and expansion of a message so that it travels efficiently
Graphics formatting
Content translation
System-specific translation
Works on how the data is presented to the users.
It ensures that the receiver system can read the data sent by the sender.
This is done by translation of the file format into a universal code or into the code
apt for the receiver machine.
Concerned with the syntax and semantics of the information transmitted
Provides character code conversion, and data compression
7 Application Layer
Layer 7, the application layer, provides an interface for the end user operating a device
connected to a net- work. This layer is what the user sees, in terms of loading an application
(such as Web browser or e-mail); that is, this application layer is the data the user views while
using these applications.
Examples of application layer functionality include:
Support for file transfers
Ability to print on a network
Electronic mail
Electronic messaging
Browsing the World Wide Web
Peer-to-Peer Processes
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.
At the physical layer, communication is direct: A Device A sends a stream of bits to device B
(through intermediate nodes). At the higher layers, however, communication must move down
through the layers on device A, over to device B, and then back up through the layers. 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 layer I the entire package is
converted to a form that can be transmitted to the receiving device. At the receiving machine, the
message is unwrapped layer by layer, with each process receiving and removing the data meant
for it. For example, layer 2 removes the data meant for it, then passes the rest to layer 3. Layer 3
then removes the data meant for it and passes the rest to layer 4, and so on.
Encapsulation
Figure 4.6 reveals another aspect of data communications in the OSI model: encapsulation.
A packet (header and data) at level 7 is encapsulated in a packet at level 6. The whole packet at
level 6 is encapsulated in a packet at level 5, and so on. In other words, the data portion of a
packet at level N - 1 carries the whole packet (data and header and maybe trailer) from level N.
The concept is called encapsulation; level N - 1 is not aware of which part of the encapsulated
packet is data and which part is the header or trailer. For level N - 1, the whole packet coming
from level N is treated as one integral unit.
Data-link and its responsibilities
The data link layer transforms the physical layer, a raw transmission facility, to a link
responsible for node-to-node (hop-to-hop) communication. Specific responsibilities of the data
link layer include framing, addressing, flow control, error control, and media access control.
The data link layer divides the stream of bits received from the network layer into manageable
data units called frames. The data link layer adds a header to the frame to define the addresses of
the sender and receiver of the frame. 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. The data link layer also adds reliability
to the physical layer by adding mechanisms to detect and retransmit damaged, duplicate, or lost
frames.
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.