Network Software
1
Protocol Hierarchies
 To reduce their design complexity, most networks are organized as a stack of
layers or levels, each one built upon the one below it. Layering partitions
related communications functions into groups that are manageable
 The number of layers, the name of each layer, the contents of each layer, and
the function of each layer differ from network to network.
 The purpose of each layer is to offer certain services to the higher layers,
shielding those layers from the details of how the offered services are actually
implemented.
MukeshChinta,AsstProf,CSE,VRSEC
2
Why Protocol Layering?
1. Modularity – one problem is decomposed into a number of smaller more
manageable sub-problems
⇒ more flexibility in designing, modifying and evolving computer networks
2. Functionality reuse – a common functionality of a lower layer can be
shared by many upper layers
Mukesh Chinta, Asst Prof,
CSE, VRSEC
3
Mukesh Chinta, Asst Prof, CSE, VRSEC
4
Mukesh Chinta, Asst Prof,
CSE, VRSEC
5
 Layer n on one machine carries on a conversation with layer n on
another machine. The rules and conventions used in this
conversation are collectively known as the layer n protocol.
Basically, a protocol is an agreement between the communicating
parties on how communication is to proceed.
 In reality, no data are directly transferred from layer n on one
machine to layer n on another machine. Instead, each layer passes
data and control information to the layer immediately below it,
until the lowest layer is reached. Below layer 1 is the physical
medium through which actual communication occurs
 Between each pair of adjacent layers is an interface. The interface
defines which primitive operations and services the lower layer
makes available to the upper one
 A set of layers and protocols is called a network architecture. A
list of protocols used by a certain system, one protocol per layer, is
called a protocol stack. Mukesh Chinta, Asst Prof, CSE, VRSEC
6
Information Flow
A message, M, is produced by an application process running in layer 5 and
given to layer 4 for transmission. Layer 4 puts a header in front of the message
to identify the message and passes the result to layer 3. The header includes
control information, such as sequence numbers, to allow layer 4 on the
destination machine to deliver messages in the right order if the lower layers do
not maintain sequence. In some layers, headers can also contain sizes, times,
and other control fields.
Mukesh Chinta, Asst Prof,
CSE, VRSEC
7
Mukesh Chinta, Asst Prof,
CSE, VRSEC
8
Protocol
stack within
kernel
Etherne
t
User
process
Client and Server on same Ethernet
Multiple Layers of Network Protocols
Mukesh Chinta, Asst Prof,
CSE, VRSEC
9
Design Issues of Layers
 Addressing - whom am I going to talk to? i.e., how do we identify
senders and receivers?
 Rules for data transfer: Simplex (one way channels), half-
duplex (two way communication but not simultaneously) and full
duplex (2 way)
 Logical channels: How many are needed? Usually at least 2. One
for normal mode and one for urgent transmission.
 Reconstituting messages: Message pieces are to be number to
preserve sequence. Out of order messages need to be numbered.
 Error control: This is all about communicating along imperfect
channels. Solution involves error correction/detection codes.
(Issues: Attenuation, delay distortion and noise).Mukesh Chinta, Asst Prof,
CSE, VRSEC
10
Design Issues of Layers Contd..
 Large messages: Procedures for disassembling, transmitting and
reassembling. What to do when messages are very small
(compared to packet)?
 Multiplexing: One connection per conversation or many on one
connection. What if, in the physical layer where only a few lines
are available
 Routing: Already alluded to. What to do when there are multiple
paths between communicating machines
 Flow Control: How to keep a fast sender from swamping a slow
receiver with data. Solutions involve direct/indirect feedback or
an agreed on transmission rate
Mukesh Chinta, Asst Prof,
CSE, VRSEC
11
Connection-Oriented and Connectionless Services
 Layer n offers 2 types of services to n+1: Connection Oriented & Connection
Less
 Connection-oriented: Like phone system. Dial, talk, hang up. To use a
connection-oriented network service user first establishes connection, uses the
connection and finally releases the connection. The connection should be
thought of as a water-pipe. Water (bits) is pumped from one end and comes out
the other in FIFO order. A negotiation is conducted at the time of connection
establishment about the parameters to be used such as message size, QOS &
other issues.
 Connectionless: Its like the postal system. Each packet is routed through the
