Chapter 4
Chapter 4
Chapter 4
Objectives
4.1 Introduction– Layered Architecture , Peer-to- Peer Processes, Interfaces between Layer,
Protocols, Organization of the Layers, Encapsulation.
4.2 Layers of the OSI Reference Model (Functions of each Layer & Protocols used) –Physical
Layer, Data-Link Layer, Network Layer, Transport Layer, Session Layer, Presentation
Layer, Application Layer.
• Now assume that Ann has to move to another town because of her job.
• Although both are sad, Maria opens a packet that contains two small machines.
• The first machine can scan and transform a letter in English to a secret code or
vice versa.
• The other machine can scan and translate a letter in Spanish to the same secret
code or vice versa.
• Ann takes the first machine; Maria keeps the second one.
• The two friends can still communicate using the secret code, as shown in Figure.
ISO –OSI Open Systems Interconnection 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.
• 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 is known as layering.
• The OSI model is a theoretical blueprint that helps us understand how data gets
from one user’s computer to another.
• It is also a model that helps develop standards so that all of our hardware and
software talks nicely to each other.
• It aids standardization of networking technologies.
• It provides an organized structure for hardware and software developers to follow,
to insure their products are compatible with current and future technologies.
Data Encapsulation
• The outgoing information will travel down through the layers to the lowest layer.
• While moving down on the source machine, it acquires all the control information
which is required to reach the destination machine.
• The control information is in the form of Headers and Trailer which surrounds the
data received from the layer above.
• This process of adding headers and trailers to the data is called as data
encapsulation.
• The information added by each layer is in the form of headers or trailers.
• At layer 1 the entire package is converted to a form that can be transferred to the
receiving machine.
• 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.
• The headers and trailers contain control information. The headers and trailers form
the envelope which carries the message to the desired destination.
The figure shows the example of five layer stack for data encapsulation.
The fifth layer of sending machine wants to send a message M to the fifth layer of
destination machine.
The message M is produced by layer 5 of machine 1 and given to layer 4 for transmission.
Layer 4 adds header H4 in front of the message and pass it to layer 3.
Layer 3 breaks up the incoming message into small units as M1 and M2 and pass these
packets to layer 2.
Layer 2 adds the header as well as footer to each packet obtained from layer 3 and pass
it to layer 1 for physical transmission.
The physical layer is responsible for the movement of individual bits from one hop
(node) to the next.
Functions of Physical Layer
• Physical characteristics of interfaces and medium.
• It also defines the type of transmission medium.
• How many pins the network connector has and what each pin is used for.
• Representation of bits. What electrical signals should be used to represent a 1 and a 0.
• Data rate: How many nanoseconds a bit lasts and bits per second.
• Synchronization of bits.
• Sender and Receiver must be synchronized
• Physical topology
• Mesh, Ring, Star, etc.
• Transmission mode. Whether transmission may proceed simultaneously in both
directions.
• Simplex, Half duplex, Duplex
2. Data Link Layer
• Data link layer attempts to provide reliable communication over the physical layer interface.
• Breaks the outgoing data into frames and re-assemble the received frames.
• Create and detect frame boundaries.
• Handle errors by implementing an acknowledgement and retransmission scheme.
• Implement flow control.
The data link layer is responsible for moving frames from one hop (node) to the next.
The network layer is responsible for the delivery of individual packets from the
source host to the destination host.
The figure shows a router connecting to two networks viz: A (Token Ring) and B
(Ethernet) at points X and Y respectively. This means that the router must have two interfaces
and also two Network interface cards (NICs) one to interact with network A at point X, and
the other to interact with network B at point Y. this enable it to send data between the two
networks A and B. A router connect more than two networks.
A router operates at a the physical, data link and network layer of the OSI model, as
shown in fig a router is termed as an intelligent device. A router is useful for interconnecting
two or more networks. These networks can be heterogeneous, which means that they can
differ in their physical characteristics such as frame size, transmission rates, topologies,
addressing etc. thus, if a router has to connect such different networks, it has to consider all
these issues. A router has to determine the best possible transmission path among several
available.
4. Transport Layer
• Purpose of this layer is to provide a reliable mechanism for the exchange of data
between two processes in different computers.
• Ensures that the data units are delivered error free.
• Ensures that data units are delivered in sequence.
• Ensures that there is no loss or duplication of data units.
• Provides connectionless or connection oriented service.
The transport layer is responsible for the delivery of a message from one process to another.
5. 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.
Functions of Session Layer
• Dialog control
• Synchronization, session and sub session
• Session closure
6. 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).
Functions of Presentation layer:
• Translation: presentation layer is responsible for converting various formats into
required format of the recipient.
• Encryption: Data encryption and decryption is done by presentation layer for
security.
• Compression and Decompression: data to be transform compressed while
sending and decompress while receiving for reducing time of transmission.
7. 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.
Functions of Application layer:
1. Network virtual terminal
2. File transfer access and management
3. Mail services and directory services
Horizontal communication
1. The horizontal communication is the logical connection between the layers, there is
no direct communication between them.
2. Information included in each protocol header by the transmitting system is a message
that will be carried to the same protocol in the destination system.
3. For two computers to communicate over a n/w, the protocol used at each layer of the
OSI model in the transmitting system must be duplicated at the receiving system.
4. The packet travels up through the protocol stack and each successive header is
stripped of by the appropriate protocol & processed.
5. When the packet arrived at its destination, the process by which the headers are
applied at the source is repeated in server.
Vertical communication:
1. In addition to communicating horizontally with the same protocol in the other
system, the header information also enables each layer to communicate with the layer
above & below it.
Eg. The n/w layer will communicate with the data link layer & transport layer.
2. This interlayer communication is called communication vertical.
3. When a system receives a packet & passes it up through various layers the data link
layer protocol header includes a field which specifies the name of n/w layer protocol
to be used to process the packet.
4. The n/w layer protocol header will specify the name of transport layer protocol to be
used to process the packet.
5. Due to vertical communication, it becomes protocol at each layer simultaneously.
Devices
Devices - Layer 7 Hosts PC Servers Mobile Phones, gateways
Devices - Layer 3 Routers
Devices - Layer 2 Bridges, Switches, NIC (Layers 1 & 2)
Devices - Layer 1 Hubs, repeaters NIC (Layers 1 & 2) Media: Coax, Fiber,
Twisted Pair, Wireless