Layered Arch
Layered Arch
• Introduction
• In earlier days, many of the networks that were built used
different hardware and software implementations, as a result,
they were incompatible and it became difficult for networks
using different specifications to communicate with each other.
• To address the problem of networks being incompatible and
unable to communicate with each other, we need some way of
structured model.
• A widely accepted structuring technique is layering.
• The communication functions are partitioned into a hierarchical
set of layers.
1
Introduction (cont…)
• Each layer performs a related subset of the functions
required to communicate with another system,
relying on the next-lower layer to perform more
primitive functions, and to conceal the details of
those functions, as it provides services to the next-
higher layer.
• Ideally, the layers should be defined so that changes in
one layer do not require changes in the other layers.
(Independent but related)
• Thus, we have decomposed one problem into a
number of more manageable sub-problems.
• In this chapter, we will see two famous models: OSI
and TCP/IP.
2
Protocols
• For two computers, in a computer network, to
communicate must talk the same language (follow the
same protocol).
• A network protocol is a formal set of rules,
conventions and data structure that governs how
computers and other network devices exchange
information over a network.
• In other words, protocol is a standard procedure and
format that two data communication devices must
understand, accept and use to be able to talk to each
other.
3
Overview of the OSI reference model
• OSI (Open System Interconnect)
• It is a network model developed by ISO (International
Standards Organization)
• The OSI model was designed to promote
interoperability by creating guidelines for network data
transmission between computers that have different
hardware vendors, software, operating systems, and
protocols.
Note
5
The OSI model
6
OSI Model (cont…)
• The principles that were applied to arrive at the seven
layers can be briefly summarized as follows:
Each layer should perform a well-defined function.
A layer should be created where a different abstraction is
needed.
The function of each layer should be chosen with an eye
toward defining internationally standardized protocols.
The layer boundaries should be chosen to minimize the
information flow across the interfaces.
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.
7
OSI reference Model (Cont…)
How Layers work?
• Each layer provides some service or action that prepares the data
for delivery.
• The lowest layers (1 and 2) define the network's physical media
and related tasks.
• The highest layers define how applications access
communication services.
• The higher the layer, the more complex is its task.
• The layers are separated from each other by boundaries called
interfaces.
• All requests are passed from one layer, through the interface, to
the next layer.
• Each layer builds upon the standards and activities of the layer
below it.
8
Relationships among OSI reference
model layers
• Each layer provides services to the next-higher layer and
shields the upper layer from the details of how the
services below it are actually implemented.
• At the same time, each layer appears to be in direct
communication with its associated layer on the other
computer.
• This provides a logical, or virtual, communication
between peer layers, as shown in next slide
9
Cont…
10
The Physical Layer
• The physical layer coordinates the functions required
to carry a bit stream over a physical medium.
• It deals with the mechanical and electrical
specifications of the interface and transmission media.
• It also defines the procedures and functions that
physical devices and interfaces have to perform for
transmission to occur.
11
The Physical Layer (cont…)
• The physical layer is also concerned with the following:
❑ Physical characteristics of interfaces and media
characteristics of the interface between the devices and the
transmission media. It also defines the type of transmission
media.
❑ Representation of bits. 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.
12
The Physical Layer(cont…)
❑Synchronization of bits. the sender and the
receiver clocks must be synchronized.
❑ Line configuration. The physical layer is
concerned with the connection of devices to the
media. point-to-point configuration or multipoint
configuration
❑ Physical topology. The physical topology defines
how devices are connected to make a network.
❑ Transmission mode. The physical layer also
defines the direction of transmission between two
devices: simplex, half-duplex, or full-duplex.
13
The 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.
14
The Data Link Layer (cont…)
❑ 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.
❑ Flow control. The data link layer imposes a flow control
mechanism to prevent overwhelming the receiver by a fast
sender.
❑ Error control. The data link layer adds reliability to the
physical layer by adding mechanisms to detect and
retransmit damaged or lost frames.
❑ 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.
15
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 (link),
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.
• Other responsibilities of the network layer include the
following:
16
The Network Layer (cont…)
❑Logical addressing. The physical addressing
implemented by the data link layer handles the
addressing problem locally.
If a packet passes the network boundary, we need another
addressing system to help distinguish the source and
destination systems.
The network layer adds a header to the packet coming from
the upper layer that, among other things, includes the logical
addresses of the sender and receiver.
❑Routing. When independent networks or links are
connected together to create internetworks the
connecting devices (called routers or switches) route or
switch the packets to their final destination.
• One of the functions of the network layer is to provide
this mechanism.
17
The Transport Layer
• The transport layer is responsible for process-to-
process delivery of the entire message.
• A process is an application program running on the host.
Whereas the network layer oversees source-to-destination
delivery of individual packets, it does not recognize any
relationship between those packets. It treats each one
independently, as though each piece belonged to a separate
message, whether or not it does.
• The transport layer, on the other hand, ensures that the whole
message arrives intact and in order, overseeing both error
control and flow control at the source-to-destination level.
• Other responsibilities of the transport layer include the
following:
18
The Transport Layer (cont…)
❑Service-point addressing. The transport layer header
must 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.
19
The Transport Layer (cont…)
❑ Connection control. The transport layer can be
either connectionless or connection-oriented.
❑ 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.
20
The Session Layer
• The services provided by the first four layers (physical, data
link, network and transport) are not sufficient for some
processes.The session layer is the network dialog controller.
• It establishes, maintains, and synchronizes the interaction
between communicating systems.
• Specific responsibilities of the session layer include the
following:
❑ Dialog control. The session layer allows two systems to
enter into a dialog. It could be either halfduplex (one way at a
time) or full-duplex (two ways at a time) mode.
❑Synchronization. The session layer allows a process to add
checkpoints (synchronization points) into a stream of data.
21
The Presentation Layer
• The presentation layer is concerned with the syntax and
semantics of the information exchanged between two
systems.
• Specific responsibilities of the presentation layer include the
following:
❑Translation. Because different computers use different
encoding systems, the presentation layer is responsible for
interoperability between these different encoding methods.
❑ Encryption. To carry sensitive information a system must
be able to assure privacy.
❑ Compression. Data compression reduces the number of
bits contained in the information.
22
The Application Layer
• The application layer enables the user, whether human or software,
to access the network.
• It provides user interfaces and support for services such as electronic
mail, remote file access and transfer, shared database management, and
other types of distributed information services.
• Specific services provided by the application layer include the
following:
❑ Network virtual terminal. A network virtual terminal is a software
version of a physical terminal and allows a user to log on to a remote
host.
❑ File transfer, access, and management (FTAM). This application
allows a user to access files in a remote host.
❑ E-mail services. This application provides the basis for e-mail
forwarding and storage.
❑ Directory services. This application provides distributed database
sources and access for global information about various objects and
services.
23
Summary of OSI Layers
24
TCP/IP Reference model
• The TCP/IP(Transfer Control protocol over Internet
protocol) 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.
• Figure below shows both configurations.
25
Layers in the TCP/IP Protocol Suite
26
TCP/IP and OSI model
27
Imaginary internet
• The diagram below shows our imaginary internet that is
used to show the purpose of each layer.
• We have six links and four routers (R1 to R4). We have
shown only two computers,A and B.
28
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.
29
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
30
Note
31
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.
32
Communication at the Data linklayer
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
33
Note
34
Network Layer
• At the network layer (or, more accurately, the internetwork
layer),TCP/IP supports the Internet Protocol (IP).
• The Internet Protocol (IP) is the transmission mechanism
used by theTCP/IP protocols.
• IP transports data in packets called datagrams, each of which
is transported separately.
• Datagrams can travel along different routes and can arrive out
of sequence or be duplicated.
• IP does not keep track of the routes and has no facility for
reordering datagrams once they arrive at their destination.
• Communication at the network layer is end to end while the
communication at the other two layers are node to node.
35
Network layer (cont…)
• The core protocols of the Network Layer are IP, ARP, ICMP,
and IGMP.
• The Internet Protocol (IP) is a routable protocol
responsible for IP addressing and the fragmentation and
reassembly of packets.
• The Address Resolution Protocol (ARP) is responsible for
the resolution of the Internet Layer address to the Network
Interface Layer address, such as a hardware address.
• The Internet Control Message Protocol (ICMP) is
responsible for providing diagnostic functions and reporting
errors or conditions regarding the delivery of IP packets.
• The Internet Group Management Protocol (IGMP) is
responsible for the management of IP multicast groups.
36
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 37
Note
38
Transport Layer
• There is a main difference between the transport layer
and the network layer.
• Although all nodes in a network need to have the
network layer, only the two end computers need to
have the transport layer.
• The network layer is responsible for sending individual
datagrams from computer A to computer B.
• The transport layer is responsible for delivering the
whole message, which is called a segment, a user
datagram, or a packet, from A to B.
• A segment may consist of a few or tens of datagrams.
39
Transport Layer (cont…)
• The core protocols of the Transport Layer are TCP and the
User Datagram Protocol (UDP).
• TCP provides a one-to-one, connection-oriented, reliable
communications service.
• TCP is responsible for the establishment of a TCP connection,
the sequencing and acknowledgment of packets sent, and the
recovery (retransmission) of packets lost during transmission.
• UDP provides a one-to-one or one-to-many, connectionless,
unreliable communications service.
• UDP is used
– when the amount of data to be transferred is small (such as the
data that would fit into a single packet),
– when the overhead of establishing a TCP connection is not desired,
– when the applications or upper layer protocols provide reliable
delivery.
40
Communication at transport layer
A Legend Source Destination D Data H Header B
Transport Transport
R1 R3 R4
Network Network
Physical Physical
D4 H4
Segment
D4 H4
Segment
41
Note
42
Application Layer
• The application layer in TCP/IP is equivalent to the
combined session, presentation, and application
layers in the OSI model.
• The application layer allows a user to access the
services of our private internet or the global
Internet.
• Many protocols are defined at this layer to provide
services such as electronic mail, file transfer,
accessing the World Wide Web, and so on.
43
Application Layer (cont…)
• The most widely known Application Layer protocols are
those used for the exchange of user information:
• The HyperTextTransfer Protocol (HTTP) is used to
transfer files that make up the Web pages of the World
Wide Web.
• The File Transfer Protocol (FTP) is used for interactive
file transfer.
• The Simple Mail Transfer Protocol (SMTP) is used for
the transfer of mail messages and attachments.
• Telnet, a terminal emulation protocol, is used for
remote login to network hosts.
44
Application Layer (cont…)
• Additionally, the following Application Layer
protocols help facilitate the use and management of
TCP/IP networks:
• The Domain Name System (DNS) is used to resolve
a host name to an IP address.
• The Simple Network Management Protocol
(SNMP) is used between network management
console and network devices (routers, bridges, and
intelligent hubs) to collect and exchange network
management information.
45
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 46
Note
47
TCP/IP Core Protocols
• The TCP/IP protocol component that is installed in
your network operating system is a series of
interconnected protocols called the core protocols
of TCP/IP.
• All other applications and other protocols in the
TCP/IP protocol suite rely on the basic services
provided by the following protocols: IP, ARP, ICMP,
IGMP, TCP, and UDP.
48
TCP/IP Core Protocols(cont…)
50
Lack of OSI Model’s Success
1. OSI was completed when TCP/IP was fully in place
and a lot of time and money had been spent on the
suite; changing it would cost a lot.
2. Some layers in the OSI model were never fully
defined.
For example, although the services provided by the
presentation and the session layers were listed in the
document, actual protocols for these two layers were not
fully defined, nor were they fully described, and the
corresponding software was not fully developed.
3. When OSI was implemented by an organization in a
different application, it did not show a high enough
level of performance
51