line coding.ppt

591 views 169 slides Aug 23, 2023
Slide 1
Slide 1 of 169
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55
Slide 56
56
Slide 57
57
Slide 58
58
Slide 59
59
Slide 60
60
Slide 61
61
Slide 62
62
Slide 63
63
Slide 64
64
Slide 65
65
Slide 66
66
Slide 67
67
Slide 68
68
Slide 69
69
Slide 70
70
Slide 71
71
Slide 72
72
Slide 73
73
Slide 74
74
Slide 75
75
Slide 76
76
Slide 77
77
Slide 78
78
Slide 79
79
Slide 80
80
Slide 81
81
Slide 82
82
Slide 83
83
Slide 84
84
Slide 85
85
Slide 86
86
Slide 87
87
Slide 88
88
Slide 89
89
Slide 90
90
Slide 91
91
Slide 92
92
Slide 93
93
Slide 94
94
Slide 95
95
Slide 96
96
Slide 97
97
Slide 98
98
Slide 99
99
Slide 100
100
Slide 101
101
Slide 102
102
Slide 103
103
Slide 104
104
Slide 105
105
Slide 106
106
Slide 107
107
Slide 108
108
Slide 109
109
Slide 110
110
Slide 111
111
Slide 112
112
Slide 113
113
Slide 114
114
Slide 115
115
Slide 116
116
Slide 117
117
Slide 118
118
Slide 119
119
Slide 120
120
Slide 121
121
Slide 122
122
Slide 123
123
Slide 124
124
Slide 125
125
Slide 126
126
Slide 127
127
Slide 128
128
Slide 129
129
Slide 130
130
Slide 131
131
Slide 132
132
Slide 133
133
Slide 134
134
Slide 135
135
Slide 136
136
Slide 137
137
Slide 138
138
Slide 139
139
Slide 140
140
Slide 141
141
Slide 142
142
Slide 143
143
Slide 144
144
Slide 145
145
Slide 146
146
Slide 147
147
Slide 148
148
Slide 149
149
Slide 150
150
Slide 151
151
Slide 152
152
Slide 153
153
Slide 154
154
Slide 155
155
Slide 156
156
Slide 157
157
Slide 158
158
Slide 159
159
Slide 160
160
Slide 161
161
Slide 162
162
Slide 163
163
Slide 164
164
Slide 165
165
Slide 166
166
Slide 167
167
Slide 168
168
Slide 169
169

About This Presentation

line coding


Slide Content

CS6551 COMPUTER NETWORKS
UNIT I
FUNDAMENTALS AND LINK LAYER

INTRODUCTION
IntroductiontoNetwork:
1.Anetworkisaninterconnectedsetofautonomouscomputers.
2.Devicesoftenreferredtoasnodescanbeacomputer,printer,oranyotherdevicescapableof
sending/receivingdata.
DataCommunications:
DataCommunicationsaretheexchangeofdatabetweentwodevicesviasomeformoftransmission
mediumsuchaswirecable.
FundamentalCharacteristicsofDCS
1.Delivery(Thesystemmustdeliverdatatothecorrectdestination)
2.Accuracy(Thesystemmustdeliverthedataaccurately)
3.Timeliness(Thesystemmustdeliverdatainatimelymanner)
4.Jitter(variationinthepacketarrivaltime)

Components of Data Communication
Datacommunicationsystemsaremadeupoffivecomponents.
1.Message
2.sender
3.Receiver
4.Medium
5.Protocol
Sender Receiver
Step 1:
Step 2:
Step 3:
…………
…………
Protocol Protocol
Medium
message
Fig.1.1Fivecomponentsofdatacommunication
Step 1:
Step 2:
Step 3:
…………
…………

1.Message:
Thisistheinformationtobecommunicated.Itincludestext,
numbers,pictures,audioandvideo.
2.Sender:
Itisthedevicethatsendsthedatamessage.Itcanbeacomputer,
workstation,telephonehandset,videocameraandsoon.
3.Receiver:
Itisthedevicethatreceivesthemessage.Itcanbeacomputer,
workstation,telephonehandset,televisionandsoon.
4.Medium:
Itisthephysicalpathbywhichamessagetravelsfromsenderto
receiver.Someexamplesoftransmissionmediaincludetwistedpair
wire,coaxialcable,fiberopticcable,laserorradiowaves.
5.Protocol:
Itisasetofrulesthatgoverndatacommunications.Itrepresentsan
agreementbetweenthecommunicationdevices.

Data Representation
Information today comes in different forms.
They are
–Text
–Numbers
–Images
–Audio
–Video
Data Flow:
Communication between two devices can be
–simplex
–half-duplex
–full-duplex

1.Simplex
•Insimplexmode,thecommunicationisunidirectional,asonaone-way
street.
•Onlyoneofthetwodevicesonalinkcantransmit;theothercanonly
receive.
•Keyboardsandtraditionalmonitorsareexamplesofsimplexdevices.
Fig.Simplex
2.Half-Duplex
•Inhalf-duplexmode,eachstationcanbothtransmitandreceive,butnot
atthesametime.
•Whenonedeviceissending,theothercanonlyreceive,andviceversa.
•Walkie-talkiesandCB(citizensband)radiosarebothhalf-duplexsystems.
Mainf
rame
Direction of data
Monitor

Fig.Half-Duplex
3.Full-Duplex
•Infull-duplex,bothstationscantransmitandreceivesimultaneously.
•Onecommonexampleoffull-duplexcommunicationisthetelephone
network.
•Whentwopeoplearecommunicatingbyatelephoneline,bothcantalk
andlistenatthesametime.
Fig.Full-Duplex
station station
Direction of data at time 2
Direction of data at time 1
station station
Direction of data all the time

NETWORKS
•Anetworkisasetofdevices(oftenreferredtoasnodes)
connectedbycommunicationlinks.
•Anodecanbeacomputer,printer,oranyotherdevice
capableofsendingand/orreceivingdatageneratedby
othernodesonthenetwork.
Network Criteria:
A network must be able to meet a certain number of
criteria.
The most important of these are
–Performance
–Reliability
–Security

1.Performance
•Performancecanbemeasuredinmanyways,including
transittimeandresponsetime.
–Transittimeistheamountoftimerequiredforamessageto
travelfromonedevicetoanother.
–Responsetimeistheelapsedtimebetweenaninquiryanda
response.
•Theperformanceofanetworkdependsonanumberof
factors,theyarenumberofusers
–typeoftransmissionmedium
–capabilitiesoftheconnectedhardware
–efficiencyofthesoftware
•Performanceisoftenevaluatedbytwonetworkingmetrics
–throughput
–delay

2. Reliability
Network reliability is measured by
–frequency of failure
–time it takes a link to recover from a failure
–network's robustness in a catastrophe
3. Security
Network security issues include
–protecting data from unauthorized access
–protecting data from damage and development
–implementing policies and procedures for recovery
from breaches and data losses

Type of Connection
•Anetworkhastwoormoredevicesconnectedthroughlinks.
•Alinkisacommunicationspathwaythattransfersdatafrom
onedevicetoanotherasinfig.1.3(a).
Therearetwopossibletypesofconnections:
1.point-to-point:
Apoint-to-pointconnectionprovidesadedicatedlink
betweentwodevices.
Figure 1.3(a)Types of connections: point-to-point
station station
Link

2.multipoint:
Amultipoint(alsocalledmultidrop)connectionisonein
whichmorethantwospecificdevicesshareasinglelinkasin
fig.1.3(b).
Thecapacityofthechannelisshared,eitherspatiallyor
temporary.
Figure1.3(b)Typesofconnections:multipoint
Mainframe
Link
station
station
station

Physical Topology
•PhysicalTopologyreferstothewayinwhichanetworkislaid
outeitherphysicallyorlogically.
•Twoormoredevicesconnecttoalink;twoormorelinksform
atopology.
•Thetopologyofanetworkisthegeometricrepresentationof
therelationshipofallthelinksandlinkingdevicestoone
another.
•Therearefourbasictopologiespossible:
─Mesh
─Star
─Bus
─Ring

Mesh Topology
•Everydevicehasadedicatedpoint-to-pointlinktoeveryother
deviceasinfig.1.4.
•Inameshtopology,weneedn(n-1)/2duplex-modelinks.
•Toaccommodatethatmanylinks,everydeviceonthe
networkmusthaven-1input/output(I/O)ports.
Fig.1.4afullyconnectedmeshtopology
station
station
station
station station

Advantages:
•Theuseofdedicatedlinksguaranteesthateachconnectioncancarryits
owndataload.Sotrafficproblemcanbeavoided.
•Itisrobust.Ifonelinkbecomesunusable,itdoesnotaffecttheentire
system.
•Itgivesprivacyandsecurity.
•Faultidentificationandfaultisolationareeasy.
Disadvantages:
•Since every device must be connected to every other device, installation
and reconnection are difficult.
•The bulk of the wiring is greater than the available space.
•Hardware required to connect each link can be prohibitively expensive

Example:
•Onepracticalexampleofameshtopologyistheconnectionof
telephoneregionalofficesinwhicheachregionalofficeneeds
tobeconnectedtoeveryotherregionaloffice.
•Ameshnetworkhas8devices.Calculatetotalnumberof
cablelinksandIOportsneeded.
Solution:
Numberofdevices =8
Numberoflinks =n(n-1)/2
=8(8-1)/2
=28
Numberofport/device=n-1
=8-1=7

2. Star topology
•Inastartopologyasinfig.1.5,eachdevicehasadedicated
point-to-pointlinkonlytoacentralcontroller,usuallycalleda
hub.
•Thedevicesarenotdirectlylinkedtooneanother.
•Unlikeameshtopology,astartopologydoesnotallowdirect
trafficbetweendevices.
Fig.1.55Astartopologyconnectingfourstations
stationstationstationstation
Hub

Advantages:
•Lessexpensivethanmeshsinceeachdeviceisconnectedonly
tothehub.
•Installationandreconfigurationareeasy.
•Lesscablingisneededthanmesh.
•Thisincludesrobustness.Ifonelinkfails,onlythatlinkis
affected.Allotherlinksremainactive.Thisfactoralsolends
itselftoeasytofaultidentification&isolation.
Disadvantages:
•Ifthehubgoesdown,thewholesystemisdead.

3. Bus Topology
•Abustopologyismultipoint.Onelongcableactsasabackbonetolinkall
thedevicesinanetwork.
•Nodesareconnectedtothebuscablebydroplinesandtaps.Adroplineis
aconnectionbetweenthedeviceandthemaincable.
•Atapisaconnectorthateithersplicesintothemaincable,orpunctures
thesheathingofacabletocreateacontactwiththemetalliccoreas
showninfig.1.6.
Figure1.6Abustopologyconnectingthreestations
station station station
Tap Tap Tap
Drop Line
Drop Line Drop Line
Cable end Cable end

Advantages:
•Easeofinstallation
•Lesscabling
Disadvantages:
•Difficultreconnectionandfaultisolation.
•Difficulttoaddnewdevices.
•Signalreflectionatthetapscancausedegradationinquality.
•Ifanyfaultinthebuscablestopsalltransmission.

4. Ring Topology
•Eachdevicehasadedicatedpoint-to-pointconnectionwith
onlythetwodevicesoneithersideofitasinfig.1.7.
•Asignalispassedalongtheringinonedirection,fromdevice
todevice,untilitreachesitsdestination.
•Eachdeviceincorporatesarepeater(regeneratesthesignal
energy).
Figure1.7Aringtopologyconnectingsixstations

Advantages:
•Easytoinstallandreconfigure.
•Faultidentificationiseasy.
Disadvantages:
•Unidirectionaltraffic.
•Abreakinthesimpleringcandisabletheentirenetwork.
CategoriesofNetworks:
Therearethreeprimarycategories,theyare
–Localareanetwork
–Metropolitanareanetwork
–Wideareanetwork

