Layered Models

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 17

Data Communication and Computer Networks Course Code: CoSc2061 |2011 E.

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.

Compiled By: - Mr.Mezgebe A. Dep’t CS Year: II Page 1


Data Communication and Computer Networks Course Code: CoSc2061 |2011 E.C

figure 4.1 OSI model

Compiled By: - Mr.Mezgebe A. Dep’t CS Year: II Page 2


Data Communication and Computer Networks Course Code: CoSc2061 |2011 E.C
The Need for Layer Architecture

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.

OSI model has various advantages:

1.  It is a truly generic model. And it is considered as a standard model in computer


networking.
2.  Layers in OSI model architectures are distinguished according to the services, interfaces,
and protocols.
3. Since the protocols are hidden, any protocols can be implemented in this model. So I call it
as a generic model. It has all flexibility to adopt with many protocols.
4. It supports connection-oriented as well as connectionless services. So we can use
connection oriented model when we need reliability and connection-less services when we
need a faster data transmission over the internet.
5. It follows the divide and conquer technique. All the services are distinguished in various
layers. So administration and maintenance for these OSI model architecture are
straightforward and easy.
6. This layered architecture follows abstraction principle. Change in one layer does not impact
much on other layers.
7. It is more secure and adaptable than having all services bundled in a single layer.
8. 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.
9. Reduces complexity (one big problem to smaller ones)
10. Standardizes interfaces (between layers)
11. Facilitates modular engineering (different teams work on different modules)
12. Assures interoperable technology
13. Accelerates evolution of networking technology
14. Simplifies teaching and learning
15. Helps users understand the big picture of networking
16. Helps users understand how hardware and software elements function together
17. Makes troubleshooting easier by separating networks into manageable pieces
18. Defines terms that networking professionals can use to compare basic functional
relationships on different networks
19. Helps users understand new technologies as they are developed
20. Aids in interpreting vendor explanations of product functionality

Open System Interconnection (OSI) Model


 Established in 1947, the International Standards Organization (ISO) is a multinational
body dedicated to worldwide agreement on international standards.
 Almost three-fourths of countries in the world are represented in the ISO.
 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.
 ISO is the organization; OSI is the model.

Compiled By: - Mr.Mezgebe A. Dep’t CS Year: II Page 3


Data Communication and Computer Networks Course Code: CoSc2061 |2011 E.C
 An open system is a set of protocols that allows any two different systems to
communicate regardless of their underlying architecture.
 The OSI model is not a protocol;
 It is a model for understanding and designing a network architecture that is flexible,
robust, and interoperable.
 The OSI model was intended to be the basis for the creation of the protocols in the OSI
stack.
 The OSI model is a layered framework for the design of network systems that allows
communication between all types of computer systems.
 It consists of seven separate but related layers, each of which defines a part of the
process of moving information across a network.
 Understanding the fundamentals of the OSI model provides a solid basis for exploring
data communications.

Figure 4.2 seven OSI model Layers

The Seven Layers of an OSI Model


 The OSI model has 7 layers.
 The principles that were applied to arrive at the seven layers are as follows:
1. A layer should be created where a different level of abstraction is needed.
2. Each layer should perform a well-defined function.
3. The function of each layer should be chosen with an eye toward defining internationally
standardized protocols.
4. The layer boundaries should be chosen to minimize the information flow across the
interfaces.

Compiled By: - Mr.Mezgebe A. Dep’t CS Year: II Page 4


Data Communication and Computer Networks Course Code: CoSc2061 |2011 E.C
5. The number of layers should be large enough that distinct functions need not be thrown
together in the same layer out of necessity, and small enough that the architecture does
not become unwieldy.

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:

Compiled By: - Mr.Mezgebe A. Dep’t CS Year: II Page 5


Data Communication and Computer Networks Course Code: CoSc2061 |2011 E.C
 Cabling system components
• Adapters that connect media to physical interfaces
• Connector design and pin assignments
• Hub, repeater, and patch panel specifications
• Wireless system components
• Parallel SCSI (Small Computer System Interface)
• Network Interface Card (NIC)

2 Data Link Layer


The data link layer transforms the physical layer, a raw transmission facility, to a reliable link.
It makes the physical layer appear error-free to the upper layer (network layer). Other
responsibilities of the data link layer include the following:
 Framing. The data link layer divides the stream of bits received from the network layer
