IntroductiontoBasicsof
CommunicationProtocol
ProfPallapa.Venkataram
DepartmentofElectricalCommunicationEngineering
IndianInstituteofScience
Bangalore560012,India
PhysicalCommunicationModel
Source
Transmitter
Transmission
System
Receiver
Destination
Communication
Itisanytransmission,emission,orreceptionofsigns,signals,
writings,imagesandsoundsorintelligenceofanynatureby
wire,radio,opticalorotherelectromagneticsystem
Communicationmodel
Acommunicationmodelcomprisesoffollowingsubsystems:
SourceGeneratesthedatatobetransmitted
TransmitterConvertsthedataintotransmittablesignals
TransmissionsystemCarriesthedata.
ReceiverConvertsreceivedsignalsintodata.
DestinationTakesincomingdata.
ElectronicsCommunicationModel
Workstation Modem
Modem
Telephone
Network
Server
Transmissionsystemutilization
Interfacing
Signalgeneration
Synchronization
Exchangemanagement
Errordetectionandcorrection
Addressingandrouting
Securityandnetworkmanagement
Network Model
SwitchingNode
WideAreaNetwork
SourceSystem
DestinationSystem
Transmission
System
Source
Receiver
Transmitter
LocalAreaNetwork
Destination
CommunicationSoftware
Itisasetofcomputerprogramswhichareusedforgeneration,
transmissionandreceptionofinformationbetween/amongthe
setofcomputersconnectedbywiredorwirelessmedia.
DifferentKindsofProgramsforCommunicationare:
Dialing:Dialingsoftwaretellsthecomputer,howtoplacea
callonthephonelineconnectedtoit.
FileTransfer:Transferoffiles,fromonetotheother
(Downloading/Uploadingoffiles)
TerminalEmulation:Programsrunningonanetworkthat
connectstoacomputerbulletinboardsystem
DataEncryption:Programtoencodedata
CommunicationSubsystems
Thedesignandimplementationoflargescalecommunication
systemsrequirestheinterconnectionandintegrationof
diversesubsystems.
Themainpurposeofthecommunicationenvironmentisto
keepallthesubsystemsinformedofanychangesinthe
designparameters.
1.Changereportedfromoneofthesubsystems.
2.Requestfordatafromonesubsystemtoanother
Communicationbetweentwosystem
UserA
UserB
Hi,Iwanttochatwithyou
Ok.Iamready
DialoguebetweenA&B
Hi,Letusfinishchatting
Ok.Letusdisconnect
Protocol
Itisasetofrulesgoverningtheformatandmeaningof
frames,packets,ormessagesthatareexchangedbypeer
entitieswithinalayer.
Protocolareusedforcommunicationsbetweenentitiesina
systems.
Entitiesuseprotocolsinordertoimplementtheirservice
definitions.
Thekeyelementsofaprotocolare:
Syntax:IncludeTimedataformatsandsignallevels
Semantics:Includescontrolinformationanderrorhandling.
Simplemessageexchangeprotocolflowchart
SENDER:A
no
RECEIVER:B
Isdataready
requestto
sendreceived
yes
getdata
TellhostB(receiver)
no
yes
Requestto
Send(RTS)
getreadytoreceive
tellsender
no
isreceiverready
yes
senddata
Readyto
Receive(RTR)
Data
yes
datasent
no
datareceived
dataconsumed
dataconsumed
ACK
tellsender
yes
no
RepresentationofProtocol
Theprocessofaprotocollike,senderandreceiverprotocolcan
beformallyspecifiedusing
2. FiniteStateMachine(FSM/PETRINETS)
3. Statetransitiontable
FiniteStateMachine(FSM)
A:FinitestatemachineMisaquintuple,M=(I;O;S;N;A)
I:Finiteandnonemptysetsofinputsymbols
O:Finiteandnonemptysetsofoutputsymbols
S:Finiteandnonemptysetsofstates
FiguregivesFSMofsimplemessageexchangeprotocol
FSMofsimplemessageexchangeProtocol
Sender
Idle
Ready_Send
ACK
Received
Send_Data
Wait_Ack
Receiver
Data_ready(i.e.1)
RTS
RTS
Idle
get_ready(i.e.3)
RTR
RTR
Data_sent(i.e.2)
ACK
Receive
ACK
sent
Data
Data_Cons
(i.e.,=internalevent)
ACK
StateTransitionTable
FSMstateandtransitionscanberepresentedintheformof
tablecalledasstatetransitiontables.
Input
State
i.e.1
(data_ready)
RTR
i.e.2
ACK
(data_ready)
S1
S2/RTS
S1/
S1/
S1/
S2
S2/
S3/
S2/
S2/
S3
S3/
S3/
S4/data
S3/
S4
S4/
S4/
S4/
S1/
Communicationprotocoldevelopmentmethods
Therearetwowaysofdesignanddevelopmentof
Communicationprotocols
1.Informal
2.FormalMethods
Informalmethods
Informalwayofspecificationoftheprotocolsinclude
textualdescription.
Notsuitableforlargecomplexprotocols.
Oftenleadsunclearandambiguousspecifications.
Thecomplexityofprotocolsmakethemveryhardto
analyzeinaninformalway.
InformalSpecifications
Informal
Specification
ofneeds
Concept
Compilable
Language
Debugging
(Execution)
Compilation
Implementation
Formalmethods
Useofformalspecificationlanguages.
Theseprotocolsmustbeofhighqualitywithhigher
performancewithlowcost.
Informal
Specification
ofneeds
Repeat
Until
Validation
OK
Formal
Specification
Simulation
Validation
Compilation
Programmer
FormalSpecifications
Implementation
Petrinetmodel
Apetrinetisafourtuple(P;T;IN;OUT;M0)where,
P=fp1;p;:::::::;pgisasetofplaces.
2
n
T=ft;t;:::::::;pgisasetoftransition.
1 2
n
M0=Initialmarking(tokenataplace).
IN:(PT)!Nisaninputfunctionthatdefinesdirectedarcs
fromplacestotransition
OUT:(PT)!Nisanoutputfunctionthatdefinesdirectedarcs
Fromtransitiontoplaces.
APetrinetmodelofasimpleprotocolwithatimeoutmechanism
i2
P2
P5
i1
P3
i6
i3
P1
P6
i7
i8
i4
P4
P7
i5
ProtocolEngineeringProcess
Needforprotocolengineering
Manyprotocolsifnotproperlydesignedandimplemented
aspertherequirements,leadstoimproperbehaviorof
networkandsystemmayjamthenetworks.
Henceitisrequiredto,engineertheprotocolsfortheir
correctnessreliability,optimizedperformance,reusability,
andcodeoptimization
Dealswithapplicationofformaltechniquesandsoftware
engineeringmethodologiestoprotocoldesignand
implementation
PhasesofProtocolEngineering
Service
Specification
Verification/
Validation
Synthesis
Protocol
Specification
Monitoring
Diagnosis
Protocol
Implementation
Performance
Analysis
Conformance
Testing
Functions:
Servicespecification:Theservicerequiredforperformingcertaintasksin
anygivenenvironment.
Synthesis:Itisanautomatedtooltogeneratetheformalspecificationofa
protocol.
Protocolspecification:Itlooksintosyntaxandsemanticsoftheprotocols
specifications.
Protocolverification/validation:Usermakesaboutthestructureof
possibledialogsbetweenprocessesofprotocol.
Performanceanalysis:Itanalysestheprotocolperformanceintermsof
messagecomplexity,timecomplexity,spacecomplexity,scalability.
Conferencetesting:ittestswhethertheprotocolconformstothe
specificationslaiddowninprotocolspecificationphasebygenerating
exhaustivesetoftestsequences.
Protocolimplementation:Itdealswiththerealcodingoftheprotocol
usingsoftwareengineeringaspects.
Monitoring/diagnosis:Itmonitorstheworkingofimplementedprotocol
andchecksfortheerrors.