1. Local Area Network
•Alocalareanetwork(LAN)isusuallyprivatelyownedandlinks
thedevicesinasingleoffice,building,orcampusasshownin
fig.1.8.
•Currently,LANsizeislimitedtoafewkilometers.
•LANsaredesignedtoallowresourcestobesharedbetween
personalcomputersorworkstations.
•Theresourcestobesharedcanincludehardware(e.g.,a
printer),software(e.g.,anapplicationprogram),ordata.
•ThemostcommonLANtopologiesarebus,ring,andstar.
EarlyLANshaddataratesinthe4to16megabitspersecond
(Mbps)range.Today,however,speedsarenormally100or
1000Mbps.

Figure 1.8 An isolated LAN connecting 12 computers to a hub in a closet

2. Metropolitan Area Network
•Ametropolitanareanetwork(MAN)isanetworkwithasize
betweenaLANandaWAN.
•Itnormallycoverstheareainsideatownoracity.
•Itisdesignedforcustomerswhoneedahigh-speed
connectivity,andhaveendpointsspreadoveracityorpartof
city.
•AgoodexampleofaMANisthepartofthetelephone
companynetworkthatcanprovideahigh-speedDSLlineto
thecustomer.
•AnotherexampleisthecableTVnetwork.

Fig .MAN

3. Wide Area Network
•Awideareanetwork(WAN)provideslong-distancetransmissionofdata,image,
audio,andvideoinformationoverlargegeographicareas(likecountry,continent
oreventhewholeworld).
•TheswitchedWANconnectstheendsystems,whichusuallycomprisearouter
(internetworkingconnectingdevice)thatconnectstoanotherLANorWANasin
fig.1.9.a.
•Thepoint-to-pointWANisnormallyaline,leasedfromatelephoneorcableTV
providerthatconnectsahomecomputer,orasmallLANtoanInternetservice
provider(ISP)asshowninfig.1.9.b.ThistypeofWANisoftenusedtoprovide
Internetaccess.
•AnearlyexampleofaswitchedWANisX.25,anetworkdesignedtoprovide
connectivitybetweenendusers.
•AgoodexampleofaswitchedWANistheasynchronoustransfermode(ATM)
network,whichisanetworkwithfixed-sizedataunitpacketscalledcells.

Figure 1.9 WANs: a switched WAN and point-to-point WAN

Internetwork
InterconnectionofNetworks:Internetwork
•Whentwoormorenetworksareconnected,theybecomean
internetwork,orinternetasinfig.1.10.
•Asanexample,assumethatanorganizationhastwooffices,oneon
theeastcoastandtheotheronthewestcoast.
•TheestablishedofficeonthewestcoasthasabustopologyLAN;
thenewlyopenedofficeontheeastcoasthasastartopologyLAN.
•Thepresidentofthecompanylivessomewhereinthemiddleand
needstohavecontroloverthecompanyfromherhome.
•TocreateabackboneWANforconnectingthesethreeentities(two
LANsandthepresident'scomputer),aswitchedWAN(operatedby
aserviceprovidersuchasatelecomcompany)hasbeenleased.
•ToconnecttheLANstothisswitchedWAN,however,threepoint-
to-pointWANsarerequired.

Figure 1.10 A heterogeneous network made off our WANs and two LANs

Internet
•TheInternetisastructured,organizedsystem.
•Privateindividualsaswellasvariousorganizationssuchas
governmentagencies,schools,researchfacilities,corporations,
andlibrariesinmorethan100countriesusetheInternet.Millions
ofpeopleareusers.
•TodaymostenduserswhowantInternetconnectionusethe
servicesofInternetserviceproviders(ISPs).
•Thereareinternationalserviceproviders,nationalservice
providers,regionalserviceproviders,andlocalserviceproviders.
•TheInternettodayisrunbyprivatecompanies,notthe
government.

Protocols and Standards
•Incomputernetworks,communicationoccursbetweenentriesindifferent
systems.
•Anentityisanythingcapableofsendingorreceivinginformation.
However,twoentitiescannotsimplysendbitstreamstoeachotherand
expecttobeunderstood.
•Forcommunicationoccur,theentitiesmustagreeonaprotocol.
Protocols
•Aprotocolisasetofrulesthatgoverndatacommunications.
•Aprotocoldefineswhatiscommunicated,howitiscommunicated,and
whenitiscommunicated.
•Thekeyelementsofaprotocolare
1.Syntax
2.Semantics
3.Timing

1.Syntax:
Syntaxreferstothestructureorformatofthedata,meaningtheorderin
whichtheyarepresented.
2.Semantics:
─Semanticsreferstothemeaningofeachsectionofbits.
─Itrefersthathowisaparticularpatterntobeinterpreted
─whatactionistobetakenbasedonthatinterpretation?
3.Timing:
Timingreferstotwocharacteristics.Theyare,
─Whendatashouldbesent
─Howfasttheycanbesent

Standards
-Standardsprovideguidelinestomanufacturers,vendors,government
agencies,andotherserviceproviders
Datacommunicationstandardsfallintotwocategories:
1.defacto(meaning"byfact"or"byconvention")
2.dejure(meaning"bylaw"or"byregulation")
1.Defacto:
–Standardsthathavenotbeenapprovedbyanorganizedbodybuthave
beenadoptedasstandardsthroughwidespreadusearedefacto
standards.
–Defactostandardsareoftenestablishedoriginallybymanufacturerswho
seektodefinethefunctionalityofanewproductortechnology.
2.Dejure:
–Thosestandardsthathavebeenlegislatedbyanofficiallyrecognizedbody
are,dejurestandards.

NETWORK MODELS
NetworkModels:
•Computernetworksarecreatedbydifferententities.
•Standardsareneededsothattheseheterogeneousnetworkscancommunicatewithoneanother.
•Twostandardsare
–OSI(OpenSystemsInterconnection)Model->Itdefinesaseven-layernetwork.
–InternetModel->Itdefinesafive-layernetwork.
LayeredTasks:
•Weusetheconceptoflayersinourdailylife.
•Asshowninfig.1.11,letusconsidertwofriendswhocommunicatethroughpostalmail.
•Theprocessofsendingalettertoafriendwouldbecomplexiftherewerenoservicesavailable
fromthepostoffice.
Hierarchy:
•Accordingtoouranalysis,therearethreedifferentactivitiesatthesendersiteandanotherthree
activitiesatthereceiversite.
•Thetaskoftransportingtheletterbetweenthesenderandthereceiverisdonebythe
carrier.
•Atthesendersite,thelettermustbewrittenanddroppedinthemailboxbeforebeing
pickedupbythelettercarrieranddeliveredtothepostoffice.
•Atthereceiversite,thelettermustbedroppedintherecipientmailboxbeforebeingpicked
upandreadbytherecipient.

Higher Layers
Middle Layers
Lower Layers
Figure 1.11 Tasks involved in sending a letter

Services:
•Eachlayeratthesendingsiteusestheservicesofthelayer
immediatelybelowit.Thesenderatthehigherlayerusesthe
servicesofthemiddlelayer.
•Themiddlelayerusestheservicesofthelowerlayer.Thelower
layerusestheservicesofthecarrier.
•Thelayeredmodelthatdominateddatacommunicationsand
networkingliteraturebefore1990wastheOpenSystems
Interconnection(OSI)model.
•EveryonebelievedthattheOSImodelwouldbecometheultimate
standardfordatacommunications,butthisdidnothappen.
•TheTCP/IPprotocolsuitebecamethedominantcommercial
architecturebecauseitwasusedandtestedextensivelyinthe
Internet;theOSImodelwasneverfullyimplemented.

OSI MODEL
•Establishedin1947,theInternationalStandardsOrganization(ISO)isa
multinationalbodydedicatedtoworldwideagreementoninternational
standards.
•AnISOstandardthatcoversallaspectsofnetworkcommunicationsisthe
OpenSystemsInterconnectionmodel.Itwasfirstintroducedinthelate
1970s.
•Anopensystemisasetofprotocolsthatallowsanytwodifferentsystems
tocommunicateregardlessoftheirunderlyingarchitecture.
•ThepurposeoftheOSImodelistoshowhowtomakeeasy
communicationbetweendifferentsystemswithoutrequiringchangesto
thelogicoftheunderlyinghardwareandsoftware.
•TheOSImodelisnotaprotocol;itisamodelforunderstandingand
designinganetworkarchitecturethatisflexible,robust,and
interoperable.ISOistheorganization.OSIisthemodel.
•TheOSImodelisalayeredframeworkforthedesignofnetworksystems
thatallowscommunicationbetweenalltypesofcomputersystems.
•Itconsistsofsevenseparatebutrelatedlayers,eachofwhichdefinesa
partoftheprocessofmovinginformationacrossanetwork.

Layered Architecture
WhyLayeredarchitecture?
•Tomakethedesignprocesseasybybreaking
unmanageabletasksintoseveralsmallerand
manageabletasks(bydivide-and-conquerapproach).
•Modularityandclearinterfaces,soastoprovide
comparabilitybetweenthedifferentproviders'
components.
•Ensureindependenceoflayers,sothat
implementationofeachlayercanbechangedor
modifiedwithoutaffectingotherlayers.
•Eachlayercanbeanalyzedandtestedindependently
ofallotherlayers.

•TheOSImodeliscomposedofsevenorderedlayers:theyare
–Physicallayer
–Datalinklayer
–Networklayer
–Transportlayer
–Sessionlayer
–Presentationlayer
–Applicationlayer
•Figure1.12showsthelayersinvolvedwhenamessageissentfromdeviceAtodeviceB.
•AsthemessagetravelsfromAtoB,itmaypassthroughmanyintermediatenodes.These
intermediatenodesusuallyinvolveonlythefirstthreelayersoftheOSImodel.
•Withinasinglemachine,eachlayercallsupontheservicesofthelayerjustbelowit.
•Layer3,forexample,usestheservicesprovidedbylayer2andprovidesservicesforlayer
4.
•Betweenmachines,layerxononemachinecommunicateswithlayerxonanother
machine.Thiscommunicationisgovernedbyanagreed-uponseriesofrulesand
conventionscalledprotocols.
•Theprocessesoneachmachinethatcommunicateatagivenlayerarecalledpeer-to-peer
processes.
•Communicationbetweenmachinesisthereforeapeer-to-peerprocessusingthe
protocolsappropriatetoagivenlayer.

Figure 1.12 The interaction between layers in the OSI model

Peer-to-Peer Processes
•Atthephysicallayer,communicationisdirect.Atthehigherlayers,however,
communicationmustmovedownthroughthelayersondeviceAbackupthroughthe
layers.
•Eachlayerinthesendingdeviceaddsitsowninformationtothemessageitreceives
fromthelayerjustaboveitandpassesthewholepackagetothelayerjustbelowit.
•Entirepackageisconvertedtoaformthatcanbetransmittedtothereceivingdevice.
Atthereceivingmachine,themessageisunwrappedlayerbylayer,witheachprocess
receivingandremovingthedatameantforit.
•Forexample,layer2removesthedatameantforit,andthenpassestheresttolayer
3.Layer3thenremovesthedatameantforitandpassestheresttolayer4,andso
on.
InterfacesbetweenLayers:
•Thepassingofthedataandnetworkinformationdownthroughthelayersofthe
sendingdeviceandbackupthroughthelayersofthereceivingdeviceismade
possiblebyaninterfacebetweeneachpairofadjacentlayers.
•Eachinterfacedefinestheinformationandservicesalayermustprovideforthelayer
aboveit.
•Well-definedinterfacesandlayerfunctionsprovidemodularitytoanetwork

