Beruflich Dokumente
Kultur Dokumente
Skiptocontent
roman10
AJourneytoSoftwareCraftsmanship
HowtoAddaNewAQMProtocolinNS2
NS2isapopularnetworksimulatorusedinbothindustryandresearch.Sometimeswedesignedanew
protocolandwanttoseehowitperforms.Thisarticlegivesabriefintroofhowtodothis.
Specifically,IillustratethestepsbyaddinganewActiveQueuingMechanism(AQM)protocolto
ns2.
0.Downloadns2,CompileitandInstallit.
Thisisapreparationstep.Itsnotthefocusofthispost,pleaserefertoreference1fordetails.Note
thatsinceweregoingtomodifyNS2byaddingourownprotocoltoit,wellneedtodownloadand
sourcecodeandbuilditourselves.
1.AddC++SourceFilesandUpdateMakefile
ForAQMprotocols,theirsourcefilesareplacedunderthefoldernsallinone2.35/ns2.35/queue/.
SupposeournewprotocolisnamedMOD,anditsimplementedinmod.ccandmod.hsourcefiles.
Simplycopymod.ccandmod.hfilestons2.35/queue/folder.
Nextwellneedtomodifythemakefilesothatmod.ccandmod.hcanbecompiled.Opennsallinone
2.35/ns2.35/Makefile.Lookforqueue/red.oandaddqueue/mod.o.Sothelinewillbecome,
adc/simpleintservsched.oqueue/red.oqueue/mod.o
Savethechanges,andtypemakeatnsallinline2.35/ns2.35/directory.Thenewlyaddedprotocol
willbebuilt.
2.AddMODforTCLScripting
NS2usesTCLforsimulationconfiguration.SofarweonlybuildstheprotocolinC++,thererestill
someworkneedstobedoneinorderforthenewlyaddedprotocoltobeusedinTCL.
2.1ChangesFilesunderns2.35/tcl/lib/
TherereafewfilesneedstochangeinorderforMODforwork.Idontwantthisposttobelengthy,
soitsnotshownindetail,youcandownloadthefileattheendofthepost,andsearchforMODto
seetheplacesthathavebeenchanged.
Thelistoffilesneedtochangeincludingnsqueue.tcl,nsdefault.tcl,nsroute.tcl,nscompat.tcl,and
nslib.tcl.
2.2CompileAgain
Gotodirectoryns2.35incommandline,andtypesudomaketobuildns2.
3.Download
Youcandownloadthefilesmentionedintheposthere.Atestfilec.tclisalsoincludedforyour
reference.
http://www.roman10.net/2011/11/10/howtoaddanewaqmprotocolinns2/ 1/7
4/25/2017 How to Add a New AQM Protocol in NS2 roman10
References:
1.HowtoInstallNS2.34inUbuntu:http://www.scribd.com/doc/46784839/InstallNS234in
Ubuntu1010
2.RefinedDesignofRandomEarlyDetectionGateways:http://www.google.com.sg/search?
sourceid=chrome&ie=UTF8&q=Refined+Design+of+Random+Early+Detection+Gateways.
Authorroman10PostedonNovember10,2011CategoriesMachinery,ns2
8thoughtsonHowtoAddaNewAQMProtocolinNS2
1. manaspratimsarmasays:
December2,2011at3:41pm
iwanttoaddanewqueueinns2.iwanttoaddmyownqueueinns2.istudiedthec++codefor
droptail,buticannotunderstandthecode.CANUHELPMEORCANUPROVIDEME
SOMEMATERIALHOWTOWRITEC++INNS2AND
HOWTORECOMPILEIT.
pleasereply
THANKSINADVANCE
REGARDS
MANASPRATIMSARMA
CDACBANGALORE
STUDENT
Reply
2. marjan.msays:
March29,2012at8:35am
thanks
Reply
3. marjan.msays:
March29,2012at8:45am
thisarticleisverygood.butIneedthewayofwritingblue,FREADandtheotherAQM
protocolsandthewayofimprovingtcpperfomanceusingAQM.
pleasereply
Reply
1. rajusays:
April26,2013at8:25am
whichyoumentionediamnotseeing.
http://www.roman10.net/2011/11/10/howtoaddanewaqmprotocolinns2/ 2/7
4/25/2017 How to Add a New AQM Protocol in NS2 roman10
canyousendonceagain?
Reply
4. saedsays:
March7,2013at8:15am
hi
thatisverygod
butiamtryingtochangeAODVandcreatenewonesoshouldichangeonly(nsqueue.tcl,ns
default.tcl,nsroute.tcl,nscompat.tcl,andnslib.tcl)filesthatyoupointinthisarticle?
Reply
5. saedsays:
May16,2013at10:35am
iapplychangesbutwhentrytousenewprotocolintclfilesnspromptthattheagentyouwant
touseisinvalid
cananybodyhelpplease?
Reply
6. siddharthsays:
April19,2014at1:56pm
whenevericomplilethec.tclitisshowingthefollowingerror:
invalidcommandnameQueue/MOD
whileexecuting
Queue/MODsetthresh_15
invokedfromwithin
if{$Scenario==1}{
Queue/MODsetthresh_15
Queue/MODsetmaxthresh_45
}elseif{$Scenario==2}{
Queue/MODsetthresh_20
Queue/MODset
(filec.tclline61)
Pleasehelp..
BTWverynicearticle..
Reply
7. tuxsays:
January31,2017at5:46pm
helloguys
doesanyonehasthecode?
Reply
http://www.roman10.net/2011/11/10/howtoaddanewaqmprotocolinns2/ 3/7
4/25/2017 How to Add a New AQM Protocol in NS2 roman10
LeaveaReply
Youremailaddresswillnotbepublished.Requiredfieldsaremarked*
Comment
Name*
Email*
Website
PostComment
Postnavigation
PreviousPreviouspost:HowtoShareFilesbetweenWindows7HostandUbuntuGuestin
VirtualBox
NextNextpost:DropTailandREDTwoAQMMechanisms
Searchfor: Search Search
Categories
AndroidApps(19)
AndroidAudioEditor(1)
OneClickMovieMaker(1)
TS2(3)
VideoConverterAndroid(8)
Video2Gif(1)
AndroidisnotJava(2)
AndroidTutorial(36)
AndroidDevTools(1)
APIillustrated(9)
MultimediaAPI(3)
ffmpegonAndroid(5)
NDK(7)
UI(11)
Animation(2)
Drawable(2)
CodeSnippet(2)
CodingBeyondTechnique(19)
aword,aworld(4)
BugRectified(5)
ProgrammingHabit(1)
SoftwareasaCareer(1)
http://www.roman10.net/2011/11/10/howtoaddanewaqmprotocolinns2/ 4/7
4/25/2017 How to Add a New AQM Protocol in NS2 roman10
SoftwareasUserExperience(1)
CompilersandRelated(2)
ELF(2)
ComputerLanguages(33)
C/C++(13)
Java(11)
JavaScript(2)
PHP(1)
Python(8)
DataStructure&Algorithms(34)
Bits(1)
DataStructure(5)
Integers(10)
BigInteger(1)
Prime(4)
MachineLearning(5)
svm(1)
Search(3)
Sorting(5)
Strings(5)
Database(1)
SQLite(1)
DigitalSignalProcessing(33)
DigitalAudioProcessing(4)
DigitalImageProcessing(6)
DigitalVideoProcessing(6)
Image/VideoCompression/Decompression(8)
MultimediaBasics(6)
VideoStreaming(7)
DistributedSystems(17)
ApacheCassandra(6)
ApacheHadoop(8)
ApacheAvro(3)
ApacheNutch(3)
ApacheSolr(1)
LinuxStudyNotes(40)
crontab(1)
LinuxKernelProgramming(8)
LinuxProgramming(12)
IPC(2)
LinuxNetworkProgramming(5)
LinuxSignals(2)
LinuxShellScripting(1)
ssh(3)
Machinery(30)
ffmpeg(4)
git(2)
gnuplot(2)
grep(1)
JMeter(2)
Matlab(3)
maven(1)
Nagios(1)
netfilter(7)
http://www.roman10.net/2011/11/10/howtoaddanewaqmprotocolinns2/ 5/7
4/25/2017 How to Add a New AQM Protocol in NS2 roman10
libnetfilter_queue(3)
ns2(2)
OpenCV(1)
misc(1)
MyIdeas(1)
MyProject(3)
MobileCaching(1)
SelectiveDecoding(2)
MyPublication(1)
MyReadings(1)
Networking(15)
HTTP(1)
TCP(6)
telnet(1)
ProgramforPerformance(8)
ProgramforEnergySaving(2)
ProgramforSpeed(5)
VirtualMachine(2)
WebDev(8)
webcomponents(3)
RecentPosts
GradientDrawableonAndroid
ChoosetheRightClockonAndroid
ArrayMapanditsfriendsinAndroid
SparseArrayanditsfriendsinAndroid
AndroidLayerDrawableandDrawable.Callback
RecentComments
G.GonSimpleTCPSocketClientandServerCommunicationinCUnderLinux
stefanonHowtoWriteaLinuxFirewallinLessthan1000LinesofCodePart1Overview
DhavalKhantonHowtoBuildffmpegwithNDKr9
safikaonVideoBoundaryDetectionPart3FadeInandFadeOut
thazonVideoBoundaryDetectionPart1AbruptTransitionandItsMatlabImplementation
Archives
March2017(1)
February2017(1)
January2017(2)
January2015(1)
November2014(3)
June2014(1)
May2014(2)
October2013(1)
August2013(4)
May2013(2)
April2013(1)
March2013(4)
December2012(2)
http://www.roman10.net/2011/11/10/howtoaddanewaqmprotocolinns2/ 6/7
4/25/2017 How to Add a New AQM Protocol in NS2 roman10
November2012(6)
October2012(6)
September2012(3)
August2012(13)
July2012(15)
June2012(3)
May2012(8)
April2012(4)
March2012(13)
February2012(19)
January2012(9)
December2011(11)
November2011(12)
October2011(4)
September2011(12)
August2011(16)
July2011(15)
June2011(6)
May2011(10)
April2011(13)
March2011(20)
February2011(4)
November2010(2)
May2010(1)
April2010(1)
February2010(1)
Meta
Login
EntriesRSS
CommentsRSS
WordPress.org
roman10ProudlypoweredbyWordPress
http://www.roman10.net/2011/11/10/howtoaddanewaqmprotocolinns2/ 7/7