You are on page 1of 2

Networks Lab

Assignment 4

Note:
1.
2.
3.
4.
5.

YoushouldhaveNS3installedforthisassignment.
Referto
www.nsnam.org
foralltheinformationaboutNS3.
Alsoinstalltcpdumponyourmachines.
Referto
www.tcpdump.org/
fortcpdump.
Assumingyourinstallationdirectoryisnsallinone*.Wecallitthehomedirectoryof
NS3.
6. MakesuitableassumptionsunlessspecifiedinthequestionordiscusswithTAs.
7. Donotcopythesolutionsfromothers.Casesofplagiarismwillbetreatedseriously.
8. PathforCSMAprotocolsourcecode:
nsallinone3.21/ns3.21/src/csma

CarrierSenseMultipleAccess(CSMA):
CSMAisamediaaccesscontrolprotocolusedonsharednetworktopologieslikeEthernetto
controlaccesstothenetwork.Whenastationattachedtothenetworkwantstotransmitdata,
itfirstlistenstothechanneltoseeifanyoneelseistransmittingatthatmoment.Ifthechannel
isbusy,thestationwaitsforabackofftimeandchecksagain.Ifthechannelisidle,it
transmitsthedata.Ifacollisionoccurswhiletransmitting,thestationwaitsforabackofftime
andattemptstotransmitagain.
Whenthestationtransmitsthedataunconditionallygiventhatthechannelisidle,iscalled
1persistent.
Whenthestationtransmitsthedatawithaprobabilitypgiventhatthechannelisidle,iscalled
ppersistent.
Inthetheorycourse,youhavelearnedaboutCSMA/CDwhereCSMAiscoupledwithcollision
detection(CD)mechanism.However,sincetodaysEthernetspeedisveryhigh,the
probabilityofframecollisiongiventhechannelisidleisalmosttendingto0.So,NS3doesnt
considercollisiondetectionforwirednetworks.
ProblemStatement:
Considerthesamenetworktopology,communicationarchitectureandbandwidthasgivenin
Assignment3
.Ns3sourcecodehasanimplementationof1persistentCSMAwith
exponentialbackoff.Theexponentialbackoffalgorithmincreasesthebackoffvalueinthe
powerof2.Forexample,afterthefirstbusysensing,thenodewaitsfor2unitsoftimebefore
goingforthenextsensingattempt.Afterthesecondbusysensing,itwaitsfor4unitsoftime,

afterthethirditwaitsfor8unitsoftimeandsoon,untilitsensesthechanneltobeidle.You
havetomodifytheNS3sourcecodewithfollowingspecialfeatures.
1) ImplementCSMAwithadditivebackoffbymakingchangestothesourcecode.
Theadditivebackoffincreasesthewaiting/backofftimeinmultitudeof2.That
meansafter(1,2,3,4...)attemptsofbusysensing,thewaiting/backofftimewillbe
(2,4,6,8,...)unittime,i.e.2xNattheNthchannelsensingattempt.Measurethe
performanceparameterssimilartoAssignment3:throughput,forwardingdelayand
jitter(variationinforwardingdelay)forboththeprotocolsexponentialbackoffand
additivebackoff.Plotthecomparisongraphsfortheseperformanceparameters
withdifferenttrafficgenerationrateasgiveninAssignment3.

2) ImplementppersistentCSMAwithexponentialbackoffandadditivebackoffby
makingchangestothesourcecode.Plotthecomparisongraphsforthroughput,
forwardingdelayandjitter(variationinforwardingdelay)forp=0.1,0.5,0.9with
differenttrafficgenerationrateasgiveninAssignment3.

Stateyourobservationsontheimpactofdifferentdataratesforexponential/additive
backoffalongwithppersistentCSMA.

NOTEforSubmission:
1.Youneedtodothisexperimentinagroupoftwo(samegroupaspreviouslab).
2.Aftertheexperiment,prepareareportwiththeresultsandanalysis.
3.Submitthe.ccfilealongwithscript,parametervalues,plotsandyouranalysisofthe
results.
4.Createagzipedtarballfile(tar.gz)containingthedataanalysisfilesandplotsandthe
report.Thenameofthecompressedfileshopuldbe
assign_3_<roll_number_member_1>_<roll_number_member_2>.tar.gz.For
example,ifthemembersofagroupare12CS10001and12CS10002,thenthefilename
shouldbeassign_3_12CS10001_12CS10002.tar.gz.
5.OneofthememberofthegroupshoulduploadtheassignmenttotheMoodlecourseweb
pagebythesubmissiondeadline.
6.Submissiondeadline:9Feb,2015,11:59pm.

You might also like