OrganizationoftheLayers:
Thesevenlayersarearrangedbythreesubgroups.
–NetworkSupportLayers
–UserSupportLayers
–IntermediateLayer
1.NetworkSupportLayers
–Physical,DatalinkandNetworklayerscomeunderthegroup.
–Theydealwiththephysicalaspectsofthedatasuchaselectrical
specifications,physicalconnections,physicaladdressing,and
transporttimingandreliability.
2.UserSupportLayers
–Session,PresentationandApplicationlayerscomesunderthe
group.
–Theydealwiththeinteroperabilitybetweenthesoftwaresystems.
3.IntermediateLayer
Thetransportlayeristheintermediatelayerbetweenthenetwork
supportandtheusersupportlayers.

Figure 1.13 An exchange using the OSI Model

•TheupperOSIlayersarealmostalwaysimplementedinsoftware;lowerlayersarea
combinationofhardwareandsoftware,exceptforthephysicallayer,whichismostly
hardware.
AnexchangeusingtheOSIModel
•Infig.1.13,D7meansthedataunitatlayer7,D6meansthedataunitatlayer6,andsoon.
•Theprocessstartsatlayer7(theapplicationlayer),thenmovesfromlayertolayerin
descending,sequentialorder.
•Ateachlayer,aheader,orpossiblyatrailer,canbeaddedtothedataunit.
•Commonly,thetrailerisaddedonlyatlayer2.Whentheformatteddataunitpassesthrough
thephysicallayer(layer1),itischangedintoanelectromagneticsignalandtransportedalong
aphysicallink.
•Uponreachingitsdestination,thesignalpassesintolayer1andistransformedbackinto
digitalform.ThedataunitsthenmovebackupthroughtheOSIlayers.
•Aseachblockofdatareachesthenexthigherlayer,theheadersandtrailersattachedtoitat
thecorrespondingsendinglayerareremoved,andactionsappropriatetothatlayerare
taken.
•Bythetimeitreacheslayer7,themessageisagaininaformappropriatetotheapplication
andismadeavailabletotherecipient.
Encapsulation:
•Apacket(headeranddata)atlevel7isencapsulatedinapacketatlevel6.Thewholepacket
atlevel6isencapsulatedinapacketatlevel5,andsoon.
•Inotherwords,thedataportionofapacketatlevelN-1carriesthewholepacket(dataand
headerandmaybetrailer)fromlevelN.Theconceptiscalledencapsulation.

LAYERS IN THE OSI MODEL
1.PhysicalLayer
Thephysicallayerisresponsiblefor
movementsofindividualbitsfromonehop(node)to
thenext.
Figure 1.14 Physical layer

Otherresponsibilitiesare,
Physicalcharacteristicsofinterfacesandmedium:
•Itdefinesthecharacteristicsoftheinterfacebetweenthedevicesandthe
transmissionmediumasinfig.1.14.
•Italsodefinesthetypeoftransmissionmedium.
RepresentationofBits:
•Totransmitthestreamofbits,theymustbeencodedintosignals
(electricaloroptical).
•Itdefinesthetypeofencoding.
Fig. Physical layer

DataRate:
•Itdefinesthetransmissionratei.e.thenumberof
bitssentpersecond(physicallayerdefinesthe
durationofabit,whichishowlongitlasts)
SynchronizationofBits:
•Thesenderandreceivermustbesynchronizedat
thebitlevel.
•Inotherwords,thesenderandthereceiver
clocksmustbesynchronized.
.

Line Configuration:
It defines the type of connection between the devices. Two types of
connection are,
–point to point
–multipoint
Physical Topology:
It defines how devices are connected to make a network.
Devices can be connected by
–mesh
–star
–bus
–ring
–hybrid
Transmission Mode
It defines the direction of transmission between devices: simplex,
half duplex and full duplex

2. Data link Layer
Thedatalinklayerisresponsiblefor
movingframesfromonehop(node)tothe
next.
Figure 1.15 Data link layer

Data Link Layer Example

Otherresponsibilitiesare,
Framing
•Itdividesthestreamofbitsreceivedfromnetworklayerintomanageabledataunitscalled
framesasinfig.1.15.
PhysicalAddressing
•Ifframesaretobedistributedtodifferentsystemsonthenetwork,thedatalinklayeraddsa
headertotheframetodefinethesenderand/orreceiveroftheframe.
•Iftheframeisintendedforasystemoutsidethesender'snetwork,thereceiveraddressis
theaddressofthedevicethatconnectsthenetworktothenextone.
Flowcontrol
•Iftherateatwhichthedataareabsorbedbythereceiverislessthantherateatwhichdata
areproducedinthesender,thedatalinklayerimposesaflowcontrol
mechanismtoavoidoverwhelmingthereceiver.
Errorcontrol
•Thedatalinklayeraddsreliabilitytothephysicallayerbyaddingmechanismstodetectand
retransmitdamagedorlostframes.
•Italsousesamechanismtorecognizeduplicateframes.Errorcontrolisnormallyachieved
throughatraileraddedtotheendoftheframe.
Accesscontrol
•Whentwoormoredevicesareconnectedtothesamelink,datalinklayerprotocolsare
necessarytodeterminewhichdevicehascontroloverthelinkatanygiventime.

3. Network Layer
•Thenetworklayerisresponsibleforthe
deliveryofindividualpacketsasinfig.1.16,
fromthesourcehosttothedestinationhost.
•Iftwosystemsareconnectedtothesamelink,
thereisusuallynoneedforanetworklayer.
•However,ifthetwosystemsareattachedto
differentnetworks(links)withconnecting
devicesbetweenthenetworks(links),thereis
oftenaneedforthenetworklayerto
accomplishsource-to-destinationdelivery.

Figure 1.16 Network layer
Theresponsibilitiesare,
LogicalAddressing
─Ifapacketpassesthenetworkboundary,weneedanotheraddressingsystem
tohelpdistinguishthesourceanddestinationsystems.
─Thenetworklayeraddsaheadertothepacketcomingfromtheupperlayer
that,amongotherthings,includesthelogicaladdressesofthesenderand
receiver.
Routing
─Whenindependentnetworksorlinksareconnectedtocreatealargenetwork,
theconnectingdevices(calledrouterorswitches)routeorswitchthepacketsto
theirfinaldestination.

4. Transport Layer
•Thetransportlayerisresponsibleforprocesstoprocessdeliveryof
theentiremessage.
•Aprocessisanapplicationprogramrunningonahost.
•Itensuresthatthewholemessagearrivesinorderandintact.It
ensuresboththeerrorcontrolandflowcontrolatsourceto
destinationlevel.
Figure 1.17 Transport Layer

Theresponsibilitiesare,
ServicepointAddressing
•Computersoftenrunseveralprogramsatthesametime.
•Thetransportlayerheadermustthereforeincludeatypeofaddresscalledaservice-
pointaddress(orportaddress).
•Thetransportlayergetseachpackettothecorrectcomputer;thetransportlayergets
theentiremessagetothecorrectprocessonthatcomputer.
SegmentationandReassembly
•Amessageisdividedintotransmittablesegments,witheachsegmentcontaininga
sequencenumberasshowninfig.1.17.
•Thesenumbersenablethetransportlayertoreassemblethemessagecorrectlyupon
arrivingatthedestinationandtoidentifyandreplacepacketsthatwerelostin
transmission.
Connectioncontrol
•Thetransportlayercanbeeitherconnectionlessorconnection-oriented.
•Aconnectionlesstransportlayertreatseachsegmentasanindependentpacketand
deliversittothetransportlayeratthedestinationmachine.
•Aconnection-orientedtransportlayermakesaconnectionwiththetransportlayer
atthedestinationmachinefirstbeforedeliveringthepackets.Afterallthedataare
transferred,theconnectionisterminated.

Flowcontrol
•Likethedatalinklayer,thetransportlayerisresponsiblefor
flowcontrol.However,flowcontrolatthislayerisperformed
endtoendratherthanacrossasinglelink.
Errorcontrol
•Likethedatalinklayer,thetransportlayerisresponsiblefor
errorcontrol.However,errorcontrolatthislayerisperformed
process-to-processratherthanacrossasinglelink.
•Thesendingtransportlayermakessurethattheentire
messagearrivesatthereceivingtransportlayerwithouterror
(damage,loss,orduplication).
•Errorcorrectionisusuallyachievedthroughretransmission.

5. Session Layer
•Itisthenetworkdialogcontroller.
•Itestablishes,maintainsandsynchronizesthe
interactionbetweenthecommunicating
systems.
Figure 1.18 Session Layer

Specificresponsibilitiesare,
DialogControl
•Thesessionlayerallowstwosystemstoenterintoa
dialog.
•Itallowsthecommunicationbetweentwoprocessesto
takeplaceineitherhalf-duplex(onewayatatime)or
full-duplex(twowaysatatime)mode.
Synchronization
•Itallowsaprocesstoaddcheckpoints,or
synchronizationpointasinfig.1.18,toastreamofdata.

6. Presentation Layer
•Thepresentationlayerisresponsibleforthesyntaxand
semanticsoftheinformationexchangedbetweentwo
systemsasshowninfig.1.19.
Specificresponsibilitiesare,
Translation
•Theprocesses(runningprograms)intwosystemsare
usuallyexchanginginformationintheformofcharacter
strings,numbers,andsoon.
•Theinformationmustbechangedtobitstreamsbefore
beingtransmitted.Becausedifferentcomputersuse
differentencodingsystems.
•Thepresentationlayerisresponsibleforinteroperability
betweenthesedifferentencodingmethods.

Encryption
•Tocarrysensitiveinformation,asystemmustbeabletoensureprivacy.
•Encryptionmeansthatthesendertransformstheoriginalinformationtoanother
formandsendstheresultingmessageoutoverthenetwork.
Decryption
•Itreversestheoriginalprocesstotransformthemessagebacktoitsoriginalform.
Compression
•Datacompressionreducesthenumberofbitscontainedintheinformation.
•Datacompressionbecomesparticularlyimportantinthetransmissionof
multimediasuchastext,audio,andvideo.
Figure 1.19 Presentation Layer

7. Application Layer
•The application layer enables the user, whether human or software,
to access the network as in fig.1.20.
•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.
•X.400 (message-handling services), X.500 (directory services), and
file transfer, access, and management (FTAM).
Figure 1.20 Application Layer

Specificresponsibilitiesare,
NetworkVirtualTerminal(NVT)
•Itisasoftwareversionofaphysicalterminal,andit
allowsausertologontoaremotehost.
FileTransfer,Access,andManagement(FTAM)
•Itallowsausertoaccessfiles,toretrievefilesfrom
remotehost,andtomanageorcontrolfilesina
remotecomputerlocally.
MailServices
•Itprovidesthebasisfore-mailforwardingandstorage.
DirectoryServices
•Itprovidesdistributeddatabasesourcesandaccessfor
globalinformationaboutvariousobjectsandservices.

TCP/IP PROTOCOL SUITE
•TheTCP/IPprotocolsuitewasdevelopedpriortotheOSImodel.
Therefore,thelayersintheTCP/IPprotocolsuitedonotexactlymatch
thoseintheOSImodel.
•TheoriginalTCP/IPprotocolsuitewasdefinedashavingfourlayers:
–host-to-network
–internet
–transport
–application
•TCP/IPprotocolsuiteismadeoffivelayers:
–physical
–datalink
–network
–transport
–application
•Thefirstfourlayersprovidephysicalstandards,networkinterfaces,
internetworking,andtransportfunctionsthatcorrespondtothefirstfour
layersoftheOSImodelasinfig.1.21.
•ThethreetopmostlayersintheOSImodelarerepresentedinTCP/IPbya
singlelayercalledtheapplicationlayer.

