Upload
ashok-kumar
View
218
Download
0
Embed Size (px)
Citation preview
8/7/2019 Layered Architectures 26-11-10
1/37
8/7/2019 Layered Architectures 26-11-10
2/37
Layered Architecture
Protocol Hierarchies
To reduce their design complexity, most
networks are organized as a stack of layers orlevels, each one built upon the one below it.
each layer is a kind ofvirtual machine, offering
certain services to the layer above it.
The above layer does not know how the
services are actually implemented
8/7/2019 Layered Architectures 26-11-10
3/37
Layered Architecture
Layer n on one machine carries on a
conversation with layer n on another machine.
The rules and conventions used in thisconversation are collectively known as the
layer n protocol.
a protocol is an agreement between the
communicating parties on how
communication i s to proceed.
8/7/2019 Layered Architectures 26-11-10
4/37
Layered Architecture
The entities comprising the corresponding
layers on different machines are called peers.
8/7/2019 Layered Architectures 26-11-10
5/37
Layered Architecture
In reality, no data are directly transferred fromlayer n on one machine to layer n on anothermachine.
Instead, each layer passes data and controlinformation to the layer immediately below it,until the lowest layer is reached.
Between each pair of adjacent layers is aninterface.
The interface defines which primitive operationsand services the lower layer makes available tothe upper one.
8/7/2019 Layered Architectures 26-11-10
6/37
Layered Architecture
8/7/2019 Layered Architectures 26-11-10
7/37
Layered Architecture
A message, M, is produced by an application processrunning in layer 5 and given to layer 4 for transmission.Layer 4 puts a header in front of the message toidentify the message and passes the result to layer 3.
In many networks, there is no limit to the size ofmessages transmitted in the layer 4 protocol, but thereis nearly always a limit imposed by the layer 3 protocol.
Consequently, layer 3 must break up the incomingmessages into smaller units, packets,prepending alayer 3 header to each packet. In this example, M issplit into two parts, M1 and M2.
8/7/2019 Layered Architectures 26-11-10
8/37
Design Issues for the Layers
Every layer needs a mechanism for identifying sendersand receivers. some form of addressing is needed inorder to specify a specific destination.
Error control is an important issue because physical
communication circuits are not perfect. An issue that occurs at every level is how to keep a fast
sender from swamping a slow receiver with data. Flowcontrol should b e employed.
Another problem that must be solved at several levelsis the inability ofall processes to accept arbitrarily longmessages. Mechanisms for dissembling , reassemblingetc., must be used
8/7/2019 Layered Architectures 26-11-10
9/37
Design Issues for the Layers
It is inconvenient or expensive to set up a
separate connection for each pair of
communicating processes, multiplexing can be
used for multiple conversations over single
connection
When there are multiple paths between
source and destination, a route must be
chosen. This is known as routing.
8/7/2019 Layered Architectures 26-11-10
10/37
Connection-Oriented and
Connectionless Services
Layers can offer two different types of service tothe layers above them: connection-oriented andconnectionless.
Connection-oriented service is modeled after thetelephone system. To talk to someone, you pickup the phone, dial the number, talk, and thenhang up.
Similarly, to use a connection-oriented networkservice, the service user first establishes aconnection, uses the connection, and thenreleases the connection.
8/7/2019 Layered Architectures 26-11-10
11/37
Connection-Oriented and
Connectionless Services
In connection oriented service, generally, the
order ofthe data is preserved. Eg; telephone
call
In contrast, connectionless service is modeled
after the postal system. Each message (letter)
carries the full destination address, and each
one is routed through the system independent
ofall the others.
Data may not arrive in order.
8/7/2019 Layered Architectures 26-11-10
12/37
Connection-Oriented and
Connectionless Services
Example ofreliable connection oriented service is file transfer.
byte stream(remote login), message stream(sequence of
pages)
Example of non-reliable connection oriented service isdigitized voice
Unreliable (meaning not acknowledged) connectionless
service is often called datagram service, in analogy with
telegram service, which also does not return an
acknowledgement to the sender. Eg;, is electronic junk mail.
The acknowledged datagram service can be provided for
applications where connection is not required for a small
message , but reliability is required. It is like sending a
registered letter and requesting a return receipt.
8/7/2019 Layered Architectures 26-11-10
13/37
The ISO OSI model
8/7/2019 Layered Architectures 26-11-10
14/37
Principles ofOSI
Each layer should perform a well-defined function.
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 must be chosen large enough to
prevent too much functionality being performed by
one layer.
8/7/2019 Layered Architectures 26-11-10
15/37
The Physical Layer
The physicallayer is concerned with
transmitting raw bits over a communicationchannel. The design issues have to do with
making sure that when one side sends a 1 bit,
it is received by the other side as a 1 bit, not
as a 0 bit.
8/7/2019 Layered Architectures 26-11-10
16/37
The Data Link Layer
The main task ofthe data link layer is to transform a raw
transmission facility into a line that appears free of
undetected transmission errors to the network layer. Sender breaks the data into frames and transmits them
sequentially.
If frame is correctly received, receiver acknowledges the
receipt ofthe frames.
Another issue is how to prevent fast sender from
drowning a slow receiver
8/7/2019 Layered Architectures 26-11-10
17/37
The Network Layer
The network layer controls the operation of
the subnet. A key design issue is determininghow packets are routed from source to
destination.
Routes can be based on static tables that are
''wired into'' the network and rarely changed.
They can be highly dynamic, being determined
anew for each packet, to reflect the current
network load.
8/7/2019 Layered Architectures 26-11-10
18/37
The Transport Layer
The basic function ofthe transport layer is to
accept data from above, split it up into smaller
units ifneed be, pass these to the network
layer, and ensure that the pieces all arrive
correctly at the other end.
The transport layer also determines what type
ofservice toprovide to the session layer, and,
ultimately, to the users ofthe network.
8/7/2019 Layered Architectures 26-11-10
19/37
The Session Layer
The session layer allows users on different
machines to establish sessions between them.
Sessions offer various services, includingdialog 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), and
synchronization
8/7/2019 Layered Architectures 26-11-10
20/37
The Presentation Layer
Concerned with the syntax and semantics of
the information transmitted.
Provides abstract representation and encodingofdifferent representation ofdata on various
computers.
8/7/2019 Layered Architectures 26-11-10
21/37
The Application layer
The Application Layer
The application layer contains a variety of
protocols that are commonly needed by users.One widely-used application protocol is HTTP
(HyperText Transfer Protocol), which is the
basis for the World Wide Web.
8/7/2019 Layered Architectures 26-11-10
22/37
The TCP/IPmodel
The reference model used in the grandparent ofall
wide area computer networks, the ARPANET, and its
successor, the worldwide Internet.
The Internet Layer
- This layer, called the internet layer, is the linchpin
that holds the whole architecture together.
- Its job is to permit hosts to inject packets into anynetwork and have them travel independently to the
destination (potentially on a d ifferent network).
8/7/2019 Layered Architectures 26-11-10
23/37
The TCP/IPmodel
The internet layer defines an officialpacket
format and protocol called IP (Internet Protocol).
The job ofthe internet layer is to deliver IP
packets where they are supposed to go. Packet
routing is clearly the major issue here, as is
avoiding congestion.
For these reasons, it is reasonable to say that theTCP/IP internet layer is similar in functionality to
the OSI network layer.
8/7/2019 Layered Architectures 26-11-10
24/37
The TCP/IPmodel
8/7/2019 Layered Architectures 26-11-10
25/37
The Transport Layer
- It is designed to allow peer entities on the source
and destination hosts to carry on a conversation, just
as in the OSI transport layer
- Two end-to-end transport protocols have been
defined here.
- The first one, TCP (Transmission ControlProtocol), isa reliable connection-oriented protocol that allows a
byte streamoriginating on one machine to be
delivered without error on any other machine in the
internet.
8/7/2019 Layered Architectures 26-11-10
26/37
The second protocol in this layer, UDP (User
Datagram Protocol), is an unreliable,
connectionless protocol for applications that
do not want TCP's sequencing or flow control
and wish to provide their own.
Used for one-shot messages where reliability
is not important
8/7/2019 Layered Architectures 26-11-10
27/37
The Application Layer
- On topofthe transport layer is the application layer. It
contains all the higher-levelprotocols. The early ones
included virtual terminal (TELNET), file transfer (FTP),and electronic mail (SMTP), as shown in Fig.
8/7/2019 Layered Architectures 26-11-10
28/37
The Host-to-Network Layer
Below the internet layer is a great void. The
TCP/IP reference model does not really saymuch about what happens here, except to
point out that the host has to connect to the
network using some protocol so it can send IP
packets to it.
8/7/2019 Layered Architectures 26-11-10
29/37
Comparison between OSI ISO &
TCP/
IP
Layers The OSI reference model was devised before the
corresponding protocols were invented. This
ordering means that the model was not biased
toward one particular set of protocols,. The downside of this ordering is that the designers
did not have much experience with the subject and
did not have a good idea of which functionality to
put in which layer.
Example datalink layer initially considered only
point to point networks but not broadcast
8/7/2019 Layered Architectures 26-11-10
30/37
With TCP/IP the reverse was true: the
protocols came first, and the model was really
just a description ofthe existing protocols.
There was noproblem with the protocols
fitting the model. They fit perfectly.
The only trouble was that the model did not
fit any other protocol stacks.
Consequently, it was not especially usefulfor
describing other, non-TCP/IP networks.
8/7/2019 Layered Architectures 26-11-10
31/37
Another difference is in the area of connectionless
versus connection-oriented communication. The OSI
model supports both connectionless and connection-
oriented communication in the network layer, butonly connection-oriented communication in the
transport layer, where it counts (because the
transport service is visible to the users).
The TCP/IP model has only one mode in the network
layer (connectionless) but supports both modes in
the transport layer, giving the users a choice. This
choice is especially important for simple request-
response protocols.
8/7/2019 Layered Architectures 26-11-10
32/37
Drawbacks ofOSI model
Bad Timing
- First let us look at reason one: bad timing. The
time at which a standard is established isabsolutely critical to its success.
- By the time OSI came in, TCP/IP already had
widespread use.
8/7/2019 Layered Architectures 26-11-10
33/37
Bad Technology
- The second reason that OSI never caught on is
that both the model and the protocols areflawed.
- The choice ofseven layers was more political
than technical, and twoofthe layers (session
and presentation) are nearly empty, whereas
twoother ones (data link and network) are
overfull.
8/7/2019 Layered Architectures 26-11-10
34/37
Bad Implementations
- Given the enormous complexity ofthe model
and the protocols the initial implementationswere huge, unwieldy, and slow.
- Bad Politics
8/7/2019 Layered Architectures 26-11-10
35/37
Drawbacks of the TCP/IP
Reference Model
The TCP/IP model and protocols have their
problems too. First, the model does not
clearly distinguish the concepts of service,
interface, and protocol.
Second, the TCP/IP model is not at all general
and is poorly suited to describing any protocol
stack other than TCP/IP. Trying to use theTCP/IP model to describe Bluetooth, for
example, is completely impossible.
8/7/2019 Layered Architectures 26-11-10
36/37
Third, the host-to-network layer is not really a layer
at all in the normal sense ofthe term as used in the
context oflayered protocols. It is an interface
(between the network and data link layers). Thedistinction between an interface and a layer is
crucial, and one should not be sloppy about it.
Fourth, the TCP/IPmodel does not distinguish (or
even mention) the physical and data link layers.These are completely different.
8/7/2019 Layered Architectures 26-11-10
37/37
The hybrid reference model to be
used in the book.