Chapter 3 - Layered Models
Chapter 3 - Layered Models
Department of Informatics
Data Communication and Computer Networking
March 2016
1
Chapter Three
Layered Models
2
Communication and Layered Architecture
• Protocol Layering:
grouping of related communication functions into hierarchical set of layers
• each layer:
performs a subset of functions required for communication with another system
relies on next lower layer to perform more primitive functions
provides service to next higher layer
implements protocol for communication with peer layer in other systems
• vertical communication :- communication between adjacent layers – requires
mutual understanding of what services and/or information lower layer must
provide to layer above.
• horizontal communication:- communication Between software or hardware
elements running at the same layer on different machines.
3
PEER – TO – PEER PROCESS
• Communication must move downward through the layers on the
sending device, over the communication channel, and upward to the
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
4
Cont’d
• The passing of the data and network information down through the
layers of the sending device and backup through the layers of the
receiving device is made possible by interface between each pair of
adjacent layers
• Interface defines what information and services a layer must provide
for the layer above it.
5
The Need for Layered Architecture
• modularity – one problem is decomposed into a number of smaller more
manageable sub-problems
more flexibility in designing, modifying and evolving computer networks
• functionality reuse – a common functionality of a lower layer can be shared by
many upper layers
• Create a protocol that can be designed and tested in stages, which, in turn, reduces
the complexity
• Enhance functionality of the protocol without adversely affecting the other layers
• Provide multivendor compatibility
• Allow for easier troubleshooting by locating the specific layer causing the problem
6
OSI Model
• the International Organization for Standardization (ISO) is a
multinational body dedicated to worldwide agreement on
international standards.
• Almost three-fourths of the 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.
• An open system is a set of protocols that allows any two different
systems to communicate regardless of their underlying
architecture.
7
Cont’d
• 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.
• 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.
8
Cont’d
• 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
ISO is the organization; OSI is the model.
9
Cont’d
• The main benefits of the OSI model include the following:
Helps users understand the big picture of networking
Helps users understand how hardware and software elements function together
Makes troubleshooting easier by separating networks into manageable pieces
Defines terms that networking professionals can use to compare basic
functional relationships on different networks
Helps users understand new technologies as they are developed
Aids in interpreting vendor explanations of product functionality
10
Cont’d
11
OSI Model Layer Mnemonics
•Top to bottom
All People Seem To Need Data Processing
• Bottom to top
Please Do Not Throw Sausage Pizza Away
12
Encapsulation/De-encapsulation
•The process of moving data between layers of
the OSI Model
Encapsulation
Data > segment > packet > frame > bits
De-encapsulation:
Bits > frame > packet > segment > data
13
How Data Is Referred to in the OSI Model
14
Physical Layer
• It is the bottom layer of OSI Model.
• Deals with all aspects of physically moving data from one computer to
the next.
• Converts data from the upper layers into 1s and 0s for transmission
over media.
• Defines how data is encoded onto the media used to transmit the data
• Defined on this layer: Cable standards, wireless standards, and fiber
optic standards.
• The physical layer identifies the topology to be used in the network.
• It is responsible for the actual physical connection between the devices.
Such physical connection may be made by using twisted pair cable.
15
Physical Layer Functions
• Physical characteristics of interfaces and media
• Representation of bits
• Data rate
• Synchronization of bits
• Line configuration (point-to-point or multipoint)
• Physical topology (mesh, star, ring or bus)
• Transmission mode ( simplex, half-duplex or duplex)
16
Physical Layer components
• Component:
Cabling system components
Adapters that connect media to physical interfaces
Connector design and pin assignments
Hub, repeater, and patch panel specifications
Wireless system components
Network Interface Card (NIC)
17
Data Link Layer
• Is responsible for moving frames from node to node or computer to
computer
• Can move frames from one adjacent computer to another, cannot move
frames across routers
• Encapsulation = frame
• Requires MAC address. or physical address
• Protocols defined include Ethernet Protocol and Point-to-Point
Protocol (PPP).
• The data link layer has two distinct sub-layers:
Media Access Control (MAC) layer:
The MAC address is the physical or hardware address burned into each network interface card
(NIC).
The MAC sub layer also controls access to network media.
The MAC layer specification is included in the IEEE 802.1 standard.
Logical Link Control (LLC) layer:
The LLC layer is responsible for the error and flow-control mechanisms of the data link layer.
The LLC layer is specified in the IEEE 802.2 standard.
18
Functions of Data Link Layer
Framing:
DLL divides the bits received from N/W layer into frames. (Frame contains all the addressing information
necessary to travel from S to D).
Physical addressing
After creating frames, DLL adds physical address of sender/receiver (MAC address) in the header of each
frame.
Flow control
DLL prevents the fast sender from drowning the slow receiver.
Error control
It provides the mechanism of error control in which it detects & retransmits damaged or lost frames.
Access control
When single comm. Channel is shared by multiple devices, MAC layer of DLL provides help to determine
which device has control over the channel.
19
Data Link Layer Components
Network interface cards
Ethernet and Token Ring switches
Bridges
Note:
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.
20
Network Layer
• It is responsible for the source to destination delivery of a packet
across multiple networks.
• If two systems are attached to different networks with devices like
routers, then N/W layer is used.
• Thus DLL overseas the delivery of the packet between the two
systems on same network and the network layer ensures that the
packet gets its point of origin to its final destination.
21
Functions of Network Layer
Internetworking:
It provides Internetworking.
Logical Addressing:
When packet is sent outside the network, N/W layer adds Logical (network) address of the sender & receiver to
each packet.
Network addresses are assigned to local devices by n/w administrator and assigned dynamically by special
server called DHCP (Dynamic Host Configuration Protocol)
Routing:
When independent n/w are connected to create internetwork several routes are available to send the data from S
to D.
These n/w are interconnected by routers & gateways that route the packet to final destination.
22
Transport Layer
23
Cont’d
• Transport Layer provides two types of services:
Connection Oriented Transmission:
In this type of transmission the receiving devices sends an acknowledge back to the
source after a packet or group of packet is received.
It is slower transmission method.
e.g. TCP
Connectionless Transmission:
In this type of transmission the receiving devices does not sends an acknowledge back to
the source.
It is faster transmission method.
e.g. UDP
24
Functions of Transport Layer
• Segmentation of message into packet & reassembly of packets into
message.
• Port addressing: Computers run several processes. TL header include
a port address with each process.
• Flow Control: Flow control facility prevents the source form sending
data packets faster than the destination can handle.
• Error control: TL ensures that the entire message arrives at the
receiving TL without error.
25
Session Layer
• Session layer is the fifth layer of OSI Model
• It has the responsibility of beginning, maintaining and ending the
communication between two devices, called session.
• It also provides for orderly communication between devices by regulating
the flow of data.
• Responsible for managing the dialog between networked devices
• Establishes, manages, and terminates connections
• Provides duplex, half-duplex, or simplex communications between devices
• Provides procedures for establishing checkpoints, adjournment, termination,
and restart or recovery procedures
26
Functions of Session Layer
• Establishing, Maintaining and ending a session:
When sending device first contact with receiving device, it sends syn (synchronization) packet to
establish a connection & determines the order in which information will be sent.
Receiver sends ack (acknowledgement). So the session can be set & end.
• Dialog Control:
This function determines that which device will communicate first and the amount of data that will be
sent.
• Dialog separation:
Process of adding checkpoints & markers to the stream of data is called dialog separation.
• Virtual connection between application entities
• Synchronization of data flow
• 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
27
Presentation Layer
• Presentation layer is the sixth layer of OSI Model.
• It is concerned with the syntax & semantics of the information
exchanged between the two devices.
• It was designed for data encryption, decryption and compression.
28
Functions of Presentation Layer
• Data Presentation or Translation:
Because different computers use different encoding systems. It ensures that the data
being sent is in the format that the recipient can process.
• Data Encryption:
PL provides this facility by which hides the information from everyone except the
person who originally sent the information & the intended recipient.
When encrypted data arrives at destination, PL decrypts the message.
• Data Compression:
PL shrinks large amount of data into smaller pieces i.e. it reduces the size of data.
• Graphics formatting
• Content translation
• System-specific translation
29
Application Layer
• It is the topmost i.e. seventh layer of OSI Model.
• It enables the user to access the network.
• It provides user interface & supports for services such as e-mail, file
transfer, access to the world wide web.
• So it provides services to different user applications.
30
Functions of Application Layer
• Mail Services:
This application provides various email services.
• File transfer & Access:
It allows users to access files in a remote host, to retrieve files from remote computer for use etc.
• Remote log-in:
A user can log into a remote computer and access the resources of that computer.
• Accessing the World Wide Web:
Most common application today is the access of the World Wide Web.
• Support for file transfers
• Ability to print on a network
• Electronic messaging
31
OSI Model Summary
Physical (Layer 1) Defines the physical structure of the network and the topology.
Data link (Layer 2) Provides error detection and correction. Uses two distinct Sub-layers: the Media
Access Control (MAC) and Logical Link Control (LLC) layers. Identifies the
method by which media are accessed.
Defines hardware addressing through the MAC sub-layer.
Network (Layer 3) Handles the discovery of destination systems and addressing. Provides the
mechanism by which data can be passed and routed from one network system to
another.
Transport (Layer 4) Provides connection services between the sending and receiving devices and
ensures reliable data delivery. Manages flow control through buffering or
windowing. Provides segmentation, error checking, and service identification.
Session (Layer 5) Synchronizes the data exchange between applications on separate devices.
Presentation (Layer 6) Translates data from the format used by applications into one that can be
transmitted across the network. Handles encryption and decryption of data.
Provides compression and decompression functionality. Formats data from the
application layer into a format that can be sent over the network.
Application (Layer 7) Provides access to the network for applications. 32
Identifying the OSI Layers at Which Various
Network Components Operate
33
TCP-IP Model
• The TCP/IP protocol suite was developed prior to the OSI model. Therefore, the
layers in the TCP/IP protocol suite do not match exactly with those in the OSI
model.
• The original TCP/IP protocol suite was defined as four software layers built upon
the hardware. Today, however, TCP/IP is thought of as a five-layer model with the
layers named similarly to the ones in the OSI model.
34
Comparison between OSI and TCP/IP Protocol Suite
• When we compare the two models, we find that two layers, session and
presentation, are missing from the TCP/IP protocol suite.
• These two layers were not added to the TCP/IP protocol suite after the publication
of the OSI model.
• The application layer in the suite is usually considered to be the combination of
three layers in the OSI model.
• Two reasons were mentioned for this decision.
1. TCP/IP has more than one transport-layer protocol. Some of the functionalities of
the session layer are available in some of the transport layer protocols.
2. The application layer is not only one piece of software. Many applications can be
developed at this layer. If some of the functionalities mentioned in the session and
presentation are needed for a particular application, it can be included in the
development of that piece of software.
35
Layers in the TCP/IP Protocol Suite
36
Physical Layer
• TCP/IP does not define any specific protocol for the physical layer. It
supports all of the standard and proprietary protocols.
• At this level, the communication is between two hops or nodes, either
a computer or router.
• The unit of communication is a single bit. When the connection is
established between the two nodes, a stream of bits is flowing between
them.
• The physical layer, however, treats each bit individually.
37
Communication at the physical layer
Legend Source Destination
A R1 R3 R4 B
Physical Physical
layer layer
Link 1 Link 3 Link 5 Link 6
39
Cont’d
• Each computer involves with only one link; each router involves with
only two links.
• The figure shows, the journey of bits between computer A and
computer B is made of four independent short trips.
• Computer A sends each bit to router R1 in the format of the protocol
used by link 1.
• Router 1 sends each bit to router R3 in the format dictated by the
protocol used by link 3. And so on.
• Router R1 has two three physical layers (two are shown in this
scenario).
40
Cont’d
• The layer connected to link 1 receives bits according to the format of
the protocol used by link 1; the layer connected to link 3 sends bits
according to the format of the protocol used by link 3.
• It is the same situation with the other two routers involved in the
communication.
• The responsibility of the physical layer, in addition to delivery of bits,
matches with what mentioned for the physical layer of the OSI model,
but it mostly depends on the underlying technologies that provide
links.
41
Data Link Layer
• TCP/IP does not define any specific protocol for the data link layer either.
• It supports all of the standard and proprietary protocols. At this level, the
communication is also between two hops or nodes.
• The unit of communication however, is a packet called a frame.
• A frame is a packet that encapsulates the data received from the network layer
with an added header and sometimes a trailer.
• The head, among other communication information, includes the source and
destination of frame.
• The destination address is needed to define the right recipient of the frame because
many nodes may have been connected to the link.
• The source address is needed for possible response or acknowledgment as may be
required by some protocols.
42
Communication at the data link layer
Legend Source Destination D Data H Header
A R1 R3 R4 B
Data link Data link
Physical Physical
Link 1 Link 3 Link 5 Link 6
D2 H2
Frame
D2 ame
Fr
H2
D2 H2 D2 H2
Frame Frame
44
Cont’d
• Communication at the network layer is end to end while the
communication at the other two layers are node to node.
• The datagram started at computer A is the one that reaches computer
B.
• The network layers of the routers can inspect the source and
destination of the packet for finding the best route, but they are not
allowed to change the contents of the packet.
• Of course, the communication is logical, not physical. Although the
network layer of computer A and B think that they are sending and
receiving datagram, the actual communication again is done at the
physical level.
45
Con’t
• Note that the frame that is travelling between computer A and router
R1 may be different from the one travelling between router R1 and
R3.
• When the frame is received by router R1, this router passes the frame
to the data link layer protocol shown at the left. The frame is opened,
the data are removed. The data are then passed to the data link layer
protocol shown at the right to create a new frame to be sent to the
router R3.
• The reason is that the two links, link 1 and link 3, may be using
different protocols and require frames of different formats.
46
Con’t
• Note also that the figure does not show the physical movement of
frames; the physical movement happens only at the physical layer. The
two nodes communicate logically at the data link layer, not physically.
In other words,
• the data link layer at router R1 only thinks that a frame has been sent
directly from the data link layer at computer A.
• What is sent from A to R1 is a stream of bits from one physical layer
to another. Since a frame at A is transformed to a stream of bits, and
the bits at R1 are transformed to a frame, it gives this impression to the
two data link layer that a frame has been exchanged.
47
Communication at the network layer
Legend Source Destination D Data H Header
A R1 R3 R4 B
Network Network
Physical Physical
D3 H3
Datagram
D3 H3
Datagram
49
Cont’d
Physical Physical
D4 H4
Segment
D4 H4
Segment
52
Communication at application layer
A B
Application Legend Source Destination D Data H Header Application
Transport Transport
R1 R3 R4
Network Network
Physical Physical
D5 D5
Message
D5 D5
Message
TCP/IP Protocol Suite 53