Figure 1.21 TCP/IP and OSI model

•TCP/IPisahierarchicalprotocolmadeupofinteractivemodules.Theterm
hierarchicalmeansthateachupper-levelprotocolissupportedbyoneormore
lower-levelprotocols.
•Atthetransportlayer,TCP/IPdefinesthreeprotocols:TransmissionControl
Protocol(TCP),UserDatagramProtocol(UDP),andStreamControlTransmission
Protocol(SCTP).
•Atthenetworklayer,themainprotocoldefinedbyTCP/IPistheInternetworking
Protocol(IP).
•Atthephysicalanddatalinklayers,TCP/IPdoesnotdefineanyspecificprotocol.
Itsupportsallthestandardandproprietaryprotocols.
•AnetworkinaTCP/IPinternetworkcanbealocal-areanetworkorawide-area
network.
•ThetransportlayerwasrepresentedinTCP/IPbytwoprotocols:TCPandUDP.
•IPisahost-to-hostprotocol,meaningthatitcandeliverapacketfromone
physicaldevicetoanother.
•UDPandTCParetransportlevelprotocolsresponsiblefordeliveryofamessage
fromaprocess(runningprogram)toanotherprocess.
•Anewtransportlayerprotocol,SCTP(StreamControlTransmissionProtocol)has
beendevisedtomeettheneedsofsomenewerapplications.
•TheapplicationlayerinTCP/IPisequivalenttothecombinedsession,presentation,
andapplicationlayersintheOSImodel.Manyprotocolsaredefinedatthislayer.

ADDRESSING
Fourlevelsofaddressesareusedinan
internetemployingtheTCP/IPprotocols:
–Physical(link)addresses
–Logical(IP)addresses
–Portaddresses
–Specificaddresses

1.Physicaladdress(MACaddress)
•Infig.1.22,thePhysicaladdresses,alsoknownas
thelinkaddress,istheaddressofanodeas
definedbyitsLANorWAN.
•Forexample,Ethernetusesa6-byte(48-bit)
physicaladdressthatisimprintedontheNetwork
interfacecard(NIC).
Figure1.22Physicaladdresses

MAC address
•ThefirsthalfofaMACaddresscontainstheID
numberoftheadaptermanufacturer.
•ThesecondhalfofaMACaddressrepresents
theserialnumberassignedtotheadapterby
themanufacturer.
Intheexample,
00:A0:C9:14:C8:29
Theprefix00A0C9indicatesthemanufacturer
isIntelCorporation.

2.Logicaladdresses(IPaddresses)
•Logicaladdressesarenecessaryforuniversal
communicationsthatareindependentof
underlyingphysicalnetworksasinfig.1.23.
•AlogicaladdressintheInternetiscurrentlya32-
bitaddressthatcanuniquelydefineahost
connectedtotheInternet.
•Notwopubliclyaddressedandvisiblehostson
theInternetcanhavethesameIPaddress.
•Thenumbersareseparatedbyadot.132.24.75.9
isanexampleofsuchanIPaddress.

Fig 1.23 IP addresses

3.Portaddresses
•Today,computersaredevicesthatcanrun
multipleprocessesatthesametime.
•TheendobjectiveofInternetcommunicationisa
processcommunicatingwithanotherprocess.
•Fortheseprocessestoreceivedata
simultaneously,weneedamethodtolabelthe
differentprocesses.
•IntheTCP/IParchitecture,thelabelassignedto
aprocessiscalledaportaddressasinfig.1.24.A
portaddressinTCP/IPis16bitsinlength.

Fig 1.24 Port addresses
4. Specific Addresses
•Some applications have user-friendly addresses that are designed for that specific address.
•Examples include the e-mail address (for example, [email protected]) and the Universal
Resource Locator (URL) (for example, www.mhhe.com).
•The first defines the recipient of an e-mail the second is used to find a document on the World
Wide Web.

Performane

Physical Links
Transmissionmediacanbedefinedasphysicalpathbetweentransmitterand
receiverinadatatransmissionsystem.
1.Guided:
̶Transmissioncapacitydependsonthemediumandthelength.
̶Alsoitisbasedonwhetherthemediumispoint-to-pointormultipoint(e.g.
LAN).
̶Examplesareco-axialcable,twistedpair,andopticalfiber.
2.Unguided:
̶providesameansfortransmittingelectro-magneticsignalsbutdonotguide
them.Examplewirelesstransmission.
–Characteristicsandqualityofdatatransmissionaredeterminedbymediumand
signalcharacteristics.
–Forguidedmedia,themediumismoreimportantindeterminingthelimitationsof
transmission.
–Forunguidedmedia,thebandwidthofthesignalproducedbythetransmitting
antennaandthesizeoftheantennaismoreimportantthanthemedium.
–Signalsatlowerfrequenciesareomni-directional(propagateinalldirections).
–Forhigherfrequencies,focusingthesignalsintoadirectionalbeamispossible.
–Thesepropertiesdeterminewhatkindofmediaoneshoulduseinaparticular
application.

Figure 1.19 Classification of the transmission media
Guided transmission media
The most commonly used guided transmission media such as
–Twisted-pair of cable
–Coaxial cable
–Optical fiber
v

1.TwistedPairCable
̶Thetwowiresaretypically``twisted''togethertoreduceinterference(likecrosstalk)
betweenthetwoconductorsasshowninFig.1.20.
̶Typically,anumberofpairsarebundledtogetherintoacablebywrappingthemina
toughprotectivesheath.
Figure1.20CAT5cable(twistedcable)
–DataratesofseveralMbpscommon.
–Spansdistancesofseveralkilometers.
–Dataratedeterminedbywirethicknessandlength.
–Inaddition,shieldingtoeliminateinterferencefromotherwiresimpactssignal-to-noise
ratio,andultimately,thedatarate.
–Good,low-costcommunication.Inreality,manysitesalreadyhavetwistedpairinstalled
inoffices--existingphonelines!

Typicalcharacteristics:
1.Twisted-paircanbeusedforbothanaloganddigitalcommunication.
2.Thedataratethatcanbesupportedoveratwisted-pairisinverselyproportional
tothesquareofthelinelength.
3.Maximumtransmissiondistanceof1Kmcanbeachievedfordataratesupto1
Mb/s.
4.Foranalogvoicesignals,amplifiersarerequiredaboutevery6Kmandfordigital
signals,repeatersareneededforabout2Km.
5.Toreduceinterference,thetwistedpaircanbeshieldedwithmetallicbraid.
ThistypeofwireisknownasShieldedTwisted-Pair(STP)andtheotherformis
knownasUnshieldedTwisted-Pair(UTP).
Uses:
1.Theoldestandthemostpopularuseoftwistedpairareintelephony.(Category6
cable-6
th
generationoftwistedpaircable)
2.InLANitiscommonlyusedforpoint-to-pointshortdistancecommunication(say,
100m)withinabuildingoraroom.

2.CoaxialCable
2.1BasebandCoaxial
1.With``coax'',themediumconsistsofacoppercoresurroundedbyinsulating
materialandabraidedouterconductorasshowninFig.1.21.
2.Thetermbasebandindicatesdigitaltransmission(asopposedtobroadband
analog).
Figure1.21Co-axialcable
3.Physicalconnectionconsistsofmetalpintouchingthecoppercore.
4.Therearetwocommonwaystoconnecttoacoaxialcable:
–Withvampiretaps,ametalpinisinsertedintothecoppercore.Aspecialtooldrillsaholeinto
thecable,removingasmallsectionoftheinsulation,andaspecialconnectorisscrewedinto
thehole.Thetapmakescontactwiththecoppercore.
–WithaT-junction,thecableiscutinhalf,andbothhalvesconnecttotheT-junction.AT-
connectorisanalogoustothesignalsplittersusedtohookupmultipleTVstothesamecable
wire.

Characteristics:
1.Co-axialcablecanbeusedforbothanaloganddigitalsignaling.
2.InbasebandLAN,thedataratesliesintherangeof1KHzto20MHzoveradistanceinthe
rangeof1Km.
3.Co-axialcablestypicallyhaveadiameterof3/8".
4.Coaxialcablesareusedbothforbasebandandbroadbandcommunication.
5.Inbroadbandsignaling,signalpropagatesonlyinonedirection,incontrasttopropagationin
bothdirectionsinbasebandsignaling.
6.Broadbandcablinguseseitherdual-cableschemeorsingle-cableschemewithaheadend
tofacilitateflowofsignalinonedirection.Becauseoftheshielded,concentricconstruction,
co-axialcableislesssusceptibletointerferenceandcrosstalkthanthetwisted-pair.
7.Forlongdistancecommunication,repeatersareneededforeverykilometer.
8.Dataratedependsonphysicalpropertiesofcable,but10Mbpsistypical.
Uses:
1.Oneofthemostpopularusesofco-axialcableisincableTV(CATV)forthedistributionof
TVsignals.RG-6iscabletelevision(CATV)distributioncoaxcable.RG59isgoodforlower
frequencysignals(anythingunderabout50MHz).Thatmakesitagoodchoiceforaclosed
circuittelevision(CCTV)videosurveillancesystem
2.Anotherimportanceuseofco-axialcableisinLAN.

2.2BroadbandCoaxial
1.Thetermbroadbandreferstoanalog
transmissionovercoaxialcable.
2.Thetechnology:
–Typicallybandwidthof300MHz,totaldatarateof
about150Mbps.
–Operatesatdistancesupto100km(metropolitan
area!).
–Usesanalogsignaling.
–Requiresamplifierstoboostsignalstrength;because
amplifiersareoneway,dataflowsinonlyone
direction.

3. Fiber Optics
1.Infiberoptictechnology,themediumconsistsofahair-widthstrand(filament)ofsiliconorglass,andthe
signalconsistsofpulsesoflight.
2.Forinstance,apulseoflightmeans``1'',lackofpulsemeans``0''.
3.Ithasacylindricalshapeandconsistsofthreeconcentricsections:thecore,thecladding,andthejacketas
showninFig.1.22.
Figure1.22OpticalFiber
4.Thecore,innermostsectionconsistsofasinglesoliddielectriccylinderofdiameterd
1andofrefractiveindex
n
1.
5.Thecoreissurroundedbyasoliddielectriccladdingofrefractiveindexn
2thatislessthann
1.
6.Asaconsequence,thelightispropagatedthroughmultipletotalinternalreflections.
7.Thecorematerialisusuallymadeofultrapurefusedsilicaorglassandthecladdingiseithermadeofglassor
plastic.
8.Thecladdingissurroundedbyajacketmadeofplastic.Thejacketisusedtoprotectagainstmoisture,
abrasion,crushingandotherenvironmentalhazards.

Threecomponentsarerequired:
1.Fibermedium:Currenttechnologycarrieslightpulsesfortremendousdistances(e.g.,100sof
kilometers)withvirtuallynosignalloss.
2.Lightsource:typicallyaLightEmittingDiode(LED)orlaserdiode.Runningcurrentthrough
thematerialgeneratesapulseoflight.
3.Aphotodiodelightdetector,whichconvertslightpulsesintoelectricalsignals.
Advantages:
1.Veryhighdatarate,lowerrorrate.
2.Difficulttotap,whichmakesithardforunauthorizedtapsaswell?Thisisresponsiblefor
higherreliabilityofthismedium.
3.Muchthinner(perlogicalphoneline)thanexistingcoppercircuits.
4.Notsusceptibletoelectricalinterference(lightning)orcorrosion(rust).
5.Greaterrepeaterdistancethancoax.
Disadvantages:
1.Expensive.
2.One-waychannel.Twofibersneededtogetfullduplex(bothways)communication.