into manageable data units called frames.

 The data here is in the form of frames.


 The sender breaks the input data into data frames and transmit them
sequentially (numbering them) by adding error detecting codes
 The receiver confirms correct receipt by sending back an acknowledgement
frame

 Physical addressing. If frames are to be distributed to different systems on the network,


the data link layer adds a header to the frame to define the sender and/or receiver of the
frame. If the frame is intended for a system outside the sender’s network, the receiver
address is the address of the connecting device that connects the network to the next one.
 Flow control. If the rate at which the data is absorbed by the receiver is less than the rate
produced at the sender, the data link layer imposes a flow control mechanism to prevent
overwhelming the receiver.
 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. Error control is normally achieved through a trailer added to
the end of the frame.
 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.

Compiled By: - Mr.Mezgebe A. Dep’t CS Year: II Page 6


Data Communication and Computer Networks Course Code: CoSc2061 |2011 E.C
 It performs synchronization, error detection, and correction, and assembling messages
into frames.
 Here is also the responsibility of receiving acknowledgments for messages and taking
further steps accordingly.
 Hence it ensures reliable transmission of each message.

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.

Layer 2 of the OSI model provides the following functions:


• Allows a device to access the network to send and receive messages
• Offers a physical address so a device’s data can be sent on the network
• Works with a device’s networking software when sending and receiving messages
• Provides error-detection capability

Common networking components that function at layer 2 include:


• Network interface cards
• Ethernet and Token Ring switches
• Bridges

Compiled By: - Mr.Mezgebe A. Dep’t CS Year: II Page 7


Data Communication and Computer Networks Course Code: CoSc2061 |2011 E.C
NICs have a layer 2 or MAC address. A switch uses this address to filter and forward traffic,
helping relieve congestion and collisions on a network segment.
Bridges and switches function in a similar fashion; however, bridging is normally a software
program on a CPU, while switches use Application-Specific Integrated Circuits (ASICs) to
perform the task in dedicated hardware, which is much faster.

3 Network Layer

 The data here is in the form of packets.


 It manages the routing of data.
 This layer takes decisions for routing and acts as a network controller.
 It divides the outgoing messages into packets and assembles the incoming packets into
messages.
 Internet Protocol is also equipped with Network layer.
 There are two IP address versions as IPv4 and IPv6.
 allows heterogeneous networks to communicate - addressing, packet size, protocol
differences
 arrival order of packets may not be respected - let higher layers do the rearrangement if
need be

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.

Compiled By: - Mr.Mezgebe A. Dep’t CS Year: II Page 8


Data Communication and Computer Networks Course Code: CoSc2061 |2011 E.C

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

 It decides if the transmission is to take place in parallel or a single path.


 It takes care of multiplexing and guarantees transmission of data from one end to the
other.
 It also breaks the data into smaller groups hence performing splitting and segmentation.
 deliver messages in the order they were sent or without guarantee of the order of delivery
 broadcasting messages to multiple destinations
 allows peer entities on the source and destination machines to hold conversations

Other responsibilities of the transport layer include the following:


 Service-point addressing. 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 process (running program) on one computer to a specific

Compiled By: - Mr.Mezgebe A. Dep’t CS Year: II Page 9


Data Communication and Computer Networks Course Code: CoSc2061 |2011 E.C
process (running program) on the other. The transport layer header must therefore include
a type of address called a service-point address (or port address). The network layer gets
each packet to the correct computer; the transport layer gets the entire message to the
correct process on that computer.
 Segmentation and reassembly. A message is divided into transmittable segments, with
each segment containing a sequence number. These numbers enable the transport layer to
reassemble the message correctly upon arriving at the destination and to identify and
replace packets that were lost in transmission.
 Connection control. The transport layer can be either connectionless or connection
oriented. A connectionless transport layer treats each segment as an independent packet
and delivers it to the transport layer at the destination machine. A connection oriented
transport layer makes a connection with the transport layer at the destination machine
first before delivering the packets. After all the data are transferred, the connection is
terminated.
 Flow control. Like the data link layer, the transport layer is responsible for flow control.
However, flow control at this layer is performed end to end rather than across a single
link.
 Error control. Like the data link layer, the transport layer is responsible for error
control. However, error control at this layer is performed process-to process rather than
across a single link. The sending transport layer makes sure that the entire message
arrives at the receiving transport layer without error (damage, loss, or duplication). Error
correction is usually achieved through retransmission.