system independent of the others. Possible for message 1 to arrive after
message 2. In connection oriented services this is impossible.
 Quality of service: Reliable services don’t lose data. Unreliable services may.
Reliability is obtained by having recipient acknowledge each message.
Mukesh Chinta, Asst Prof,
CSE, VRSEC
12
 Reliable connection-oriented service has two minor variations: message sequences
and byte streams. In the former variant, the message boundaries are preserved.
When two 1024-byte messages are sent, they arrive as two distinct 1024-byte
messages, never as one 2048-byte message.
 In the latter, the connection is simply a stream of bytes, with no message
boundaries. When 2048 bytes arrive at the receiver, there is no way to tell if they
were sent as one 2048-byte message, two 1024-byte messages, or 2048 1-byte
messages.
 Not all applications require connections. 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.
Connection-Oriented and Connectionless Services
13
Service Primitives
 A service is formally specified by a set of primitives (operations)
available to a user process to access the service. These primitives tell the
service to perform some action or report on an action taken by a peer
entity.
 The set of primitives available depends on the nature of the service
being provided. The primitives for connection-oriented service are
different from those of connectionless service
Five service primitives for implementing a simple connection-oriented
service.
Mukesh Chinta, Asst Prof,
CSE, VRSEC
14
Packets sent in a simple client-server interaction on
a connection-oriented network
Mukesh Chinta, Asst Prof,
CSE, VRSEC
15
The Relationship of Services to Protocols
 A service is a set of primitives (operations) that a layer provides to the
layer above it. The service defines what operations the layer is prepared to
perform on behalf of its users, but it says nothing at all about how these
operations are implemented. A service relates to an interface between
two layers, with the lower layer being the service provider and the upper
layer being the service user.
 A protocol, in contrast, is a set of rules governing the format and meaning
of the packets, or messages that are exchanged by the peer entities within
a layer. Entities use protocols to implement their service definitions.
Mukesh Chinta, Asst Prof, CSE, VRSEC
16
Mukesh Chinta, Asst Prof, CSE, VRSEC17
Mukesh Chinta, Asst Prof, CSE, VRSEC
18