OpticalFiberworksindifferenttypesofmodes:
Theyare
1.Multi-ModeFiber(MMF)-thecoreandcladdingdiameterliesintherange50-
200μm(1mm=1000μm)and125-400μm,respectively.
2.Single-ModeFiber(SMF)-thecoreandcladdingdiameterslieintherange8-12μmand125μm,
respectively.Single-modefibersarealsoknownasMono-ModeFiber.
Moreover,bothsingle-modeandmulti-modefiberscanhavetwotypes;
1.Stepindex-therefractiveindexofthecoreisuniformthroughoutandatthecorecladding
boundarythereisanabruptchangeinrefractiveindex
2.Gradedindex-therefractiveindexofthecorevariesradicallyfromthecentretothecore-
claddingboundaryfromn
1ton
2inalinearmanner.Fig1.23showstheopticalfibertransmission
modes.

Characteristics:
1.Whenlightisappliedatoneendoftheopticalfibercore,itreachestheotherend
bymeansoftotalinternalreflectionbecauseofthechoiceofrefractiveindexof
coreandcladdingmaterial(n
1>n
2).
2.Thelightsourcecanbeeitherlightemittingdiode(LED)orinjectionlaserdiode
(ILD).Thesesemiconductordevicesemitabeamoflightwhenavoltageisapplied
acrossthedevice.
3.Atthereceivingend,aphotodiodecanbeusedtodetectthesignal-encodedlight.
4.Single-modefiberallowslongerdistanceswithoutrepeater.
5.Formulti-modefiber,thetypicalmaximumlengthofthecablewithoutarepeater
is2km,whereasforsingle-modefiberitis20km.
FiberUses:
1.Ithassmallerdiameter,lighterweight,lowattenuation,immunityto
electromagneticinterference.
2.usefulforlong-distancetelecommunications.
3.Fiberopticcablesarealsousedinhigh-speedLANapplications.
4.Multi-modefiberiscommonlyusedinLAN.

UnguidedTransmission
1.Unguidedtransmissionisusedwhenrunningaphysicalcable(eitherfiberorcopper)betweentwoend
pointsisnotpossible.
2.Radiofrequency(RF)isarateofoscillationintherangeofaround3kHzto300GHz,whichcorresponds
tothefrequencyofradiowaves.
3.Infraredsignalstypicallyusedforshortdistances(frequencyrange430THzto300GHz)
4.Microwavesignals-anelectromagneticwaveintherangebetween300MHz(0.3GHz)and300GHz,
shorterthanthatofanormalradiowavebutlongerthanthoseofinfraredradiation.
– SenderandreceiverusesomesortofdishantennaasshowninFig.1.24.
– Microwavesareusedinradar,incommunications,andforheatinginmicrowaveovensandinvarious
industrialprocesses.
Figure1.24CommunicationusingTerrestrialMicrowave
Difficulties:
1.Weatherinterfereswithsignals.Forinstance,clouds,rain,lightning,etc.mayadverselyaffect
communication.
2.Radiotransmissionseasytotap.

•Theatmosphereis divided into five layers. It is thickest near the surface and thins out with height until it
eventually merges with space.
•1) Thetroposphereis the first layer above the surface and contains half of the Earth's
atmosphere.Weatheroccurs in this layer.
2) Many jet aircrafts fly in thestratospherebecause it is very stable. Also, the ozone layer absorbs harmful
rays from the Sun.
3) Meteors or rock fragments burn up in themesosphere.
4) Thethermosphereis a layer with auroras. It is also where the space shuttle orbits.
5) The atmosphere merges into space in the extremely thin exosphere. This is the upper limit of our
atmosphere.

SatelliteCommunication
1.Acommunicationsatelliteisessentiallyabig
microwaverepeaterorrelaystationinthesky.
2.Microwavesignalsfromagroundstationispickedup
byatransponder(deviceattachedtoasatellite),
amplifiesthesignalandrebroadcastsitinanother
frequency,whichcanbereceivedbygroundstations
atlongdistances.
3.Tokeepthesatellitestationarywithrespecttothe
groundbasedstations,thesatelliteisplacedina
geostationaryorbitabovetheequatoratanaltitude
ofabout36,000km.
4.Asatellitecanbeusedforpoint-to-point
communicationbetweentwoground-basedstations
asshowninFig.1.25.

Figure 1.25 Satellite Microwave Communication: point –to-point
Figure 1.26 Satellite Microwave Communication: Broadcast links

Characteristics:
1.Optimumfrequencyrangeforsatellitecommunicationis1to10
GHz.
2.Themostpopularfrequencybandis3.7to4.2GHzfordownlink
and5.925to6.425foruplinktransmissions.
3.Themostimportantisthelongcommunicationdelayforthe
roundtrip(about270ms)becauseofthelongdistance(about
72,000km)thesignalhastotravelbetweentwoearthstations.
4.Allstationsunderthedownwardbeamcanreceivethe
transmission.
5.Itmaybenecessarytosendencrypteddatatoprotectagainst
piracy.
Uses:
1.Now-a-dayscommunicationsatellitesarenotonlyusedtohandle
telephone,telexandtelevisiontrafficoverlongdistances,butare
usedtosupportvariousinternetbasedservicessuchase-mail,
FTP,WorldWideWeb(WWW),etc.
2.Newtypesofservices,basedoncommunicationsatellites,are
emerging.

Channel Access on links
MultipleAccessTechniques
Variousmultipleaccesstechniquesare
1.FrequencyDivisionMultipleAccess(FDMA)
2.TimeDivisionMultipleAccess(TDMA)
3.CodeDivisionMultipleAccess(CDMA)
1.FrequencyDivisionMultipleAccess
Infrequency-divisionmultipleaccess(FDMA),theavailablebandwidthisdividedinto
frequencybands.
Eachstationisallocatedabandtosenditsdata.
Inthismethodwhenanyonefrequencyleveliskeptidleandanotherisusedfrequently
leadstoinefficiency.
Figure1.27FrequencyDivisionMultipleAccess
f
f5
f4
f3
f2
f1
t

2.TimeDivisionMultipleAccess
Intime-divisionmultipleaccess(TDMA),thestationssharethe
bandwidthofthechannelintime.
Eachstationisallocatedatimeslotduringwhichitcansenddata.
ThemainproblemwithTDMAliesinachievingsynchronizationbetween
thedifferentstations.
Eachstationneedstoknowthebeginningofitsslotandthelocationofits
slot.
Figure1.28TimeDivisionMultipleAccess
f
f1 f2 f3 f4 f5 f6
t

3. Code Division Multiple Access
CDMAdiffersfromFDMAbecauseonlyonechanneloccupiestheentire
bandwidthofthelink(transmission)atthesametime.
ItalsodiffersfromTDMAbecauseallstationscansenddataatthesametime
withouttimesharing.
CDMAsimplymeanscommunicationwithdifferentcodes.
CDMAisbasedoncodingtheory.Eachstationisassignedacode,whichisa
sequenceofnumberscalledchips.
Chipswillbeaddedwiththeoriginaldataanditcanbetransmittedthrough
samemedium.
Figure 1.29 Code Division Multiple Access
Code c
C5
c4
c3
c2
c1
Frequency f

Issues in the data link layer
Framing
1.Itseparatesamessagefromonesourcetoadestination.Totransmitframesover
thenodeitisnecessarytomentionstartandendofeachframe.
2.Framescanbeoffixedorvariablesize.
3.Infixed-sizeframing,thereisnoneedfordefiningtheboundariesofframes;in
variable-sizeframing,weneedadelimiter(flag)todefinetheboundaryoftwo
frames.
4.Variable-sizeframingusestwocategoriesofprotocols:
̶Byte-oriented(orcharacteroriented)
̶Bit-oriented
5.Inabyte-orientedprotocol,thedatasectionofaframeisasequenceofbytes;in
abit-orientedprotocol,thedatasectionofaframeisasequenceofbits.
6.Therearethreetechniquestosolvethisframe
1.Byte-OrientedProtocols(BISYNC,PPP,DDCMP)
2.Bit-OrientedProtocols(HDLC)
3.Clock-BasedFraming(SONET)

1. Byte Oriented protocols
1.Thisistovieweachframeasacollectionofbytes(characters)
ratherthanacollectionofbits.
2.Suchabyte-orientedapproachisexemplifiedbytheBISYNC
(BinarySynchronousCommunication)protocolandtheDDCMP
(DigitalDataCommunicationMessageProtocol).
3.Thesetwoprotocolsareexamplesoftwodifferentframing
techniques,thesentinelapproachandthebyte-counting
approach.
SentinelApproach
TheBISYNCprotocolillustratesthesentinelapproachtoframing;its
frameformatisshowninfig.1.23.
Figure1.30BISYNCFrameformat

1.ThebeginningofaframeisdenotedbysendingaspecialSYN
(synchronization)character.
2.Thedataportionoftheframeisthencontainedbetweenspecial
sentinelcharacters:STX(startoftext)andETX(endoftext).
3.TheSOH(startofheader)fieldservesmuchthesamepurposeas
theSTXfield.
4.TheframeformatalsoincludesafieldlabeledCRC(cyclic
redundancycheck)thatisusedtodetecttransmissionerrors.
5.TheproblemwiththesentinelapproachisthattheETXcharacter
mightappearinthedataportionoftheframe.
6.BISYNCovercomesthisproblemby“escaping”theETXcharacter
byprecedingitwithaDLE(data-link-escape)characterwhenever
itappearsinthebodyofaframe;theDLEcharacterisalso
escapedintheframebody.Thisapproachiscalledcharacter
stuffing.

Point-to-PointProtocol(PPP)
ThemorerecentPoint-to-PointProtocol(PPP),whichiscommonlyrun
overdialupmodemlinks.TheformatofPPPframeis
Figure1.31PPPFrameFormat
1.TheFlagfieldhas01111110asstartingsequence.
2.TheAddressandControlfieldsusuallycontaindefaultvalues.
3.TheProtocolfieldisusedfordemultiplexing.
4.Theframepayloadsizecanhenegotiated,butitis1500bytesbydefault.
5.ThePPPframeformatisunusualinthatseveralofthefieldsizesare
negotiatedratherthanfixed.
6.NegotiationisconductedbyaprotocolcalledLCP(LinkControlProtocol).
7.LCPsendscontrolmessagesencapsulatedinPPPframes—suchmessages
aredenotedbyanLCPidentifierinthePPPProtocol.

Byte-CountingApproach
Figure1.32DDCMPframeformat
1.Thenumberofbytescontainedinaframecanbeincludedasafieldin
theframeheader.DDCMPprotocolusesthisapproachasshownin
fig.1.32.
2.COUNTFieldspecifieshowmanybytesarecontainedintheframe’s
body.
3.AtransmissionerrorcouldcorrupttheCOUNTfield,inwhichcasethe
endoftheframewouldnotbecorrectlydetected.
4.HencethereceiverwillaccumulateasmanybytesasthebadCOUNT
fieldindicatesandthenusetheerrordetectionfieldtodeterminethat
theframeisbad.Thisissometimescalledaframingerror.
5.ThereceiverwillthenwaituntilitseesthenextSYNcharactertostart
collectingthebytesthatmakeupthenextframe.

