0% found this document useful (0 votes)
133 views2 pages

Assignment 4

This document provides instructions for Networks Lab Assignment 4. Students are asked to modify the NS-3 source code to implement carrier sense multiple access (CSMA) with additive backoff and p-persistent CSMA with exponential and additive backoff. Students should measure throughput, forwarding delay, and jitter for different protocols and traffic rates, and submit a report with their analysis and results. The report should include modified source code, plots, and be submitted as a compressed file by the deadline.

Uploaded by

006honey006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
133 views2 pages

Assignment 4

This document provides instructions for Networks Lab Assignment 4. Students are asked to modify the NS-3 source code to implement carrier sense multiple access (CSMA) with additive backoff and p-persistent CSMA with exponential and additive backoff. Students should measure throughput, forwarding delay, and jitter for different protocols and traffic rates, and submit a report with their analysis and results. The report should include modified source code, plots, and be submitted as a compressed file by the deadline.

Uploaded by

006honey006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 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