Networks software

  • 1.
  • 2.
    Protocol Hierarchies  Toreduce their design complexity, most networks are organized as a stack of layers or levels, each one built upon the one below it. Layering partitions related communications functions into groups that are manageable  The number of layers, the name of each layer, the contents of each layer, and the function of each layer differ from network to network.  The purpose of each layer is to offer certain services to the higher layers, shielding those layers from the details of how the offered services are actually implemented. MukeshChinta,AsstProf,CSE,VRSEC 2
  • 3.
    Why Protocol Layering? 1.Modularity – one problem is decomposed into a number of smaller more manageable sub-problems ⇒ more flexibility in designing, modifying and evolving computer networks 2. Functionality reuse – a common functionality of a lower layer can be shared by many upper layers Mukesh Chinta, Asst Prof, CSE, VRSEC 3
  • 4.
    Mukesh Chinta, AsstProf, CSE, VRSEC 4
  • 5.
    Mukesh Chinta, AsstProf, CSE, VRSEC 5
  • 6.
     Layer non one machine carries on a conversation with layer n on another machine. The rules and conventions used in this conversation are collectively known as the layer n protocol. Basically, a protocol is an agreement between the communicating parties on how communication is to proceed.  In reality, no data are directly transferred from layer n on one machine to layer n on another machine. Instead, each layer passes data and control information to the layer immediately below it, until the lowest layer is reached. Below layer 1 is the physical medium through which actual communication occurs  Between each pair of adjacent layers is an interface. The interface defines which primitive operations and services the lower layer makes available to the upper one  A set of layers and protocols is called a network architecture. A list of protocols used by a certain system, one protocol per layer, is called a protocol stack. Mukesh Chinta, Asst Prof, CSE, VRSEC 6
  • 7.
    Information Flow A message,M, is produced by an application process running in layer 5 and given to layer 4 for transmission. Layer 4 puts a header in front of the message to identify the message and passes the result to layer 3. The header includes control information, such as sequence numbers, to allow layer 4 on the destination machine to deliver messages in the right order if the lower layers do not maintain sequence. In some layers, headers can also contain sizes, times, and other control fields. Mukesh Chinta, Asst Prof, CSE, VRSEC 7
  • 8.
    Mukesh Chinta, AsstProf, CSE, VRSEC 8
  • 9.
    Protocol stack within kernel Etherne t User process Client andServer on same Ethernet Multiple Layers of Network Protocols Mukesh Chinta, Asst Prof, CSE, VRSEC 9
  • 10.
    Design Issues ofLayers  Addressing - whom am I going to talk to? i.e., how do we identify senders and receivers?  Rules for data transfer: Simplex (one way channels), half- duplex (two way communication but not simultaneously) and full duplex (2 way)  Logical channels: How many are needed? Usually at least 2. One for normal mode and one for urgent transmission.  Reconstituting messages: Message pieces are to be number to preserve sequence. Out of order messages need to be numbered.  Error control: This is all about communicating along imperfect channels. Solution involves error correction/detection codes. (Issues: Attenuation, delay distortion and noise).Mukesh Chinta, Asst Prof, CSE, VRSEC 10
  • 11.
    Design Issues ofLayers Contd..  Large messages: Procedures for disassembling, transmitting and reassembling. What to do when messages are very small (compared to packet)?  Multiplexing: One connection per conversation or many on one connection. What if, in the physical layer where only a few lines are available  Routing: Already alluded to. What to do when there are multiple paths between communicating machines  Flow Control: How to keep a fast sender from swamping a slow receiver with data. Solutions involve direct/indirect feedback or an agreed on transmission rate Mukesh Chinta, Asst Prof, CSE, VRSEC 11
  • 12.
    Connection-Oriented and ConnectionlessServices  Layer n offers 2 types of services to n+1: Connection Oriented & Connection Less  Connection-oriented: Like phone system. Dial, talk, hang up. To use a connection-oriented network service user first establishes connection, uses the connection and finally releases the connection. The connection should be thought of as a water-pipe. Water (bits) is pumped from one end and comes out the other in FIFO order. A negotiation is conducted at the time of connection establishment about the parameters to be used such as message size, QOS & other issues.  Connectionless: Its like the postal system. Each packet is routed through the system independent of the others. Possible for message 1 to arrive after message 2. In connection oriented services this is impossible.  Quality of service: Reliable services don’t lose data. Unreliable services may. Reliability is obtained by having recipient acknowledge each message. Mukesh Chinta, Asst Prof, CSE, VRSEC 12
  • 13.
     Reliable connection-orientedservice has two minor variations: message sequences and byte streams. In the former variant, the message boundaries are preserved. When two 1024-byte messages are sent, they arrive as two distinct 1024-byte messages, never as one 2048-byte message.  In the latter, the connection is simply a stream of bytes, with no message boundaries. When 2048 bytes arrive at the receiver, there is no way to tell if they were sent as one 2048-byte message, two 1024-byte messages, or 2048 1-byte messages.  Not all applications require connections. 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. Connection-Oriented and Connectionless Services 13
  • 14.
    Service Primitives  Aservice is formally specified by a set of primitives (operations) available to a user process to access the service. These primitives tell the service to perform some action or report on an action taken by a peer entity.  The set of primitives available depends on the nature of the service being provided. The primitives for connection-oriented service are different from those of connectionless service Five service primitives for implementing a simple connection-oriented service. Mukesh Chinta, Asst Prof, CSE, VRSEC 14
  • 15.
    Packets sent ina simple client-server interaction on a connection-oriented network Mukesh Chinta, Asst Prof, CSE, VRSEC 15
  • 16.
    The Relationship ofServices to Protocols  A service is a set of primitives (operations) that a layer provides to the layer above it. The service defines what operations the layer is prepared to perform on behalf of its users, but it says nothing at all about how these operations are implemented. A service relates to an interface between two layers, with the lower layer being the service provider and the upper layer being the service user.  A protocol, in contrast, is a set of rules governing the format and meaning of the packets, or messages that are exchanged by the peer entities within a layer. Entities use protocols to implement their service definitions. Mukesh Chinta, Asst Prof, CSE, VRSEC 16
  • 17.
    Mukesh Chinta, AsstProf, CSE, VRSEC17
  • 18.
    Mukesh Chinta, AsstProf, CSE, VRSEC 18