2. Bit-Oriented Protocols (HDLC)
1.Inthis,framesareviewedasacollectionofbits.
2.TheSynchronousDataLinkControl(SDLC)protocolisanexampleofabit-orientedprotocol;SDLCwaslater
standardizedbytheISOastheHigh-LevelDataLinkControl(HDLC)protocol.
Figure1.33HDLCFrameFormat
3.HDLCdenotesboththebeginningandtheendofaframewiththedistinguishedbitsequence01111110.
4.Thissequencemightappearanywhereinthebodyoftheframe,itcanbeavoidedbybitstuffing.
5.Onthesendingside,anytimefiveconsecutive1’shavebeentransmittedfromthebodyofthemessage
(i.e.,excludingwhenthesenderistryingtotransmitthedistinguished01111110sequence),thesender
insertsa0beforetransmittingthenextbit.
6.Bylookingatthenextbit,thereceivercandistinguishbetweenthesetwocases:
Ifitseesa0(i.e.,thelasteightbitsithaslookedatare01111110),thenitistheend-of-frame
marker.
Ifitseesa1(i.e.,thelasteightbitsithaslookedatare01111111),thentheremusthavebeenan
errorandthewholeframeisdiscarded.

Byte stuffing and unstuffing
Bytestuffingistheprocessofadding1extrabytewheneverthereisaflagor
escapecharacterinthetext.

A frame in a bit-oriented protocol
Bitstuffingistheprocessofaddingoneextra0wheneverfiveconsecutive1s
followa0inthedata,sothatthereceiverdoesnotmistakethepattern
0111110foraflag.

3. Clock-Based Framing (SONET)
1.SynchronousOpticalNetworkStandardisusedforlongdistancetransmissionofdata
overopticalnetwork.
2.Itsupportsmultiplexingofseverallowspeedlinksintoonehighspeedlinks.
3.AnSTS-1frameisusedinthismethod.
Figure1.34ASONETSTS-1frame
4.Itisarrangedasninerowsof90byteseach,andthefirst3bytesofeachroware
overhead,withtherestbeingavailablefordata.
5.Thefirst2bytesoftheframecontainaspecialbitpattern,anditisthesebytesthat
enablethereceivertodeterminewheretheframestarts.
6.Thereceiverlooksforthespecialbitpatternconsistently,onceinevery810bytes,since
eachframeis9x90=810byteslong.

Figure1.35ThreeSTS-1framesmultiplexedontooneSTS-3cframe.
1.TheSTS-NframecanhethoughtofasconsistingofNSTS-1frames,wherethe
bytesfromtheseframesareinterleaved;thatis,abytefromthefirstframeis
transmitted,thenabytefromthesecondframeistransmitted,andsoon.
2.PayloadfromtheseSTS-1framescanhelinkedtogethertoformalargerSTS-N
payload,suchalinkisdenotedSTS-Nc.Oneofthebitsinoverheadisusedforthis
purpose.

Error Detection and Correction
1.Networks must be able to transfer data from one device to another with complete
accuracy.
2.Data can be corrupted during transmission.
3.For reliable communication, errors must be detected and corrected.
4.Error detection and correctionare implemented either at the data link layeror
the transport layerof the OSImodel.
5.The number of bits position in which code words differ is called the Hamming
distance.
Typesoferrors
Theseerrorscanbedividedintotwotypes:
–Single-biterror
–Bursterror

Single-bitError
Thetermsingle-biterrormeansthatonlyone
bitofgivendataunit(suchasabyte,
character,ordataunit)ischangedfrom1to0
orfrom0to1asshowninFig.1.36
Figure1.36Singlebiterror

2.BurstError
1.Thetermbursterrormeansthattwoormorebitsinthedataunithavechangedfrom0to1or
vice-versa.
2.Bursterrorsaremostlylikelytohappeninserialtransmission.
3.Thelengthofthebursterrorismeasuredfromthefirstcorruptedbittothelastcorruptedbit.
4.Somebitsinbetweenmaynotbecorrupted.
Figure1.37BurstError
Figure1.38BurstError

Error Detecting Codes
•Errordetectionmeanstodecidewhetherthereceiveddataiscorrector
notwithouthavingacopyoftheoriginalmessage.
•Errordetectionusestheconceptofredundancy,whichmeansadding
extrabitsfordetectingerrorsatthedestination.
conceptofredundancy

Populartechniquesare:
–SimpleParitycheckorVerticalRedundancyCheck(VRC)
–Two-dimensionalParitycheck(LRC)
–Checksum
–Cyclicredundancycheck(CRC)

SimpleParityCheckingorOne-dimensionParityCheck(VRC)
1.Themostcommonandleastexpensivemechanismforerror-detectionisthesimple
paritycheck.
2.Inthistechnique,aredundantbitcalledparitybit,isappendedtoeverydataunitso
thatthenumberof1sintheunit(includingtheparitybecomeseven).
3.BlocksofdatafromthesourcearesubjectedtoacheckbitorParitybitgeneratorform,
whereaparityof1isaddedtotheblockifitcontainsanoddnumberof1’s(ONbits)
and0isaddedifitcontainsanevennumberof1’s.
4.Atthereceivingendtheparitybitiscomputedfromthereceiveddatabitsand
comparedwiththereceivedparitybit,asshowninFig.1.38.
5.Thisschememakesthetotalnumberof1’seven,thatiswhyitiscalledevenparity
checking.
Figure1.38Even-paritycheckingscheme

Winter 2005
ECE
ECE 766
Computer Interfacing and Protocols
111
Example for Vertical Redundancy Check (VRC)
–Append a single bit at the end of data block such that the number of
ones is even
Even Parity (odd parity is similar)
0110011 01100110
0110001 01100011
–VRC is also known as Parity Check
–It can detect single bit error
–It can detect burst errors only if the total number of errors is odd.

Decimalvalue DataBlock Paritybit Codeword
0 0000 0 00000
1 0001 1 00011
2 0010 1 00101
3 0011 0 00110
4 0100 1 01001
5 0101 0 01010
6 0110 0 01100
7 0111 1 01111
8 1000 1 10001
9 1001 0 10010
10 1010 0 10100
11 1011 1 10111
12 1100 0 11000
13 1101 1 11011
14 1110 1 11101
15 1111 0 11110
Table 1.1 Possible 4-bit data words and corresponding code words

Two-dimensionParityCheck(LRC)
1.Performancecanbeimprovedbyusingtwo-dimensionalparitycheck,whichorganizestheblockofbits
intheformofatable.
2.Paritycheckbitsarecalculatedforeachrow,whichisequivalenttoasimpleparitycheckbit.
3.Paritycheckbitsarealsocalculatedforallcolumnsthenbotharesentalongwiththedata.
4.Atthereceivingendthesearecomparedwiththeparitybitscalculatedonthereceiveddata.
5.Organizedataintoatableandcreateaparityforeachcolumn.
Figure1.39Two-dimensionParityChecking

LRCincreasesthelikelihoodofdetecting
bursterrors.
Iftwobitsinonedataunitsaredamagedand
twobitsinexactlythesamepositionsin
anotherdataunitarealsodamaged,theLRC
checkerwillnotdetectanerror.

Checksum
1.Inchecksumerrordetectionscheme,thedataisdividedintoksegmentseachofmbits.
2.Inthesender’sendthesegmentsareaddedusing1’scomplementarithmetictogetthesum.
3.Thesumiscomplementedtogetthechecksum.Thechecksumsegmentissentalongwiththedata
segments(10110011,10101011,01011010,11010101)asshowninFig.1.40(a).
4.Atthereceiver’send,allreceivedsegmentsareaddedusing1’scomplementarithmetictogetthesum.
5.Thesumiscomplemented.Iftheresultiszero,thereceiveddataisaccepted;otherwisediscarded,as
showninFig.1.40(b).
Figure1.40(a)Sender’sendforthecalculationofthechecksum,(b)Receivingendforcheckingthechecksum

At the sender
The unit is divided into ksections, each of n
bits.
All sections are added together using one’s
complement to get the sum.
The sum is complemented and becomes the
checksum.
The checksum is sent with the data

At the receiver
The unit is divided into ksections, each of n
bits.
All sections are added together using one’s
complement to get the sum.
The sum is complemented.
If the result is zero, the data are accepted:
otherwise, they are rejected.

CyclicRedundancyChecks(CRC)
1.ThisCyclicRedundancyCheckisthemostpowerfulandeasytoimplement
technique.CRCisbasedonbinarydivision.
2.InCRC,asequenceofredundantbits,calledcyclicredundancycheckbits,
areappendedtotheendofdataunitsothattheresultingdataunitbecomes
exactlydivisiblebyasecond,predeterminedbinarynumber.
3.Atthedestination,theincomingdataunitisdividedbythesamenumber.Ifthere
isnoremainder,thedataunitisassumedtobecorrectandisthereforeaccepted.
4.Aremainderindicatesthatthedataunithasbeendamagedintransitand
thereforemustberejected.
Figure1.41BasicschemeforCyclicRedundancyChecking

1.Considerthecasewherek=1101asinfig.1.42.Hencewehavetodivide1101000(i.e.k
appendedby3zeros)by1011,whichproducestheremainderr=001,sothatthebitframe
(k+r)=1101001isactuallybeingtransmittedthroughthecommunicationchannel.
2.Atthereceivingend,ifthereceivednumber,i.e.1101001isdividedbythesamegenerator
polynomial1011togettheremainderas000,itcanbeassumedthatthedataisfreeof
errors.
Figure1.42CyclicRedundancyChecks(CRC)
1.Apolynomialisselectedtohaveatleastthefollowingproperties:
ItshouldnotbedivisiblebyX.
Itshouldnotbedivisibleby(X+1)
2.Thefirstconditionguaranteesthatallbursterrorsofalengthequaltothedegreeof
polynomialaredetected.
3.Thesecondconditionguaranteesthatallbursterrorsaffectinganoddnumberofbitsare
detected.

Division in CRC encoder

Division in the CRC decoder for two cases

Error Correcting Codes
1.ErrorCorrectioncanbehandledintwoways.
2.Oneiswhenanerrorisdiscovered;thereceivercanhavethesenderretransmittheentiredata
unit.Thisisknownasbackwarderrorcorrection.
3.Intheother,receivercanuseanerror-correctingcode,whichautomaticallycorrectscertain
errors.Thisisknownasforwarderrorcorrection.
Single-biterrorcorrection
1.Asingleadditionalbitcandetecterror,butit’snotsufficientenoughtocorrectthaterrortoo.
2.Forcorrectinganerroronehastoknowtheexactpositionoferror,i.e.exactlywhichbitisin
error.
3.Forexample,tocorrectasingle-biterrorinanASCIIcharacter,theerrorcorrectionmust
determinewhichoneofthesevenbitsisinerror.
4.Tothis,wehavetoaddsomeadditionalredundantbits.
5.Tocalculatethenumbersofredundantbits(r)requiredtocorrectddatabits,letusfindoutthe
relationshipbetweenthetwo.

1.Sowehave(d+r)asthetotalnumberofbits,whicharetobetransmitted;thenr
mustbeabletoindicateatleastd+r+1differentvalue.
2.Onevaluemeansnoerror,andremainingd+rvaluesindicateerrorlocationof
errorineachofd+rlocations.So,d+r+1statemustbedistinguishablebyrbits,
andrbitscanindicate2
r
states.Hence,2
r
mustbegreaterthand+r+1.i.e
2
r
>=d+r+1
1.Thevalueofrmustbedeterminedbyputtinginthevalueofdintherelation.
2.Forexample,ifdis7,thenthesmallestvalueofrthatsatisfiestheaboverelation
is4.Sothetotalbits,whicharetobetransmittedis11bits(d+r=7+4=11).
3.AtechniquedevelopedbyR.W.Hammingprovidesapracticalsolution.The
solutionorcodingschemehedevelopediscommonlyknownasHammingCode.
4.Hammingcodecanbeappliedtodataunitsofanylengthandusesthe
relationshipbetweenthedatabitsandredundantbits.

Number of Data Bits
(d)
Number of
Redundancy Bits
(r)
Total Bits
(d+r)
1
2
3
4
5
6
7
2
3
3
3
4
4
4
3
5
6
7
9
10
11