Figure 4.3 Reliable process-to-process delivery of a message

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

Compiled By: - Mr.Mezgebe A. Dep’t CS Year: II Page 10


Data Communication and Computer Networks Course Code: CoSc2061 |2011 E.C
 Client-side entity identification
 Confirmation that the entire message arrived intact
 Segmentation of data for network transport
 Control of data flow to prevent memory overruns
 Establishment and maintenance of both ends of virtual circuits
 Transmission-error detection
 Realignment of segmented data in the correct order on the receiving side
 Multiplexing or sharing of multiple sessions over a single physical link
The most common transport layer protocols are the connection-oriented TCP Transmission
Control Protocol (TCP) and the connectionless UDP User Datagram Protocol (UDP).

5 Session Layer

 It manages and synchronizes conversations between two different applications by


establishing a session and ending a session.
 It includes logging in and out of the users with user authentication details and auditing for
the purpose of billing as well.
 allows users to establish sessions between them
 services include
 dialog control - keeping track of whose turn it is to transmit
 token management - preventing two parties from attempting the same critical operation at
the same time
 synchronization – check pointing long transmissions to allow them to continue from
where they were after a crash
 Virtual connection between application entities
 Creation of dialog units
 Connection parameter negotiations
 Partitioning of services into functional groups
 Acknowledgements of data received during a session
 Retransmission of data if it is not received by a device

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.

Compiled By: - Mr.Mezgebe A. Dep’t CS Year: II Page 11


Data Communication and Computer Networks Course Code: CoSc2061 |2011 E.C

Figure 4.4 Session layer

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

Compiled By: - Mr.Mezgebe A. Dep’t CS Year: II Page 12


Data Communication and Computer Networks Course Code: CoSc2061 |2011 E.C
Figure 4.5 Presentation layer

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

 This is the top-most layer in 7 layers of OSI model in networking.


 It directly interacts with the user.
 The login and password check takes place here.
 Re-transmission of files due to any errors, manipulation of information, etc. takes place
here.
 It deals with user interface design.
 contains all the higher level protocols that are commonly needed by users;
 examples are

 HTTP (Hypertext Transfer Protocol) - for fetching pages on the WWW


 TELNET - virtual terminal, to log on to a remote machine

 FTP - file transfer


 SMTP - e-mail
 DNS - for mapping host names onto their network addresses

Compiled By: - Mr.Mezgebe A. Dep’t CS Year: II Page 13


Data Communication and Computer Networks Course Code: CoSc2061 |2011 E.C
Summary of Layers

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.

Compiled By: - Mr.Mezgebe A. Dep’t CS Year: II Page 14


Data Communication and Computer Networks Course Code: CoSc2061 |2011 E.C

Figure 4.6 Peer-to-Peer Processes

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. Each interface defines the information and services a layer must
provide for the layer above it. Well-defined interfaces and layer functions provide modularity to
a network. As long as a layer provides the expected services to the layer above it, the specific
implementation of its functions can be modified or replaced without requiring changes to the
surrounding layers.

Compiled By: - Mr.Mezgebe A. Dep’t CS Year: II Page 15


Data Communication and Computer Networks Course Code: CoSc2061 |2011 E.C

Organization of the Layers


The seven layers can be thought of as belonging to three subgroups. Layers I, 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 (such as electrical specifications, physical connections,
physical addressing, and transport timing and reliability). Layers 5, 6, and 7-session,
presentation, and application-can be thought of as the user support layers; they allow
interoperability among unrelated software systems. 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 upper OSI layers are almost always implemented in software; lower layers
are a combination of hardware and software, except for the physical layer, which is mostly
hardware. In Figure below which gives an overall view of the OSI layers, D7 means the data unit
at layer 7, D6 means the data unit at layer 6, and so on. The process starts at layer 7 (the
application layer), then moves from layer to layer in descending, sequential order. At each layer,
a header, or possibly a trailer, can be added to the data unit. Commonly, 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 transported along a physical link.

Figure 4.7 An exchange using the OS! 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 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.

Compiled By: - Mr.Mezgebe A. Dep’t CS Year: II Page 16


Data Communication and Computer Networks Course Code: CoSc2061 |2011 E.C

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.

Compiled By: - Mr.Mezgebe A. Dep’t CS Year: II Page 17

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy