基于NS2下的DSR路由协议的研究与优化基于NS2下的DSR路由协议的研究与优化李志斌陶然摘要:AdHoc网络是当前无线通信领域一种新的、发展迅速的通信技术,由于它不依赖固定的基础通信设施,没有中心控制节点,抗毁性强,因此适用于许多网络布线存在困难的环境。基于这些特殊优势,Adhoc网络在军事领域中发挥着重要作用,在民用领域也有着很好的应用前景。DSR协议是专为Adhoc网络设计的一种按需路由控制协议,它以简单有效、网络开销小、算法复杂度不高、支持单向链路等优点而受到广泛的关注,被认为是最有实用前景的Adhoc网络路由协议之一。NS2(NetworkSimulatorVersion2),是UCBerkeley开发的一个离散事件驱动的事件模拟器。它能模拟AdHoc网络路由协议运行的全过程,并把仿真结果输出到一个trace文件中。通过对trace文件的分析,可以了解到AdHoc网络路由协议运行的状况,从而分析评价路由协议的性能好坏。本文首先介绍AdHoc网络的基本概念、关键技术和路由协议。其次,对DSR协议的概念、特点及工作原理给予详细的介绍和分析。然后在NS2网络仿真模拟平台下建立无线网络模型,以AODV作对比,对DSR和AODV协议仿真模拟,分析评价DSR路由协议性能。仿真结果表明,同AODV对比,DSR在快速变化的网络拓扑结构中更具优势。最后文章对DSR协议的优化改进作总结。关键词:Adhoc,DSR协议,优化,网络仿真,NS2基于NS2下的DSR路由协议的研究与优化TheresearchandoptimizationofDSRrouteprotocolbasedonNS2LIZhi-bin,TAORanAbstract:AdHocnetworkisanewtechniqueinwirelesscommunicationfieldwhichdevelopsrapidlyinrecentyears.Asitdoesnotdependonfixednetworkinfrastructure,andhasnocentralcontrollingnodeaswellasgoodinresistingdestructions,itisapplicabletomanysituationsthathavedifficultiesinwiringnetworks.Basedonthesespecialadvantages,Adhocplaysanimportantpartinmilitaryapplications,anditalsohasagoodprospectincivilapplications.DSRprotocolisanon-demandroutingprotocolthatisspecificallydesignedforAdhoc.Itattractswidelyattentionbecauseofitsadvantagessuchasitssimplicity,lownetworkoverhead,lowalgorithmcomplexity,supportingunidirectionalroutesandsoon.SoDSRprotocolwillprobablyplayanimportantroleinfutureAdhocapplication.NS2(NetworkSimulatorVersion2),developedbyUCBerkeley,isasimulatordrivenbydiscreteevents.ItcansimulatearoutingprotocoloperationprocessofAdHocnetwork,andexportsimulationresultstoatracefile.Fromthetracefile,wecanknowtheoperationprocessofroutingprotocol,thenanalyzeandevaluatetheperformanceofroutingprotocol.Thispaper,firstofall,introducesthebasicconcept,keytechnologiesandroutingprotocolsofAdHocNetwork.Secondly,fortheconcept,featureand基于NS2下的DSR路由协议的研究与优化workingprincipleofDSR,thepapergivesadetailedintroductionandanalysis.Then,toevaluatetheperformanceofDSRandAODV,weestablishedasimulationplatformofwirelessnetworkmodelbasedontheNS2。ThesimulatorresultsshowthatcomparedwithAODV,DSRperformsbetterinthenetworkwithdynamictopology.Atlast,thepaperanalyzestheimprovementandmakesasummaryofDSR.Keywords:AdHoc,DSRprotocol,Optimization,Networksimulation,NS2基于NS2下的DSR路由协议的研究与优化目录第一章绪论·························································································11.1Adhoc网络·················································································11.1.1Adhoc网络的产生与发展·····························································11.1.2Adhoc网络的特点······································································21.1.3Adhoc网络的应用领域································································31.2AdHoc研究的问题和技术挑战························································41.2.1进行相关研究的主要大学和组织····················································41.2.2研究问题和技术挑战···································································51.3Adhoc网络路由协议·····································································71.3.1表驱动路由协议·········································································81.3.2按需驱动路由协议····································································101.4论文研究的内容和任务···································································121.4.1研究内容················································································121.4.1主要任务················································································121.5本章小结·····················································································13第二章DSR协议················································································162.1DSR协议概述···············································································162.2DSR协议分组格式········································································162.3DSR协议的运行机制·····································································172.3.1DSR协议的路由发现机制··························································17基于NS2下的DSR路由协议的研究与优化2.3.1DSR协议的路由维护机制··························································202.4DSR协议的优缺点分析··································································212.5DSR协议的优化途径·····································································232.5.1缓存cache管理优化································································232.5.2路由建立过程中捎带数据分组的优化············································232.5.3路由请求分组的跳数限制···························································242.5.4路径自动缩短··········································································242.5.5随机延迟················································································252.5.6无确认路由修复·······································································252.5.7混合侦听················································································252.5.8抢修······················································································252.6本章小结··················································································