BasicapproachforerrordetectionbyusingHammingcodeisasfollows:
1.Toeachgroupofminformationbitskparitybitsareaddedtoform(m+k)bitcodeasshown
inFig.1.43
2.Locationofeachofthe(m+k)digitsisassignedadecimalvalue.
3.Thekparitybitsareplacedinpositions1,2…2
k-1
positions.–Kparitychecksareperformedon
selecteddigitsofeachcodeword.
4.Atthereceivingendtheparitybitsarerecalculated.Thedecimalvalueofthekparitybits
providesthebit-positioninerror,ifany
Figure 1.44 Use of Hamming code for error correction for a 4-bit data

1.Figure1.44showshowhammingcodeisusedforcorrectionfor4-bitnumbers
(d4d3d2d1)withthehelpofthreeredundantbits(r3r2r1).
2.Fortheexampledata1010,firstr1(0)iscalculatedconsideringtheparityofthe
bitpositions,1,3,5and7.
3.Thentheparitybitsr2iscalculatedconsideringbitpositions2,3,6and7.
4.Finally,theparitybitsr4iscalculatedconsideringbitpositions4,5,6and7as
shown.
5.Ifanycorruptionoccursinanyofthetransmittedcode1010010,thebitposition
inerrorcanbefoundoutbycalculatingr3r2r1atthereceivingend.
6.Forexample,ifthereceivedcodewordis1110010,therecalculatedvalueof
r3r2r1is110,whichindicatesthatbitpositioninerroris6,thedecimalvalueof
110.

Single-bit error correction
To correct an error, the receiver reverses the value
of the altered bit. To do so, it must know which
bit is in error.
Number of redundancy bits needed
•Let data bits = m
•Redundancy bits =r
Total message sent =m+r
The value of r must satisfy the following relation:
2
r
≥ m+r+1

Error Correction

Hamming Code

Hamming Code

Hamming Code

Example of Hamming Code

Single-bit error

Error
Detection

Link-level Flow Control
1.Flowcontrolensuresthatatransmittingstationdoesnotoverwhelmareceivingstation
withlesserprocessingcapability.
2.ErrorControlinvolvesbotherrordetectionanderrorcorrection.
3.Whenanerrorisdetected,thereceivercanhavethespecifiedframeretransmittedby
thesender.ThisprocessiscommonlyknownasAutomaticRepeatRequest(ARQ).
FlowControl
1.FlowControlisasetofproceduresthattellsthesenderhowmuchdataitcantransmit
beforeitmustwaitforanacknowledgmentfromthereceiver.
2.Theflowofdatashouldnotbeallowedtooverwhelmthereceiver.
3.Therearetwomethodsdevelopedforflowcontrol.Theyare
̶Stop-and-wait(Request/reply)
̶Sliding-window

1.Stop-and-wait
1.Thisisthesimplestformofflowcontrolwhereasendertransmitsadataframe.
2.Afterreceivingtheframe,thereceiverindicatesitswillingnesstoacceptanotherframebysendingback
anACKframeacknowledgingtheframejustreceived.
3.ThesendermustwaituntilitreceivestheACKframebeforesendingthenextdataframe.Thisis
sometimesreferredtoasping-pongbehavior(Piggybacking).
4.Request/replyissimpletounderstandandeasytoimplement,butnotveryefficient.
5.Figure1.45illustratestheoperationofthestop-and-waitprotocol.Theprotocolreliesontwo-way
transmissiontoallowthereceiverattheremotenodetoreturnframesacknowledgingthesuccessful
transmission.
6.Asmallprocessingdelaymaybeintroduced.
7.MajordrawbackofStop-and-WaitFlowControlisthatonlyoneframecanbeintransmissionatatime,
thisleadstoinefficiencyifpropagationdelayismuchlongerthanthetransmissiondelay.
Figure1.45Stop-andWaitprotocol

LinkUtilizationinStop-and-Wait
Letusassumethefollowing:
1. Transmissiontime:Thetimeittakesforastationtotransmitaframe(normalizedtoavalueof1).
2. Propagationdelay:Thetimeittakesforabittotravelfromsendertoreceiver(expressedasa).
3. a<1:Theframeissufficientlylongsuchthatthefirstbitsoftheframearriveatthedestinationbeforethesourcehas
completedtransmissionoftheframe.
4. a>1:Sendercompletestransmissionoftheentireframebeforetheleadingbitsoftheframearriveatthereceiver.
5. ThelinkutilizationU=1/(1+2a),a=Propagationtime/transmissiontime
6. Whenthepropagationtimeissmall,asincaseofLANenvironment,thelinkutilizationisgood.But,incaseoflong
propagationdelays,asincaseofsatellitecommunication,theutilizationcanbeverypoor.
7. Toimprovethelinkutilization,wecanusesliding-windowprotocolinsteadofusingstop-and-waitprotocol.
2.SlidingWindow
1.Slidingwindowisanabstractconceptthatdefinestherangeofsequencenumbersthatistheconcernofthesenderand
receiver.(Bothneedtodealwithpartofthepossiblesequencenumbers)
2.Instop-and-waitflowcontrol,onlyoneframeatatimecanbeintransit.
3.Efficiencycanbegreatlyimprovedbyallowingmultipleframestobeintransitatthesametime.
4.Tokeeptrackoftheframes,senderstationsendssequentiallynumberedframes.

1. The receiver acknowledges a frame by sending an ACK frame that includes the sequence number of the next frame
expected.
2. This also explicitly announces that it is prepared to receive the next N frames, beginning with the number specified. This
scheme can be used to acknowledge multiple frames.
3. It could receive frames 2, 3, 4 but withhold ACK until frame 4 has arrived. By returning an ACK with sequence number 5, it
acknowledges frames 2, 3, 4 in one go.
4. The receiver needs a buffer of size 1.Sliding window algorithm is a method of flow control for network data transfers.
5. TCP, the Internet's stream transfer protocol, uses a sliding window algorithm.
Figure 1.46 Buffer in sliding window
6. A sliding window algorithm places a buffer between the application program and the network data flow.
7. For TCP, the buffer is typically in the operating system kernel, but this is more of an implementation detail than a hard-
and-fast requirement.

SenderslidingWindow:Atanyinstant,thesenderispermittedtosendframeswithsequence
numbersinacertainrange(thesendingwindow)asshowninFig.1.47
Figure1.47Sender’swindow
1.Iftheheaderoftheframeallowskbits,thesequencenumbersrangefrom0to2
k
–1.
2.Sendermaintainsalistofsequencenumbersthatitisallowedtosend(senderwindow).
Thesizeofthesender’swindowisatmost2
k
–1.
3.Thesenderisprovidedwithabufferequaltothewindowsize.Receiveralsomaintainsa
windowofsize2
k
–1.

Figure 1.48 Receiver window
ReceiverslidingWindow:
1.Thereceiveralwaysmaintainswindowofsize1asshowninFig.1.48.Itlooksforaspecificframe(frame4
asshowninthefigure)toarriveinaspecificorder.
2.Ifitreceivesanyotherframe(outoforder),itisdiscardedanditneedstoberesent.However,thereceiver
windowalsoslidesbyoneasthespecificframeisreceivedandacceptedasshowninthefigure.
3.ThereceiveracknowledgesaframebysendinganACKframethatincludesthesequencenumberofthe
nextframeexpected.
4.ThisalsoexplicitlyannouncesthatitispreparedtoreceivethenextNframes,beginningwiththenumber
specified.Thisschemecanbeusedtoacknowledgemultipleframes.
5.Itcouldreceiveframes2,3,4butwithholdACKuntilframe4hasarrived.
6.ByreturninganACKwithsequencenumber5,itacknowledgesframes2,3,4atonetime.Thereceiver
needsabufferofsize1.

1.If the window size is larger than the packet size, then multiple packets can be outstanding
in the network, since the sender knows that buffer space is available on the receiver to
hold all of them.
2.Ideally, a steady-state condition can be reached where a series of packets (in the forward
direction) and window announcements (in the reverse direction) are constantly in transit.
3.As each new window announcement is received by the sender, more data packets are
transmitted.
Sliding Window Flow Control
1.Allows transmission of multiple frames
2.Assigns each frame a k-bit sequence number
3.Range of sequence number is [0…2
k
-1], i.e., frames are counted modulo 2k.
4.The link utilization in case of Sliding Window Protocol
U = 1, for N > 2a + 1
N/(1+2a), for N < 2a + 1
Where N = the window size, and a = Propagation time / transmission time

Error Control Techniques
1.Whenanerrorisdetectedinamessage,thereceiversendsarequesttothe
transmittertoretransmitthemessageorpacket.
2.ThemostpopularretransmissionschemeisknownasAutomatic-Repeat-Request
(ARQ).Suchschemes,wherereceiveraskstransmittertore-transmitifitdetects
anerror,areknownasreverseerrorcorrectiontechniques.
3.ThereexistthreepopularARQtechniques,asshowninFig.1.49.
Figure1.49Errorcontroltechniques

1.Stop-and-WaitARQ
1.InStop-and-WaitARQ,whichissimplestamongallprotocols,thesender(say
stationA)transmitsaframeandthenwaitstillitreceivespositive
acknowledgement(ACK)ornegativeacknowledgement(NACK)fromthe
receiver(saystationB).
2.StationBsendsanACKiftheframeisreceivedcorrectly,otherwiseitsends
NACK.
3.StationAsendsanewframeafterreceivingACK;otherwiseitretransmitsthe
oldframe,ifitreceivesaNACK.ThisisillustratedinFig1.50
Figure1.50Stop-And-WaitARQtechnique

1.Totackletheproblemofalostordamagedframe,thesenderisequipped
withatimer.
2.IncaseofalostACK,thesendertransmitstheoldframe.IntheFig.1.51,the
secondPDUofDataislostduringtransmission.
3.Thesenderisunawareofthisloss,butstartsatimeraftersendingeachPDU.
4.NormallyanACKPDUisreceivedbeforethetimerexpires.InthiscasenoACK
isreceived,andthetimercountsdowntozeroandtriggersretransmissionof
thesamePDUbythesender.
5.Thesenderalwaysstartsatimerfollowingtransmission,butinthesecond
transmissionreceivesanACKPDUbeforethetimerexpires,finallyindicating
thatthedatahasnowbeenreceivedbytheremotenode.
Figure1.51Retransmissionduetolostframe

Retransmission due to lost frame

1.Thereceivernowcanidentifythatithasreceivedaduplicateframefrom
thelabeloftheframeanditisdiscarded.
2.Totackletheproblemofdamagedframes,thereisaconceptofNACK
frames,i.e.NegativeAcknowledgeframes.
3.ReceivertransmitsaNACKframetothesenderifitfoundsthereceived
frametobecorrupted.
4.WhenaNACKisreceivedbyatransmitterbeforethetime-out,theold
frameissentagainasshowninFig.1.52.
Figure1.52Retransmissionduetodamagedframe

Retransmission due to damaged frame
The main advantage of stop-and-wait ARQ is
•simplicity
•minimum buffer size.

