Peer-To-Peer Protocols: Dr. Ajay Singh Raghuvanshi

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 15

Peer-to-peer protocols

Dr. Ajay Singh Raghuvanshi


Electronics & Telecommunication
Engineering, NIT, Raipur
Review of seven layers
Application A Application B
Peer-to-Peer Protocol
Application Application
Layer Layer

Presentation Presentation
Layer Layer

Session Session
Layer Layer

Transport Transport
Layer Communication Network Layer

Network Network Network Network


Layer Layer Layer Layer

Data Link Data Link Data Link Data Link


Layer Layer Layer Layer

Physical Physical Physical Physical


Layer Layer Layer Layer

Electrical and/or Optical Signals 2


Peer-to-Peer Protocols Model
 Peer-to-Peer



processes execute
layer-n protocol to
provide service to
n + 1 peer process n + 1 peer process
layer-(n+1)
 Layer-(n+1) peer calls
layer-n and passes
SDU SDU Service Data Units
(SDUs) for transfer
PDU
n peer process n peer process
 Layer-n peers
exchange Protocol
Data Units (PDUs) to
effect transfer
n – 1 peer process n – 1 peer process  Layer-n delivers SDUs
to destination layer-
(n+1) peer



05/03/2020 Dr.Ajay Singh Raghuvanshi 3


Service Models
 The service model specifies the information
transfer service layer-n provides to layer-(n+1)
 The most important distinction is whether the
service is:
 Connection-oriented
 Connectionless
 Service model possible features:
 Arbitrary message size or structure
 Sequencing and Reliability
 Timing, Pacing, and Flow control
 Multiplexing
 Privacy, integrity, and authentication

05/03/2020 Dr.Ajay Singh Raghuvanshi 4


Connection-Oriented Transfer Service
 Connection Establishment
 Connection must be established between layer-(n+1) peers
 Layer-n protocol must: Set initial parameters, e.g. sequence
numbers; and Allocate resources, e.g. buffers
 Message transfer phase
 Exchange of SDUs
 Disconnect phase
 Example: TCP, PPP

n + 1 peer process n + 1 peer process


send receive

SDU
Layer n connection-oriented service SDU

05/03/2020 Dr.Ajay Singh Raghuvanshi 5


Connectionless Transfer Service
 No Connection setup, simply send SDU
 Each message send independently
 Must provide all address information per
message
 Simple & quick
 Example: UDP, IP

n + 1 peer process n + 1 peer process


send receive

SDU Layer n connectionless service

05/03/2020 Dr.Ajay Singh Raghuvanshi 6


Message Size and Structure
 What message size and structure will a
service model accept?
 Different services impose restrictions on size &
structure of data it will transfer
 Single bit? Block of bytes? Byte stream?
 Ex: Transfer of voice mail = 1 long message
 Ex: Transfer of voice call = byte stream

1 voice mail= 1 message = entire sequence of speech samples


(a)

1 call = sequence of 1-byte messages

(b)

05/03/2020 Dr.Ajay Singh Raghuvanshi 7


Segmentation & Blocking
 To accommodate arbitrary message size, a layer
may have to deal with messages that are too long
or too short for its protocol
 Segmentation & Reassembly: a layer breaks long
messages into smaller blocks and reassembles
these at the destination
 Blocking & Unblocking: a layer combines small
messages into bigger blocks prior to transfer
1 long message 2 or more short messages

2 or more blocks 1 block


05/03/2020 Dr.Ajay Singh Raghuvanshi 8
Reliability & Sequencing
 Reliability: Are messages or information
stream delivered error-free and without
loss or duplication? TCP
 Sequencing: Are messages or information
stream delivered in order? VOIP
 ARQ protocols combine error detection,
retransmission, and sequence numbering
to provide reliability.

05/03/2020 Dr.Ajay Singh Raghuvanshi 9


Pacing and Flow Control
 Messages can be lost if receiving system
does not have sufficient buffering to store
arriving messages. Buffering
 If destination layer-(n+1) does not retrieve its
information fast enough, destination layer-n
buffers may overflow
 Pacing & Flow Control provide backpressure
mechanisms that control transfer according
to availability of buffers at the destination
 Examples: TCP and HDLC

05/03/2020 Dr.Ajay Singh Raghuvanshi 10


Timing
 Applications involving voice and video generate
units of information that are related temporally
 Destination application must reconstruct
temporal relation in voice/video units
 Network transfer introduces delay & jitter
 Timing Recovery protocols use timestamps &
sequence numbering to control the delay & jitter
in delivered information
 Examples: RTP & associated protocols in Voice
over IP

05/03/2020 Dr.Ajay Singh Raghuvanshi 11


Multiplexing
 Multiplexing enables multiple layer-
(n+1) users to share a layer-n service
 A multiplexing tag is required to
identify specific users at the destination
 Examples: TCP, UDP

05/03/2020 Dr.Ajay Singh Raghuvanshi 12


Privacy, Integrity, Authentication & Non-Repudiation

 Privacy: ensuring that information transferred


cannot be read by others (Confidentiality)
 Integrity: ensuring that information is not altered
during transfer
 Authentication: verifying that sender and/or
receiver are who they claim to be
 Non-repudiation is the assurance that someone
cannot deny something
 Security protocols provide these services
Examples: IPSec, SSL

05/03/2020 Dr.Ajay Singh Raghuvanshi 13


End-to-End and Hop by Hop
Hop-by-hop

A B

Data Data Data Data


1 2 3 4 5
ACK/ ACK/ ACK/ ACK/
NAK NAK NAK NAK

End-to-end
ACK/NAK
A B

1 2 3 4 5
Data Data Data Data

05/03/2020 Dr.Ajay Singh Raghuvanshi 14


Hop by Hop Peer Service
Packets Packets
 Data Link operates
Data link Data link over wire-like,
layer Frames layer directly-connected
A B
Physical Physical systems
layer layer
 Frames can be
corrupted or lost,
but arrive in order
 Data link performs
error-checking &
12 3 21 12 3 21
Medium retransmission
2  Ensures error-free
A B 1
packet transfer
between two
systems
05/03/2020 Dr.Ajay Singh Raghuvanshi 15

You might also like