2.SlidingWindowARQ
2.1Go-back-NARQ
1.ThemostpopularARQprotocolisthego-back-NARQ,wherethesendersendstheframes
continuouslywithoutwaitingforacknowledgement.
2.Asthereceiverreceivestheframes,itkeepsonsendingACKsoraNACK,incaseaframeis
incorrectlyreceived.
3.WhenthesenderreceivesaNACK,itretransmitstheframeinerrorplusallthesucceeding
framesasshowninFig.1.53.Hence,thenameoftheprotocolisgo-back-NARQ.
4.Ifaframeislost,thereceiversendsNAKafterreceivingthenextframeasshownin
Fig.1.54.
5.IncasethereislongdelaybeforesendingtheNAK,thesenderwillresendthelostframe
afteritstimertimesout.
6.IftheACKframesentbythereceiverislost,thesenderresendstheframesafteritstimer
timesoutasshowninFig.1.55.
7.Assumingfull-duplextransmission,thereceivingendsendspiggybackedacknowledgement
byusingsomenumberintheACKfieldofitsdataframe.
8.Letusassumethata3-bitsequencenumberisusedandsupposethatastationsends
frame0andgetsbackanRR1,andthensendsframes1,2,3,4,5,6,7,0andgetsanother
RR1.
9.ThismighteithermeanthatRR1isacumulativeACKorall8framesweredamaged.This
ambiguitycanbeovercomeifthemaximumwindowsizeislimitedto7,i.e.forak-bit
sequencenumberfielditislimitedto2
k
-1.
10.ThenumberN(=2
k
-1)specifieshowmanyframescanbesentwithoutreceiving
acknowledgement.

Figure 1.53 Frames in error in go-Back-N ARQ

Figure 1.54 Lost Frames in Go-Back-N ARQ

Figure1.55LostACKinGo-Back-NARQ
1.IfnoacknowledgementisreceivedaftersendingNframes,thesendertakesthehelpofatimer.
2.Afterthetime-out,itresumesretransmission.Thego-back-Nprotocolalsotakescareofdamagedframes
anddamagedACKs.Thisschemeislittlemorecomplexthanthepreviousonebutgivesmuchhigher
throughput.
3.Assumingfull-duplextransmission,thereceivingendsendspiggybackedacknowledgementbyusingsome
numberintheACKfieldofitsdataframe.
4.Letusassumethata3-bitsequencenumberisusedandsupposethatastationsendsframe0andgets
backanRR1,andthensendsframes1,2,3,4,5,6,7,0andgetsanotherRR1.
5.ThismighteithermeanthatRR1isacumulativeACKorall8framesweredamaged.Thisambiguitycanbe
overcomeifthemaximumwindowsizeislimitedto7,i.e.forak-bitsequencenumberfielditislimitedto
2
k
-1.
6.ThenumberN(=2
k
-1)specifieshowmanyframescanbesentwithoutreceivingacknowledgement.
7.IfnoacknowledgementisreceivedaftersendingNframes,thesendertakesthehelpofatimer.

2.2Selective-RepeatARQ
1.Theselective-repetitiveARQschemeretransmitsonlythoseforwhich
NAKsarereceivedorforwhichtimerhasexpired,thisisshowninthe
Fig.1.56.
2.ThisisthemostefficientamongtheARQschemes,butthesendermust
bemorecomplexsothatitcansendout-of-orderframes.
Figure1.56Selective-repeatReject
3.Thereceiveralsomusthavestoragespacetostorethepost-NAKframes
andprocessingpowertoreinsertframesinpropersequence

Selective-repeat Reject

LINE CODING
(Digital to Digital Conversion)

Linecoding
•Convertingastringof1’sand0’s(digitaldata)intoa
sequenceofsignalsthatdenotethe1’sand0’s.
•Forexampleahighvoltagelevel(+V)couldrepresenta“1”
andalowvoltagelevel(0or-V)couldrepresenta“0”.
•Itconvertsdigitaldatatodigitalsignal,knownasline
coding,asshowninFig.1.58.
Figure.1.58Linecodingtoconvertdigitaldatatodigitalsignal

Line coding Characteristics
•Noofsignallevels:
–Thisreferstothenumbervaluesallowedinasignal,knownassignallevels,to
representdata.Fig.1.59(a)showstwosignallevels,whereasFig1.59(b)shows
threesignallevelstorepresentbinarydata.
–Adataelementisthesmallestentitythatcanrepresentapieceofinformation
(abit).Asignalelementistheshortestunitofadigitalsignal.
–Dataelementsarewhatweneedtosend;signalelementsarewhatwecan
send.Dataelementsarebeingcarried;signalelementsarethecarriers."
•BitrateversusBaudrate:
–Thebitraterepresentsthenumberofbitssentpersecond.
–Thebaudratedefinesthenumberofsignalelementspersecondinthesignal.
Figure .1.59 (a) Signal with two voltage levels, (b) Signal with three voltage levels

•SignalSpectrum:
–Differentencodingofdataleadstodifferentspectrumofthesignal.
–Itisnecessarytousesuitableencodingtechniquetomatchwiththemediumsothatthe
signalsuffersminimumattenuationanddistortionasitistransmittedthrougha
medium.
•Synchronization:
–Tointerpretthereceivedsignalcorrectly,thebitintervalofthereceivershouldbe
exactlysameorwithincertainlimitofthatofthetransmitter.
–Anymismatchbetweenthetwomayleadwronginterpretationofthereceivedsignal.
Usually,clockisgeneratedandsynchronizedfromthereceivedsignalwiththehelpofa
specialhardwareknownasPhaseLockLoop(PLL).
•DCcomponents:
–Afterlinecoding,thesignalmayhavezerofrequencycomponentinthespectrumofthe
signal,whichisknownasthedirect-current(DC)component.
–DCcomponentinasignalisnotdesirablebecausetheDCcomponentdoesnotpass
throughsomecomponentsofacommunicationsystemsuchasatransformer.
–Thisleadstodistortionofthesignalandmaycreateerrorattheoutput.TheDC
componentalsoresultsinunwantedenergylossontheline.
–Whenthevoltagelevelinadigitalsignalisconstantforawhile,thespectrumcreates
verylowfrequencies,calledDCcomponents,thatpresentproblemsforasystemthat
cannotpasslowfrequencies.

Effect of lack of Synchronization

LineCodingTechniques
•Linecodingtechniquescanbebroadlydividedintothreebroadcategories:Unipolar,PolarandBipolar,as
showninFig.1.60.
Figure.1.60Threebasiccategoriesoflinecodingtechniques
1.Unipolar:
•Inunipolarencodingtechnique,onlytwovoltagelevelsareused.Itusesonlyonepolarityofvoltagelevel
asshowninFig.1.61.
•Inthisencodingapproach,thebitratesameasdatarate.
•Unfortunately,DCcomponentpresentintheencodedsignalandthereislossofsynchronizationforlong
sequencesof0’sand1’s.Itissimplebutobsolete.
Figure.1.61Unipolarencodingwithtwovoltagelevels

2.Polar:
•Polarencodingtechniqueusestwovoltagelevels–onepositiveandtheotherone
negative.
Figure.1.62EncodingSchemesunderpolarcategory
2.1NonReturntozero(NRZ):
•Themostcommonandeasiestwaytotransmitdigitalsignalsistousetwo
differentvoltagelevelsforthetwobinarydigits.
•Usuallyanegativevoltageisusedtorepresentonebinaryvalueandapositive
voltagetorepresenttheother.
•Thedataisencodedasthepresenceorabsenceofasignaltransitionatthe
beginningofthebittime.
•Asshowninthefigurebelow,inNRZencoding,thesignallevelremainssame
throughoutthebit-period.TherearetwoencodingschemesinNRZ:NRZ-Land
NRZ-I,asshowninFig.1.63.

Figure1.63NRZencodingscheme
InNRZ-Lthelevelofthevoltagedeterminesthevalueofthebit.InNRZ-Itheinversion
orthelackofinversiondeterminesthevalueofthebit.

2.2 Return to Zero RZ:
•To ensure synchronization, there must be a signal transition in each bit as shown in
Fig. 1.64.
Key characteristics of the RZ coding are:
•Three levels
•Bit rate is double than that of data rate
•No dc component
•Good synchronization
•Main limitation is the increase in bandwidth
Figure.1.64RZencodingtechnique

2.3Biphase:
•ToovercomethelimitationsofNRZencoding,biphaseencodingtechniquescanbeadopted.
ManchesteranddifferentialManchesterCodingarethetwocommonBiphasetechniquesin
use,asshowninFig.1.65.
•InthestandardManchestercodingthereisatransitionatthemiddleofeachbitperiod.A
binary1correspondstoalow-to-hightransitionandabinary0toahigh-to-lowtransition
inthemiddle.
•InDifferentialManchester,inversioninthemiddleofeachbitisusedforsynchronization.
•Theencodingofa0isrepresentedbythepresenceofatransitionbothatthebeginningand
atthemiddleand1isrepresentedbyatransitiononlyinthemiddleofthebitperiod.
Figure.1.65Manchesterencodingschemes

In Manchester and differential Manchester encoding, the transition
at the middle of the bit is used for synchronization.

3.BipolarEncoding:
•BipolarAMIusesthreevoltagelevels.
•UnlikeRZ,thezerolevelisusedtorepresenta
0andabinary1’sarerepresentedby
alternatingpositiveandnegativevoltage,as
showninfig.1.66.
Figure.1.66BipolarAMIsignal

Bipolar with 8-zero substitution (B8ZS):
•The limitation of bipolar AMI is overcome in B8ZS, which is used in North America.
A sequence of eight zero’s is preplaced by the following encoding:
•A sequence of eight 0’s is replaced by 000+-0+-, if the previous pulse was positive.
•A sequence of eight 0’s is replaced by 000-+0+-, if the previous pulse was negative.
High Density Bipolar-3 Zeros: Another alternative, which is used in Europe and Japan
is HDB3.It replaces a sequence of 4 zeros by a code as per the rule given in the
following table. The encoded signals are shown in Fig.1.67.
Figure.1.67B8ZS and HDB3 encoding techniques

Comparision between 1G,2G,3G and 4G
Generation
(1G,2G,3G,
4G,5G)
Definition Throughput/
Speed
Technology Time period Features
1G Analog 14.4 Kbps (peak)AMPS,NMT,TACS 1970 –1980 During 1G Wireless phones
are used forvoice only.
2G Digital Narrow
band circuit
data
9.6/14.4 Kbps TDMA,CDMA 1990 to 2000 2G capabilities are achieved
by allowingmultipleusers on
a single channel via
multiplexing.During2G
Cellular phones are used
fordata also along with
voice.
2.5G Packet Data171.2 Kbps(peak)
20-40 Kbps
GPRS 2001-2004 In 2.5G theinternetbecomes
popular and data becomes
more
relevant.2.5GMultimedia
servicesand streaming starts
to show growth.Phonesstart
supportingweb
browsingthoughlimited and
very few phones have that.

3G Digital
Broadband
Packet Data
3.1 Mbps (peak)
500-700 Kbps
CDMA 2000
(1xRTT, EVDO)
UMTS, EDGE
2004-2005 3G hasMultimedia
services supportalongwith
streaming are more
popular.In3G,Universal
accessandportabilityacros
s different device types are
made possible. (Telephones,
PDA’s, etc.)
3.5G Packet Data 14.4 Mbps (peak)
1-3 Mbps
HSPA 2006 –2010 3.5G supportshigher
throughput and speedsto
support higher data needs of
the consumers.
4G Digital
Broadband
Packet
All IP
Very high
throughput
100-300 Mbps
(peak)
3-5 Mbps
100 Mbps (Wi-Fi)
WiMax
LTE
Wi-Fi
Now (Read more
onTransitioningto 4G)
Speedsfor 4G are further
increased to keep up with
data access demand used
by various services.High
definition streamingis now
supported in 4G. New
phones with HD capabilities
surface. It gets pretty cool.In
4G,Portabilityis increased
further.World-wide
roamingis not a distant
dream.
5G Not Yet Probably gigabitsNot Yet Soon (probably 2020)
Update:Samsung
conducts tests on 5G
Currently there is no 5G
technology deployed.
When this becomes
available it will provide very
high speeds to the
consumers. It would also
provide efficient use of
available bandwidth as has
been seen through
development of each new
technology.
Tags