[实用参考]基于NS2下的DSR路由协议的研究与优化

合集下载

基于NS2下的DSR路由协议的研究与优化

基于NS2下的DSR路由协议的研究与优化

基于NS2下的DSR路由协议的研究和优化基于NS2下的DSR路由协议的研究和优化李志斌陶然摘要:Ad Hoc网络是当前无线通信领域一种新的、发展迅速的通信技术,由于它不依赖固定的基础通信设施,没有中心控制节点,抗毁性强,因此适用于许多网络布线存在困难的环境。

基于这些特殊优势,Ad hoc网络在军事领域中发挥着重要作用,在民用领域也有着很好的使用前景。

DSR 协议是专为Ad hoc 网络设计的一种按需路由控制协议,它以简单有效、网络开销小、算法复杂度不高、支持单向链路等优点而受到广泛的关注,被认为是最有实用前景的Ad hoc 网络路由协议之一。

NS2( Network Simulator Version 2),是UC Berkeley开发的一个离散事件驱动的事件模拟器。

它能模拟Ad Hoc网络路由协议运行的全过程,并把仿真结果输出到一个trace文件中。

通过对trace文件的分析,可以了解到Ad Hoc网络路由协议运行的状况,从而分析评价路由协议的性能好坏。

本文首先介绍Ad Hoc网络的基本概念、关键技术和路由协议。

其次,对DSR协议的概念、特点及工作原理给予详细的介绍和分析。

然后在NS2网络仿真模拟平台下建立无线网络模型,以AODV作对比,对DSR和AODV协议仿真模拟,分析评价DSR路由协议性能。

仿真结果表明,同AODV对比,DSR在快速变化的网络拓扑结构中更具优势。

最后文章对DSR协议的优化改进作总结。

关键词:Ad hoc,DSR 协议,优化,网络仿真,NS2基于NS2下的DSR路由协议的研究和优化The research and optimization of DSR route protocol based on NS2LI Zhi-bin ,TAO RanAbstract:Ad Hoc network is a new technique in wireless communication field which develops rapidly in recent years. As it does not depend on fixed network infrastructure, and has no central controlling node as well as good in resisting destructions, it is applicable to many situations that have difficulties in wiring networks. Based on these special advantages, Ad hoc plays an important part in military applications, and it also has a good prospect in civil applications. DSR protocol is an on-demand routing protocol that is specifically designed for Ad hoc. It attracts widely attention because of its advantages such as its simplicity, low network overhead, low algorithm complexity, supporting unidirectional routes andso on. So DSR protocol will probably play an important role in future Ad hoc application.NS2 (Network Simulator Version 2), developed by UC Berkeley, is a simulator driven by discrete events. It can simulate a routing protocol operation process of Ad Hoc network, and export simulation results to a trace file. From the trace file, we can know the operation process of routing protocol, then analyze and evaluate the performance of routing protocol.This paper, first of all, introduces the basic concept, key technologies and routing protocols of Ad Hoc Network. Secondly, for the concept, feature and working principle of DSR,the paper gives a detailed introduction and analysis. Then,to evaluate the performance of DSR and AODV, we established a simulation platform of wireless network model based on the NS2。

NS2学习笔记(15)——无线网络传输问题探讨及效果分析

NS2学习笔记(15)——无线网络传输问题探讨及效果分析

NS2学习笔记(15)——无线网络传输问题探讨及效果分析1、Destination(1)了解什么是隐藏节点和暴露节点问题(2)了解RTS/CTS是如何降低隐藏节点问题发生的概率,以提升系统效果(3)了解NS2中无线传输模型和门限的概念(4)了解如何在NS2中建立无线自组织网络(Wireless Ad Hoc Networks)(5)学习分析无线自组织网络路由协议(Ad Hoc Routing Protocol)的效果(6)了解802.11b DCF和802.11e EDCF机制运作(7)探讨802.11b DCF和802.11e EDCF机制对多媒体数据流所提供的传输服务质量(8)了解802.11b所提供的吞吐量上限值(9)了解哪些因素会影响802.11b的吞吐量(10)了解什么是效果异常(Performance Anomaly)现象(11)了解现有改善效果异常的方法及如何提升系统效果2、Background(1)隐藏节点(隐终端)隐藏终端是指在接收接点的覆盖范围内而在发送节点的覆盖范围外的节点。

隐藏终端由于听不到发送节点的发送而可能向相同的接收节点发送分组,导致分组在接收节点处冲突。

冲突后发送节点要重传冲突的分组,这降低了信道的利用率。

隐藏终端又可以分为隐发送终端和隐接收终端两种。

在单信道条件下,隐发送终端可以通过在发送数据报文前的控制报文握手来解决。

但是隐接收终端问题在单信道条件下无法解决。

当A要向B发送数据时,先发送一个控制报文RTS;B接收到RTS 后,以CTS控制报文回应;A收到CTS后才开始向B发送报文,如果A没有收到CTS,A认为发生了冲突,重发RTS,这样隐发送终端C能够听到B发送的CTS,知道A要向B发送报文,C延迟发送,解决了隐发送终端问题。

对于隐接收终端,当C听到B发送的CTS控制报文而延迟发送时,若D向C发送RTS控制报文请求发送数据,因C不能发送任何信息,所以D无法判断时RTS 控制报文发生冲突,还是C没有开机,还是C 时隐终端,D只能认为RTS报文冲突,就重新向C发送RTS。

基于链路均衡算法的DSR路由协议研究的开题报告

基于链路均衡算法的DSR路由协议研究的开题报告

基于链路均衡算法的DSR路由协议研究的开题报告一、选题背景和意义在无线传感器网络中,路由协议是对网络进行管理和控制的重要手段。

因此,无线传感器网络的路由协议研究是当前无线通信领域的热点之一。

其中,基于链路均衡算法的DSR(Dynamic Source Routing)路由协议是一种常用的路由协议。

DSR路由协议可根据路由器的位置和网络的拓扑结构动态地寻找到数据传输的最佳路径。

该协议采用的广播路由,可以有效地减少了数据传输时的拥塞问题,也可以减少数据传输的延迟和丢包现象。

而链路均衡算法则可以进一步优化DSR路由协议,均衡网络负载,提高传输性能。

因此,基于链路均衡算法的DSR路由协议研究具有非常重要的理论和实践意义。

本文将对该研究进行深入探讨,以期为无线传感器网络的优化和发展做出贡献。

二、研究目标和内容本文主要研究基于链路均衡算法的DSR路由协议的优化和应用。

主要研究内容如下:1. 分析DSR路由协议的基本思想和算法流程,探讨其在无线传感器网络中的应用;2. 研究链路均衡算法在DSR路由协议中的应用,分析其原理和优化效果;3. 基于链路均衡算法的DSR路由协议的仿真实验与性能评估,探究其优化效果;4. 探讨基于链路均衡算法的DSR路由协议的改进策略,为该协议的发展提出建议。

三、研究方法和技术路线本文主要采用文献调研、仿真实验和数据分析等方法,对基于链路均衡算法的DSR路由协议进行深入研究。

其中,主要技术路线如下:1. 对DSR路由协议的基本思想和算法流程进行阅读和归纳总结,分析其在无线传感器网络中的应用;2. 研究链路均衡算法,分析其原理和基本思想,阅读相关文献和论文,分析该算法在DSR路由协议中的应用及其优化效果;3. 设计基于链路均衡算法的DSR路由协议的仿真实验环境,并进行性能评估和数据分析;4. 根据仿真实验结果和数据分析结论,对基于链路均衡算法的DSR 路由协议进行改进,提出相应的策略和建议。

基于NS2的无线自组网路由协议的研究与仿真

基于NS2的无线自组网路由协议的研究与仿真
信系统相结合
仿真工具NS2
NS2(Network Simulator version 2)是面向 对象的、 离散事件驱动的网络环境模拟器,主要用 于解决网络研究方面的问题。NS2提供了在无线或有 线网络上的TCP/IP、路由、队列管理、IP QoS等多 种协议的模拟。
NS2使用C++和OTcl(具有面向对象特性的Tcl脚 本程序设计语言)作为开发语言。
不同平台对NS2的支持情况
仿真流程
无线自组网路由协议
无线自组网的路由协议作为影响网络性能的一 个重要因素,是确保移动自组网络正确运行的关键。 对该领域进行深入而广泛的研究将为移动自组网的 应用提供重要科学依据。
分类:根据源端何时获得路由信息
仿真的三种路由协议
❖ 动态源路由协议DSR ❖ 无线自组网按需平面距离矢量路由协议
❖ 在拓扑变化频繁的无线自组网环境中,采用 按需路由协议可减少实时路由维护的信道资 源消耗;在网络拓扑结构相对稳定的环境中, 如果业务对实时性要求较高时,应尽量采用 表驱动方式的路由协议。
主要内容:
无线自组网 仿真工具NS2 无线自组网路由协议 路由仿真
无线自组网
无线自组网是一个多跳、临时、可自 由移动无中心网络。它不需要现有信息 基础网络设施的支持,可以在任何时候、 任何地点快速构建。
特点: ❖ 自组织 ❖ 动态拓扑 ❖ 多跳路由 ❖ 无中心且所有节点地位平等 ❖ 灵活性好
应用领域: ❖ 军事应用 ❖ 无线传感器网络 ❖ 个人通信 ❖ 移动会议 ❖ 应用于紧急和突发场合 ❖ 与蜂窝移动通信系统等现有移动通
AODV ❖ 目的序列距离矢量路由协 NhomakorabeaDSDV
性能评价指标
丢包率 端到端时延 路由开销 吞吐量

基于NS2的无线自组网络路由协议的研究的开题报告

基于NS2的无线自组网络路由协议的研究的开题报告

基于NS2的无线自组网络路由协议的研究的开题报告一、选题的背景随着移动通信技术的不断发展和普及,无线自组网络(Wireless Ad Hoc Network)被越来越多的人们所熟知。

无线自组网络是一种去中心化、自组织、自适应的无线通信网络,在没有固定基础设施支持的情况下,通过节点之间的直接通信和协作,构建出一个动态的、多跳的无线网络。

它具有网络建设简单、可靠性高、部署快捷和适应环境变化等优点,被广泛地应用于移动办公、应急救援、无线感知网络等领域。

无线自组网络的实现依赖于有效的路由协议。

路由协议需要实现节点间的合作与协作,确保数据能够在节点之间高效地传输。

目前,现有的无线自组网络路由协议主要分为基于距离向量的路由协议、基于链路状态的路由协议和基于源路由的路由协议。

这些路由协议的设计和实现对无线自组网络的性能和安全具有重要的影响。

因此,研究无线自组网络路由协议的优化和改进具有重要的理论和应用价值。

二、选题的目的和意义本次研究的目的是基于NS2仿真平台,研究无线自组网络路由协议的优化和改进。

主要意义体现在以下几个方面:1.探究无线自组网络路由协议的基本原理和设计思想,以及现有路由协议的特点和问题;2.通过仿真实验,评估不同路由协议的性能表现,分析其优缺点,为无线自组网络的实际应用提供参考和指导;3.针对目前无线自组网络的热点问题进行研究,提出一种针对性强、效果显著的路由协议优化方案,为无线自组网络的进一步发展提供技术支撑。

三、主要内容和预期结果本次研究的主要内容包括:1.无线自组网络路由协议的基本原理和设计思想的研究,分析现有路由协议的特点和问题;2.基于NS2仿真平台,对不同路由协议进行仿真实验,评估其性能表现,并分析其优缺点;3.针对目前无线自组网络的热点问题,提出一种针对性强、效果显著的路由协议优化方案,并进行仿真实验进行性能评估。

预期结果包括:1.明确无线自组网络路由协议的基本设计思想和特点,了解现有路由协议的优缺点;2.通过仿真实验,评估不同路由协议的性能,并分析其优缺点,为无线自组网络的优化和改进提供参考;3.提出一种新的路由协议优化方案,并通过仿真实验进行性能评估,探索无线自组网络的进一步发展方向。

AdHoc无线路由DSR协议的研究及改进

AdHoc无线路由DSR协议的研究及改进

AdHoc无线路由DSR协议的研究及改进刘军旭【摘要】This article in view of the wireless AdHoc network's in route agreement question,introduced the DSR route agreement and the improvement DSR route agreement,carries on the simulation usingNS2,finally demonstrated carries on the optimization after the DSR route agreement,the network performance has the distinct enhancement.%本文针对无线AdHoc网络中的路由协议问题,介绍了DSR 路由协议和改进的DSR 路由协议,利用NS2进行仿真,结果显示对DSR路由协议进行优化后,网络性能得到明显提高。

【期刊名称】《电子测试》【年(卷),期】2014(000)005【总页数】2页(P71-72)【关键词】AdHoc;DSR;路由改进【作者】刘军旭【作者单位】陕西工业职业技术学院,陕西咸阳,712000【正文语种】中文0 引言AdHoc是一个拉丁词汇,在拉丁语中它的意思是“为了这个目的”,而AdHoc网络区别于一般意义上的网络,它是一种独特性的网络,一种既没有有线基础设施支持也没有固定路由器的移动网络,所有的节点都在不断的移动,处于不断跳动的变化中,又可称其为多跳网。

网络中的节点均由移动节点构成,虽然每个节点都处于动态过程中,不断地移动,但是各个节点之间可以以任何动态的方式与彼此保持联系。

目前,Adhoc网络面临的重要问题是如何快捷并准确地选择到目的节点。

1 DSR路由协议DSR即动态源路由协议,它是一种简单且行之有效的路由协议。

DSR路由协议允许任一节点动态发现到达Adhoc网络中其他任意节点的路由,并且DSR自动地对所有的路由信息进行维护。

基于NS2的Adhoc网络路由协议比较与性能评价

基于NS2的Adhoc网络路由协议比较与性能评价

to pay attention wireless routing protocol and algorithm,as well as bring forward multi-wireless Ad—hoc routing solution.This article introduces and analyses major routing protocol algorithms in Ad—hoc network,and uses the network simulation software
4结论
图1 一个30节点的仿真环境拓扑图例 Fig.1 Simulation environment that have 30 nodes
图2从节点1至节点4的传输速率比较 Fig.2 The transmission speed compare
from nodel to node4
本文通过NS2模拟仿真环境对无线Ad—hoc网 络进行了初步的研究和分析.通过NS2仿真,可以 了解在这种网络拓扑下的各个节点的负载、连接间 的传输速率以及了解无线Ad-hoe网络的仿真过程, 分析实验结果可以为改进实验模型提供数据.作为 一个移动自组网,由于节点位置不定、无线电波干 扰、数据碰撞等自组网的特点,选择一个合适的路由 协议将会大大降低网络负荷,提高无线资源的利用 塞.
;#MAC类型
set val(ifq) Queue/DropTail/PriQueue set val(11)
;#接口队列类型
LL
;#链路层类型
set val(ant)
Antenna/OmniAnt0
;#X坐标范围
set vaLl(Y)
670
;#Y坐标范围

DSR路由协议改进方案分析

DSR路由协议改进方案分析

个节 点丢失 了到达 目的节 点 的所有 路 由后将产 生一
个错误分组 ,并 回送 给源节 点。任何 一个 中间节 点如果 有
到达 目的节点 的备用路 由,则 接收到 该错 误分组 后停 止其 进一步 的传递 。该 中 间节点还 负责修 改 随后 的数据分 组传 递 的源路 由 ,使其 使 用 自己的备用 路 由来继续 传递 。这 一
作者简 介 :罗莉 琼 ( 9 1 ) 18 一 ,女 ,株洲广播 电视 大学助教 ,湖南大学在职研究生。湖南株洲 4 20 10 0
D R路 由协议 使用 源路 由 ,是一 种 由数 据分 组源 节点 S x 时刻中断 ,则初 始化一条新的路 由寻找进程 。
( ) 改 进 方 案二 三
维普资讯
总第 3 期 4
湖南广 播电视大学学报
20 年第 2期 08
D R路 由协 议 改进 方 案 分 析 S
罗莉 琼
内容摘 要:移动无线 自组 织网络具 有 多跳 无 线连 接 的特 点 ,在这 样 的 网络 中如何 有效 的提 高路 由是 一个 挑 战性 的问
由P; l
条路 由 P的生存 期 由 K个无 线连 接组成 ,当任何 一
个 无线连 接 中 断 则路 由 中 断 ,则 随机 变 量 x p能 够 被 表
示成 :
当P 中断 ,则备用路 由中断 ,导致 S开始寻找 ~条新
的路 由。 从L 的中断 开始 导致 S寻 找一 条新 的 路 由 L L ( +
过程持续进行 ,直到 源节 点接收 到一个 错误 分组 ,并且 已
术性能做 出评价 ,但却很少评价多路径路 由技术 。

没有备用路 由再 替代 为止。随后 ,源 节点 初始 化一个新 的

基于DSR的移动自组网多路径路由协议的研究与分析

基于DSR的移动自组网多路径路由协议的研究与分析
计 算机 光 盘软 件 与应 用
21 0 2年第 8期
Cm u e DS f w r n p l c t o s o p trC o ta ea dA p a in i 工 程 技 术
基于 D R的移动 自组网多路径路 由协议的研究与分析 S
李悦 ( 长沙师范学校教 育技 术 中心 ,长 沙 4 0 0 1 10)
摘要 :DS. P 动态源路 由协议是一种典型 的按 需路 由协 议 ,它只在有 需求的时候 才启动路 由发现过程 ,也 是 目前 移动 自组 网网络 的一种 主要路 由协议。本文 阐述 了 DSk的工作 原理并分析 了多种基 于 DS 的移动 自组 网的多路 径 t R 路 由协 议 的 工作 原 理 与 特 点 。 关键 词 :DS 协 议 ;移 动 自组 网 ;动 态 源路 由协 议 ;路 由发 现 R


算法中 ,这是不允许 的,D R算法 的这种机制极大 的降低 了寻 S
找 最 大 不 相 关 多 路 由 的可 能性 。
1 S R算法的路 由发现过程 .M 网络 中。它 由两个部分组成:路 由发现 以及路 由维护过程 。路 在 S R算法的路 由发现过程 中, M 中间节 点接 收重复的 R E RQ 由发现过程负责搜寻可能 的传播路径 , 而路 由维护 过程 则维持 包 ( 即从 同一个源 节点发来的具有相同 R E D的 R E RQ I R Q包) 并 着 已有路 由。 筛选 ,如 果该 R E R Q包 是从不 同的前一节 点发送过 来并且 该 二 、基于 D R的多路径路 由协 议 S RE R Q包 中路径 的跳 数小于或等于先前收到 的 R E R Q包 中的跳 ( )多路径路 由的相关概念及特 点 一 数,则接受这个 R E ,并进 行处理,然后转发 ,反之 ,则将 RQ 什么是多路径路 由, 即指在源节 点和 目的节 点之 间存在 着 这个 R E 弃 。 R Q丢 多条可用路径 。 能够在源节点和 目的节点之 间确定 多条路径 的 SR算法 在选 择路 由的过程中,目的节点首先选择最早收 M 算法,称之为多路径路 由算法 。 多径路 由算法 可以形成 多条路 到的 R E R Q中的路径作为主路 由,然后设定一个计 时器 ,在计 由,并确认其中一条路 由为主要路 由, 其他一条或 多条路 由为 时器 未清 零的情况继续接收 R E R Q包 ,并从 中选定一条与主路 备 份路 由。执行多路径路 由算法 的网络 即为多路 径路 由网络 。 径 不相关性最大的一条路径作为备选路 由。 但是这种机制导致 由于多路径路 由算法 的特 点, 多路径路 由网络与运行单路径 路 必须要发送大量的 R E R Q包,这极大地增加 网络 的负担 ,而且 由算法的网路相 比,具有分配通信量 、平衡 网络 负载的特 点, 最 后形成 的主路 由与 备选路 由之间仍然存 在着路径 重叠 的现 同时更加稳定、容错能力更强 ,并且 能实现均衡 负载 。 象。 目前基于 D R的多路径路 由协议主要有 M R S S 协议 、 M S R协 2S R . M 算法 中的路 由维护 议 等。本文主要是介绍 M R协议与 S R协议 。 S M 在无 线网络中,特别是 A O D H C网络,节点 的移动性非常 ( )M R(u t p t s u eR u i g 协议 - S M —iahore0tn) 大 ,网络 的拓扑结构可 能会经 常变化 ,链路 因节点 的移动 、网 M R是基 于 D R协 议的一种多路径路 由协议 , D R协议 络拥塞等 原因可能会断链 。 S S 和 S 因此在多路径路 由算法 中, 由维 路 相 比,降低 了分组发送延迟 ,提高整个 网络 的吞吐率。在路 由 护过程是 非常重要的, 因为它关系到如何快速的恢复 中断 的路 发现阶段 ,M R协议 以延迟 作为路径规格 的度量 。并使用主动 由。 S R协议 中,当一个节 点如果判定与下 个传输节点失 S 在 M 探 测 (r b n ) 的 方 式 和 带 权 重 的 循 环 调 度 去 了联系 , P o ig 则会朝路 由上行方 向发送 一个路 由错误分组 (E R RR) (e g t d o n Rb n 算法,来确定多条可能路径 。 w iheRudoi) 通过 多条 分组 。在 R E R R分组 中包含 了到达源节 点的路 由、断链的紧邻 路径 的负载均衡 来改善节点的通信质量 。M R是一种按需 的, S 上行节 点和紧邻 下行节 点的信息。当源节点接收到 R R E R分组 源路 由的协议 , 它只在节 点之 间需要通信 的时候才发起路 由发 后 ,根据 R E R R分组 中所携带 的信 息更新路 由表 ,将 和该条中 现过程 , 源路 由可 以充分发挥多径路 由的优点 , 降低多径通信 断链路有关 的路由全 部删 除。如果路 由表中 ,还有有效路 由, 和计算 的复杂性 ,并通过 主动探测 的结果来进行合理 的分配 , 则源节点将使用 该有效 路 由继续 传递数据分组。 达到实现拥塞控制 的 目的。 当一条路 由中断以后 并且被 源节点知晓, 节点可以采取 源 M R采用特定节 点对 范围上的独 立路径算法 ,M R独立路 以下两种策略 中的一种 重新 寻找路 由。 S S 径算法 的具体步骤如下 : () 1 只要任 何一条路 由发生 了中断 , 则开始路 由发现过程 ; 1 设置一个极 限跳数 , . 即源节 点与 目的节 点之间最大的节 () 2 当主路 由与备份路 由全部发生 了中断,才 开始路 由发

改进的移动自组网DSR协议路径缓存策略

改进的移动自组网DSR协议路径缓存策略

改进的移动自组网DSR协议路径缓存策略摘要:动态源路由协议在Ad Hoc网络拓扑结构变化频繁时,缓存中的路由得不到及时更新会经常失效,从而导致网络性能下降,本文对DSR(Dynamic Source Routing)路由协议的缓存管理进行了研究。

基于AODV协议局部连接性管理机制提出了一种带错误路由主动发现机制的改进DSR协议,该协议可以提高缓存中路由信息的准确率,较好的适应了Ad Hoc网络动态的网络拓扑结构变化。

仿真结果表明,该方法可以有效提高分组投递率,同时降低路由开销及传输延迟。

关键字:移动自组网络;DSR;缓存管理;局部连接性管理;NS2;Optimized Caching Strategies in DSR Routing Protocol forWireless Ad Hoc NetworksAbstract:The route cache of dynamic source routing protocol is often failed because of not timely updates, when the Ad Hoc network topology changes frequently, which leads to network performance degradation. This paper has studied something about the cache management in DSR routing protocols, and proposes an improvement DSR protocol with initiative discovery of misrouted mechanism based on the local connectivity management mechanism of AODV protocol. The improved protocol can improve the accuracy of the cache routing information, and better adapted to the network topology changes dynamically. The simulation results show that this method can effectively improve the packet delivery ratio, and reducing the routing overhead and transmission delay at the same time.Keyword: mobile ad hoc networks, DSR, caching strategies,local connectivity manage mechanism, NS21引言Ad Hoc网络是一种无中心自组织的网络,具有无中心自组织性、多跳性和对等性,网络拓扑动态变化等特点,广泛应用在军事、灾难救助、偏远山区作业等特殊场合[1]。

基于多路径的DSR路由协议改进

基于多路径的DSR路由协议改进

基于多路径的DSR路由协议改进胡中栋;曾志勇【摘要】在对Ad Hoc网络单路径DSR路由协议分析研究的基础上,提出了一种多路径路由协议MDSR.多路径路由能够提供载荷平衡、容错能力,以及较高的总带宽.应用NS2仿真平台对DSR和MDSR路由协议进行仿真,通过对协议性能指标的比较和分析,得出MDSR协议在路由寻找次数、分组投递率、平均端到端时延和路由开销上优于DSR协议.%Based on the analysis of single path DSR (Dynamic Source Routing)route protocol of Ad Hoc network, a multi-path route protocol called MDSR is introduced in the article.The multi-path route protocol can provide load-balancing, fault-tolerant ability, and high bandwidth.After making a network simulation experiment by DSR and MDSR routing protocol on NS2 plaffor, comparing and analyzing protocol perform metrics, it is concluded that MDSR protocol is superior to DSR protocol on routing seek times, packets delivery rate, the average delay of packets end to end and routing load.【期刊名称】《江西理工大学学报》【年(卷),期】2011(032)003【总页数】4页(P45-48)【关键词】Ad Hoc;路由协议;多路径;MDSR【作者】胡中栋;曾志勇【作者单位】江西理工大学信息工程学院,江西赣州341000;江西理工大学信息工程学院,江西赣州341000【正文语种】中文【中图分类】TP393路由协议是Ad Hoc的关键和核心问题之一.目前的路由算法大多是按需单路径路由协议,例如DSR(Dynamic Source Routing)[1]、AODV(Ad hoc on demand distance vector routing)[2]等.这些路由算法都采用单路径方式传送数据[3].Ad Hoc网络中所有的移动节点都具有路由功能,从源节点到目的节点的路径可能有多条,单路径路由协议没有充分利用网络资源,造成端对端时延增加,丢包率增大.当负载较大时,容易产生网络拥塞的问题.没有负载均衡的数据分配将使负载严重的节点能量耗尽.随着能量耗尽节点数目的增加,网络的连接就变得很脆弱,最终导致连接失败,生存时间缩短.因此,当数据分配时,有必要考虑节点的负载和拥塞状态[4].针对单路径路由协议的这些问题,对DSR路由协议进行改进,提出了一种多路径路由协议MDSR(Multi-pathDynamicSourceRouting Protocol).多路径路由可以将通信传输分散到多条路径上,以实现载荷平衡,载荷平衡可以减轻网络拥塞和减少瓶颈[5];同时,多路径路由提供了容错能力.多路径还能够提供较高的带宽,适用于某些带宽要求特别高的应用,也能降低突发的大量数据流对网络的影响.动态源路由协议(Dynamic Source Routing Protocol,DSR)是一个专门为移动Ad Hoc网络设计的简单且高效的路由协议.DSR路由协议主要包括两个过程:路由寻找(Route Discovery)和路由维护(Route Maintenance),并且这两个过程都是按需工作的[6].(1)相关定义.定义1:两条节点不相关路径的相关因数η定义为连接这两条路径的链路的条数.如果两条节点不相关路径之间没有任何链连接着,那么相关因数η=0;如果两条节点不相关路径之间有n条链路连接着,那么相关因数η=n.并且,一组多路径的总相关因数定义为每对路径的相关因数ηi之和[7-8].定义2:多路径路由相关性.①节点不相关多路径路由:指在各条路由中除了相同的源节点和目的节点之外,相互之间再也没有任何其它的共享节点.②链路不相关多路径路由:指在各条路由中没有共享的链路,但是可能有共享的节点.③相关多路径路由:指在各条路由中既存在共享节点,又存在共享链路.其实也就是一般的没有任何限制的路由.(2)路径选择准则.①尽量选择节点不相关的路由;②尽量选择和主路由长度相差最小的备用路由;③尽量使任何两条路由之间的相关因数最小.也就是,选择的所有路由之间的相关因数η之和最小.(3)MDSR路由协议.MDSR路由协议是在DSR路由协议的基础上,通过修改中间节点处理路由请求信息的方法来实现多路径路由.在MDSR协议中,源节点发起一个路由寻找请求过程来寻找到达所需目的节点的路由.中间节点第一次接收到路由请求信息,将广播该路由请求信息,并把从源节点到达本节点的路径长度保存下来.当再次接收到相同的路由请求信息,不是一味的丢弃该路由请求信息,而是把本次路由请求信息所经过的跳数小于或者等于保存的路径长度,则存储并广播该路由请求信息.否则,将丢弃该路由请求信息.当目的节点接收到路由请求信息后,给源节点发送路由应答信息.源节点按照路径选择准则,选出节点不相关的多条合适的路由.当源节点给目的节点传输数据分组时,产生一个RREQ(路由请求)数据包,并广播该数据包.当一个中间节点接收到一个RREQ,按以下两种情况处理:(1)如果是第一次收到的,就认为这个数据包是通过最短的路径到达的.中间节点会计算路由长度X并记录到存储器中.(2)如果不是第一次接收到的,中间节点将仍接收这个数据包,并计算其路由长度P.将P值和先前存储的路由长度X进行比较.如果P>X,丢弃这个数据包;如果P≤X,中间节点就会广播该数据包.因此,参数X在路由寻找过程中起到决定性的作用.例如在图1所示的网络拓扑中进行路由寻找,中间节点就是采用这种机制,其中[1]到达节点的路由长度为1,[2]表示到达节点的路由长度为2.这种方法虽然增加了路由开销,但是保证了路径的长度最短.那么到达目的节点后,备用路由的长度一定和主路由的长度相差最小. 按照多路径选择准则,目的节点选出三条节点不相交的路由,并存储在路由存储器中,如图2所示.采用随机点模型,网络拓扑在一个矩形区域内.网络仿真的时间为300 s,选取了几十个不同网络场景进行实验,实验效果基本相同.其中一个网络场景:800m*600 m区域,40个节点,其中18对通信会话.网络中的每个节点都按选定的速率移动,从一个随机选择的位置向另一个随机选定的位置移动.在到达目的位置后,不做任何停留(停留时间为0),继续向下一个随机选定的位置移动,直到仿真结束.选定节点的平均移动速率分别为:1m/s、2 m/s、4 m/s、8 m/s、15 m/s、20m/s、25 m/s、35 m/s.通信的产生源是连续比特速率(CBR)类型.网络带宽为2M,随机选择源节点与目的节点对,数据分组长度为512 Byte.仿真实验中,选用以下4种性能指标.(1)路由寻找次数:指由于路径中断,导致无路由可用,源节点重新发起路由寻找的次数.(2)分组投递率:指交付到目的节点的数据分组数量与CBR源节点产生的数据分组数量之比.在某些情况下评估的一个相关指标是目的节点的接收吞吐量.(3)平均端到端时延:从源节点到达目的节点的所有数据分组的端到端时延的平均值.(4)路由开销:指为交付数据分组而发送的所有路由分组的总数量.对于在多跳路径上发送的分组,每发送一次(每跳)计算为一次发送.利用NS2仿真软件,对DSR协议和MDSR协议在给出的几十个不同网络场景下进行了网络仿真,在每次网络仿真实验结束后都会产生两个文件,动画演示nam 文件和节点跟踪trace文件.在trace文件中记录了网络仿真过程中的详细细节.利用Gawk工具对trace文件进行统计和分析,得出DSR协议和MDSR协议在两种网络场景中的路由性能指标数据.使用Gnuplot工具软件画出性能曲线图.(1)路由寻找次数.图3显示节点在不同的移动速度下,MDSR协议和DSR协议源节点发起路由寻找的次数.从图中可见,MDSR协议的路由寻找次数低于DSR协议.这是因为在一次路由寻找过程中,MDSR协议的源节点可以获得到达目的节点的多条节点不相关路由.(2)分组投递率.图4显示,MDSR协议的分组投递率相对于DSR协议有一定的改善.但是并不明显,MDSR协议的分组投递率比DSR协议高出约5%左右.随着节点移动速度的加快,MDSR协议的这种优势更加明显,高出约7%以上.(3)平均端到端时延.图5显示节点在不同的移动速度下,MDSR协议和DSR协议的平均端到端时延.随着网络拓扑变化越频繁(节点移动速度越快)MDSR协议和DSR协议的时延也随着增加.因为随着移动节点速度增加,路由中断的概率也越来越大,路由寻找的次数也越来越多,从而导致平均端到端时延也有所增加. (4)路由开销.图6显示,MDSR协议的路由开销要低于DSR协议.当节点移动速度比较慢(0~15 m/s)时,MDSR协议的路由开销都比DSR协议的路由开销要低8%~10%.但是随着节点移动速度的加快,MDSR协议在路由开销方面比DSR协议降低了20%左右.从仿真结果的分析可以看出,MDSR协议相对于DSR协议在整体性能上有所改善.MDSR协议能够提供载荷平衡,降低路由寻找次数,减少平均端到端时延.尽管MDSR协议在路由寻找次数上有所改善,但MDSR协议寻找多条节点不相关路由的代价往往比DSR协议寻找单路由的代价要高,使得MDSR协议在路由开销方面并没有得到更大程度上的改善.因此,多路径路由协议MDSR仍需进一步完善.【相关文献】[1]Johnson D,Maltz D A.The Dynamic Source Routing Protocol(DSR)for Mobile Ad Hoc Networks for IPv4[db/OL].(2007-02-01)[2011-03-04].http://www.ietf.org/rfc/rfc4728.txt.2006,1.[2]Perkins C E,Royer E M.Ad Hoc On-demand Distance Vector(AODV)Routing.[db/OL].(2003-07-21)[2011-03-04].http://www.ietf.org/rfc/rfc3561.txt.2006,1.[3]刘永广,叶梧,冯穗力.一种基于信道阻力的Ad hoc网络多路径路由算法[J].电子与信息学报,2009,32(2):476-479.[4]李梅,周继鹏.基于负载均衡的DSR路由协议改进[J].计算机应用研究,2011,28(1):256-258.[5]Pearlman M R,Hass Z J,Sholander P,et al.On the Impact of Alternate Path Routing for Load Balancing in Mobile Ad Hoc Networks[C].Proceeding of IEEE/ACM MobileHoc 2000,Boston,2000.[6]Johnson D,Maltz D.Dynamic Source Routing in Ad Hoc Wireless Networks.in:T.Imielinski and H.Korth,eds.Mobile Computing[M].Kluwer:Kiu wer Academic Pubisher,1996.[7]Kui Wu,Harms J.On-demand Multipath Routing for Mobile Ad HocNetworks[C]//EPMCC,Vienna,2001.[8]胡中栋,曾传璜,曾廷.利用路由器构建校园网防火墙体系[J].南方冶金学院学报,2005,26(1):36-39.。

AdHoc无线路由DSR协议的研究及改进

AdHoc无线路由DSR协议的研究及改进
S p .2 0 0 8 e
Ad c 线 路 由 DS Ho 无 R协 议 的研 究及 改进
刘 军旭
( 陕西工业职业技术学 院基础部 , 陕西 咸 阳 720 ) 100
摘 要 : 文针 对无线 A Ho 本 d c网络 中的路 由协议 问题 , 绍 了 D R路 由协议 和改进 的 D R路 由协议 , 用 N 2进 介 S S 利 S
D R协议使 用源路 由算法 S 2而不是 逐跳路 由 的算法 , 查询使用泛洪技术 , 即当一个源节点在查询
目的节点时, 将一个查 询包 以泛洪的方式向整个 网
由协议 , 后两种属于按需驱动路 由协议 , 由于它们路 由开销较低 , 在实际的 A h c d o 网络 中多使用 D R路 S
网络没有 固定 的基 础设 施 , 没有 固定 的路 由器 , 也 所
有节点都是移动的、 动态变化的, 并且均能以任何方 式动态地保持与其他点的联系。如何迅速准确地 选择到 目的节点 的路 由成为 A hc网络 的一 个重 do
要 问题 。

、 R路 由协议
19 9 7年 Itre 工 程 工 作 组 (E ) 出 了多 nen t I TF 提
许任一结点动 态发现到达 A h c d o 网络中其 它任意 节点的路 由, 且所有 的路由信息 由 D R 自动地进行 S 维护。路 由发现完成后 , 每个 D R头部都携带了到 S 达 目的节点 的完整 的路 由跃点列表 (o lt , hpi ) 中间 s
节点 只需 简 单 地 对 分 组 进 行 转 发 即 可 。同 时 DS R
行仿真 , 结果显 示对 DS R路 由协议进行优 化后 , 网络 性能得 到明显提 高。

基于NS2下的DSR路由协议的研究与优化(具体仿真代码步骤)

基于NS2下的DSR路由协议的研究与优化(具体仿真代码步骤)

基于NS2下的DSR路由协议的研究与优化基于NS2下的DSR路由协议的研究与优化李志斌陶然摘要:Ad Hoc网络是当前无线通信领域一种新的、发展迅速的通信技术,由于它不依赖固定的基础通信设施,没有中心控制节点,抗毁性强,因此适用于许多网络布线存在困难的环境。

基于这些特殊优势,Ad hoc网络在军事领域中发挥着重要作用,在民用领域也有着很好的应用前景。

DSR 协议是专为Ad hoc 网络设计的一种按需路由控制协议,它以简单有效、网络开销小、算法复杂度不高、支持单向链路等优点而受到广泛的关注,被认为是最有实用前景的Ad hoc 网络路由协议之一。

NS2( Network Simulator Version 2),是UC Berkeley开发的一个离散事件驱动的事件模拟器。

它能模拟Ad Hoc网络路由协议运行的全过程,并把仿真结果输出到一个trace文件中。

通过对trace文件的分析,可以了解到Ad Hoc网络路由协议运行的状况,从而分析评价路由协议的性能好坏。

本文首先介绍Ad Hoc网络的基本概念、关键技术和路由协议。

其次,对DSR协议的概念、特点及工作原理给予详细的介绍和分析。

然后在NS2网络仿真模拟平台下建立无线网络模型,以AODV作对比,对DSR和AODV协议仿真模拟,分析评价DSR路由协议性能。

仿真结果表明,同AODV对比,DSR在快速变化的网络拓扑结构中更具优势。

最后文章对DSR协议的优化改进作总结。

关键词:Ad hoc,DSR 协议,优化,网络仿真,NS2The research and optimization of DSR route protocol based on NS2LI Zhi-bin ,TAO RanAbstract:Ad Hoc network is a new technique in wireless communication field which develops rapidly in recent years. As it does not depend on fixed network infrastructure, and has no central controlling node as well as good in resisting destructions, it is applicable to many situations that have difficulties in wiring networks. Based on these special advantages, Ad hoc plays an important part in military applications, and it also has a good prospect in civil applications. DSR protocol is an on-demand routing protocol that is specifically designed for Ad hoc. It attracts widely attention because of its advantages such as its simplicity, low network overhead, low algorithm complexity, supporting unidirectional routes andso on. So DSR protocol will probably play an important role in future Ad hoc application.NS2 (Network Simulator Version 2), developed by UC Berkeley, is a simulator driven by discrete events. It can simulate a routing protocol operation process of Ad Hoc network, and export simulation results to a trace file. From the trace file, we can know the operation process of routing protocol, then analyze and evaluate the performance of routing protocol.This paper, first of all, introduces the basic concept, key technologies and routing protocols of Ad Hoc Network. Secondly, for the concept, feature andworking principle of DSR,the paper gives a detailed introduction and analysis. Then, to evaluate the performance of DSR and AODV, we established a simulation platform of wireless network model based on the NS2。

使用NS2模拟分析AODV协议,CBRP,DSDV和DSR的MANET路由协议性能(IJCNIS-V5-N9-6)

使用NS2模拟分析AODV协议,CBRP,DSDV和DSR的MANET路由协议性能(IJCNIS-V5-N9-6)

I. J. Computer Network and Information Security, 2013, 9, 45-50Published Online July 2013 in MECS (/)DOI: 10.5815/ijcnis.2013.09.06Performance Analysis of AODV, CBRP, DSDV and DSR MANET Routing Protocol using NS2SimulationAwadhesh Kumar1, Prabhat Singh2, Vinay Kumar3, Dr. Neeraj Tyagi41,2,3Department of Computer Science and Engineering, Kamla Nehru Institute of technology, Sultanpur, India 4Department of Computer Science and Engineering, MNNIT, A llahabad, India awadhesh@knit.ac.in, prabhatsingh@, vinayknit@, neerajtyagi@mnnit.ac.inAbstract —A Mobile Ad-hoc Network (MANET) is a collection of multi-hop wireless mobile nodes among which the communication is carried out without any centralized control or fixed infrastructure. MANET is a self-organized, self-configurable network having no infrastructure, and in which the mobile nodes move arbitrarily. The wireless link in the network are highly error prone and can go down frequently due to the mobility of nodes, interference and less infrastructure. Hence, because of the highly dynamic environment routing in MANET is a very difficult task. Over the last decade various routing protocols have been proposed for the mobile ad-hoc network and the most important among all of them are AODV, DSR, DSDV and CBRP. This research paper gives the overview of these routing protocols as well as the characteristics and functionality of these routing protocols along with their pros and cons and then make their comparative analysis in order to measure the performance of the network. The main objective of this paper is to compare the performance of all the four routing protocols and then to make the observations about how the performance of these routing protocols can be improved. Performance of these routing protocols are compared on the basis of various parameters such as throughput, delay and packet delivery ratio.Index Terms — Ad Hoc On Demand Distance Vector (AODV), Cluster Based Routing Protocol (CBRP), Destination-Sequenced Distance Vector (DSDV), Dynamic Source Routing (DSR).I.I NTRODUC TIONOver the last decade, researchers have made various researches in the field of mobile computing especially MANETs. A Mobile ad-hoc network (MANETs) is a self-organized, arbitrarily developed network and can easily adopt in working environment. Basically, MANET is the collection of wireless mobile nodes that can interact and communicate with each other, without having the centralized and established infrastructure. MANETs have converted the dream of getting connected “anywhere and at any time” in to the reality. MANETs are useful in various application areas such as: communication in the battlefields, institutions and colleges, military areas, disaster recovery areas, law and order maintenance, traffic control areas, medical field, conferences and convocations etc. In MANET, all the nodes are mobile nodes and their topology changes rapidly. The Internet Engineering Task Force (IETF) created a MANET working group to deal with the challenges faced during the construction of the MANET routing protocols. These protocols are basically classified in to three basic types such as: reactive (on demand), proactive (table-driven) and hybrid. One of the basic goals of the mobile ad-hoc network is to establish correct and efficient route between the mobile nodes so that communication between the sender and receiver is effective.EnablingTechnologiesNetworkingApplicationAndMiddlewareIn Proactive (table driven) routing protocols, each node maintain one or more routing table which contain information about every other node in a network. Routing tables are updated by all the nodes in order to maintain a consistent and up to date view of the network. In table driven routing protocol, continuous broadcasting of messages is done in order to establish routes and maintain them. One of the basic advantages of proactive routing protocol is that route from source to destination is easily available without any overhead, as they are independent of traffic profiles. Various proactive routing protocols are: DSDV [1], [2], DBF [3], GSR [4], W RP [5] and ZRP [6].46Performance Analysis of AODV, CBRP, DSDV and DSR MA NET Routing Protocol using NS2 SimulationIn reactive (on demand) routing protocol, creation of routes is done when it is required. When some packets are to be send from source to destination, it may invoke the route discovery mechanism to find the path to the destination. The route is valid, till the destination is reached or it is no longer be required in the future. Some of the reactive routing protocols are: DSR [1] [3], AODV [8] [6] and TORA [2].In hybrid protocol routing, we combine the benefits of both the reactive as well as proactive. Hybrid protocols are basically dependent on the network size for their functionality. The remaining portion of this paper is categorized as follows. In section 2, we will discuss the various issues and challenges faced by the MANET. In section 3, we will focus on the routing protocols such as AODV, DSR, DSDV, and CBRP. We will compare the reactive routing protocols with proactive routing protocols and understands the difference between them that affect the performance of these routing protocols. In section 4, we present the simulation of these routing protocols and compare their performance. In section 5, we analyze various results that are obtained from the simulations. Finally, we conclude the paper in section 6.II.CHA LLENGES FA CED BY THE MANETS MANETs are very much different from the wireless network infrastructures. MANETs has to face various challenges in order to achieve best Quality of Service for the underlying network. Some of these challenges are as follows:1.Unicast and multicast routing.2.Topology changes dynamically.3.Speed and network overhead.4.Limited power supply and bandwidth.5.Quality of service and secure routing.6.Scalable and energy efficient routing.These challenges are faced at the different layers of MANETs shown in the figure 2. It represents the layered architecture of the OSI model and entitled the challenges of MANETs regarding these layers.Unicast andFigure 2. Challenges are faced at the different layers ofMANETsIII.R OUTING P ROTOCOLSA.Ad Hoc On Demand Distance Vector (AODV) Basically A ODV is the improvement of DSDV routing algorithm. It is collectively based on the combination of both DSDV and DSR. The main aim of AODV routing algorithm is to provide reliable and secure data transmission over the MANETs. In this routing protocol, route maintenance from one node to every other node is not considered in the network. Whereas in AODV, route are discovered only when they are needed as well as they are maintained only as long as they are required. The key steps used in the AODV algorithm are defined below:1.Route creation-Route creation process is initiated when thenode wants to send the data packet to the destination node but does not find the valid routeto send the packet. This process is initiated assuch: when a particular node want to send thedata packet to the destination node then, the routing table entries are checked in order to verify whether there exists a route between thesource and destination or not. If the route exists,then the packet is forwarded to the next hoptowards the destination. When the route does notexists, and then the route discovery process isinitiated. AODV starts the route discovery process using the route request (RREQ) and route reply (RREP). The source node will createthe route request packet(RREQ) containing itssequence number, its IP address , destination node sequence number, destination IP addressand broadcasting ID. Whenever the source nodeinitiates the RREQ, the broadcast ID is incremented each time. As the sequence numberis used to identify the timeliness of each datapacket and broadcast ID and the IP address identify the unique identifier for route request sothat they can uniquely identify each of the request. The data packet sends the request usingthe RREQ message and gets back the reply inthe form of RREP message if the route is discovered between the nodes. The source nodesends the RREQ packet to its neighbors as wellas set the timer in order to wait for the RREPmessage. In order to describe RREQ, reverse route entry is set up by the node in its routingtable. This enables us to know how we can forward the route reply (RREP) to the source.Moreover, a time period is associated with thereverse route entry and if this route entry is notused within the given time period then only theroute information is deleted. If in any case RREQ is lost during the transfer of packet thenthe source node again initiates route discoverymechanis m.2.Route maintenance-Route that has been created by the source nodeand destination node is being maintained as longas it is needed by the source node. Since nodesin the MANETs are mobile and if the sourcenode is in the mobile state during the activesession, it again restarts the route discoverymechanis m in order to establish new routes fromsource to destination.Otherwise, if some of the intermediate nodeor the destination node is in the mobile stateduring the active session, then the nodes initiatesthe RERR message that affects the above neighbors and the nodes. As a result of whichthese nodes forward the RERR message to thepredecessor nodes and can be continued until thesource node is reached. When RERR is receivedby the source node, then the node stop sendingthe data or it can again start the route discoverymechanis m by sending the RREQ message.Advantages-•Loop free routing.•Optional multicast.•Reduced control overhead.Disadvantages-•Bi-directional connection needed inorder to detect a unidirectional link.•Delay caused by the route discoveryprocess.B.Dynamic Source Routing (DSR)-DSR is the reactive routing protocol which is able to manage MANETs without using the periodic table update messages like proactive routing protocols does. Specially, DSR are designed to make use in multi-hop wireless ad-hoc networks. Ad-hoc network enables the network to be self-organizing and self-configuring which means that there is no need of existing network infrastructure. This protocol basically focuses on the two different phases i.e. route discovery and route maintenance. In route discovery phase, source node sends the packet to the destination node. In route maintenance phase, protocol detects when the topology of the network has changed and decides if an alternative route has been used or the route discovery protocol must be started to find the new path. Route discovery and route maintenance phase only give responses when they receive the request.Advantages-•DSR does not need the routing table for making the periodic updates. •Intermediate nodes are able to utilize the route cache information efficiently to reduce thecontrol overhead.•Bandwidth saving because it does not require any HELLO messages.Disadvantages-•Route maintenance protocol does not locally repair the broken link.•This protocol is only been efficient for less than 200 nodes in MANETs.•There is small time delay if the beginning of the new connection takes place.C.Destination- Sequenced Distance VectorRouting-The DSDV algorithm is basically the amendments made in distributed bellman ford algorithm, which provides loop free routes. It gives us the single path from source to destination using distance vector routing protocol. In order to reduce the amount of overhead in a network two types of updates packets are transferred i.e. full dump and incremental packet. Full dump broadcasting carry all the routing information while the incremental dump broadcasting will carry information that has changed since last full dump irrespective of the two types, broadcasting is done in the network protocol data unit(NPDU). Full dump requires multiple NPDU’s whereas incremental dump requires one NPDU’s tofit in all the information. Incremental update packets are sent more easily and frequently than the full dump packets. DSDV introduces the large amount of overhead to the network due to the requirement of periodic update messages. Hence, this protocol is not suitable for the large network because large portionof the network bandwidth is used for the updating of messages.1.Management of the routing table-The routing table for each and every nodeconsists of a list of all available nodes, their nexthop to the destination, their metric and asequence number generated by the destinationnode. With the help of the MANETs, routingtable is used to send the data packets. Routingtable can be kept consistent with thedynamically changing topology of ad-hocnetwork by periodically updating the routingtable with some s mall changes in the network.Hence, mobile nodes provide their routinginformation by broadcasting the routing tableupdate packet. The metric of the update packetstarts with the initial value of one for one hopneighbors and goes on incremented with eachforwarding node. The receiving node updatestheir routing tables if the sequence number ofthe update is greater than the current node orequal to the current node. Fluctuations in therouting table are minimized by delaying theadvertisement of routes until we find the bestroute.2.Changes in the topology-DSDV responds to the broken links by authorizing all the routes that contain this link.The routes are immediately assigned a metric aswell as the incremented sequence number.Physical and data link layer components areused to detect the broken links or if the nodedoes not receive broadcast packets from its neighbors node. Then, immediately the detecting node will broadcast an update packetand inform all the other nodes about the broadcasting mechanism. Route will again bereestablished when the routing table is broadcasted by the node.Advantages-•Guarantees loop free path.•Count to infinity problem is reduced inDSDV.•With incremental updates, we can avoid extra traffic.•DSDV maintain the best possible pathinstead of maintaining the multiplepaths to the destination this reduces theamount of space in the routing table.Disadvantages-•It does not support the multipathrouting.•Difficult to determine the delay for theadvertisement of routes.•Unnecessary advertising of routing information can result in the wastage ofbandwidth.D.Cluster Based Routing Protocol (CBRP)-It is a reactive and on demand routing protocol in which nodes are divided in to theclusters. This protocol uses the clustering structure for the routing procedures. Clusteringis defined as the phenomenon that divides thenetwork in to the interconnected sub networks.Each cluster has the cluster head which acts asthe coordinator in sub networks. Each clusterhead has the base station within its cluster sothat it can communicate with other cluster heads.This is the reactive routing protocol which is tobe used in MANETs. The protocol divides thenodes in to the number of clusters in a distributed manner. Each cluster contains thecluster head which contain the cluster information. Four possible states for the nodesare as follows: CLUSTERHEA D, GATEWA Y,NORMA L and GATEWA Y. Initially all thenodes are in the isolated state. Each nodemaintain the NEIGHBOR table, wherein theinformation about the other neighbor nodes arestored whereas, cluster heads maintain anothertable wherein the information about the otherneighbor cluster head is stored [13].IV.S IMULATIONThe main goal of the simulation is to analyze the performance of different MANETs routing protocol. The simulation is being performed by the NS2 simulator. It is the software that provides the simulations of wireless networks and open source software. In our simulation, we consider a network of 5 nodes that are placed randomly within a 360000m2 areas and operating over 300 seconds. In this, multiple run with different node speed and number of nodes are calculated for each scenarios and collected data is averaged further in order to understand the performance of different routing protocols. For calculating the performance of different routing protocol, we require both qualitative as well as quantitative metrics. Some of the quantitative metrics are used to compare the performance of different routing protocols which are as follows:A.Throughput- It basically defines as ratio of thenumber of packets delivered to the total numberof packets sent.B.Packet delivery ratio- It is the ratio of totalnumber of packets successfully delivered to thedestination nodes to the total number of packetssend by the source nodes. It basically describesthe percentage of packets that reach the destination.C.Minimum and maximum delay- Minimum delayis the minimum time taken by the packets toreach the next node and maximum delay ismaximum time taken by the packets to reach thenext node.D.Average End to End delay- It is the total timetaken by all the packets to reach the destination. work parameters- In this, simulation time isthe time taken during the simulation run that istime between the starting of simulation and endof the simulation. Network size basicallydetermines the number of the nodes used and thearea occupied by the network. The number ofnodes used in this simulation is 5.V.S IMULATION R ESULTS AND D ISCUSSIONSAs seen in the figure-3, if the mobility increases AODV gives the maximum throughput, DSDV, DSR and CBRP throughput is decreased with the increase in node speed.Figure 3. Average Throughput vs SpeedIn figure-4 if node speed increases, average delay of AODV decreases while in DSDV, DSR and CBRP average delay increases with the increase in the node speed. It means packet delivery takes the less time as the node speed increases in AODV.Figure 4. Average Delay vs SpeedIn figure-5,as the mobility increases, the packet delivery ratio of AODV and DSDV decreases while it increases in DSR and CBRP. Hence in terms of packet delivery ratio, CBRP is better among all the four routing protocols.Figure 5. Packet Delivery Ratio vs SpeedVI.C ONCLUSIONSThis paper provides the detailed study of various routing protocols which are proposed for the mobile ad-hoc networks and also provide the classification of these routing protocols on the basis of their routing strategy. In this paper we have presented AODV, CBRP, DSR and DSDV and study their features, differences and characteristics. The performance of these routing protocols is analyzed with NS2 simulator with scenario of5 nodes. The observations are made with variation in network mobility. After various analysis of network in different situations, we comes at the conclusion that AODV performs better than DSR, DSDV, and CBRP in terms of throughput and average delay while CBRP is proved to be better in terms of packet delivery ratio. Allin all, by analyzing all the parameters, we come at the conclusion that the AODV routing protocol is better.R EFERENCES[1]. David B. Johnson and David A. Maltz. Dynamicsource routing in ad hoc wireless networks. Technicalreport, Carnegie Mellon University, 1996.[2]. Mehran Abolhasan, Tadeusz Wysocki, and ErykDutkiewicz. A review of routingprotocols for mobilead hoc networks. Technical report, Telecommunication and Information Research Institute, University of Wollongong, Wollongong,NSW 2522; Motorola Australia Research Centre, 12Lord St., Botany, NSW 2525, Australia,2003.[3]. Xiaoyan Hong, Kaixin Xu, and Mario Gerla. Scalablerouting protocols for mobile ad hoc networks. 2002. [4]. Integration of mobile ad-hoc networks, EU projectDAIDA LOS, Susana Sargento, Institute of Telecommunications.[5]. Mobile Ad Hoc Networking: An EssentialTechnology for Pervasive Computing Jun-Zhao SunMediaTeam, Machine Vision and Media Processing Unit. [6]. C. Siva Ram Murthy and B. S. Manoj, “Ad Hoc Wireless Networks, Architectures and Protocols”, Second Edition, Low price Edition, Pearson Education, 2007. [7]. International Journal of Computer Science & Engineering Survey (IJCSES) Vol.1, No.1, August 2010 “ANA LYZING THE MANET VARIATIONS, CHALLENGES, CAPACITY AND PROTOCOL ISSUES” G. S. Mamatha1 and Dr. S. C. Sharma [8]. Jochen Schiller. Mobile Communications. Addison-Wesley, 2000.Awadhesh Kumar , graduated (B.E.) in 1999 from G.B. Pant Engineering, Puari (Garhwal) and completed his Post Graduation (M.Tech.) from Gautam Buddh Technical University, Lucknow U.P. and pursuing hi s research from MNNIT, Allahabad. Presently he is working as an AssociateProfessor in the Computer Sc.& Engg. Dept., Kamla Nehru Institute of Technology, Sultanpur U.P. .Prabaht Singh graduated from Priyadarshini College of Computer Sciences, greater noida, Uttar Pradesh in Computer Science & Engineering in 2010. He is pursuing M.Tech in the department of Computer Science & Engineering, Kamla Nehru Institute of Technology, Sultanpur (Uttar Pradesh).Vinay Kumar graduated Uttar Pradesh Technical University, inComputer Science & Engineering in 2010. He is pursuing M.Tech in the department of Computer Science & Engineering, Kamla Nehru Institute of Technology, Sultanpur (Uttar Pradesh).Dr. Neeraj Tyagi is working as Professor in the department of Computer Science &Engineering, MNNIT, Allahabad(Uttar Pradesh), India. His teaching and research interests including ComputerNetworks, Mobile Ad-Hoc Networks, wireless Networks and Operating Systems. He joined the department of Computer Science & Engineering in 1989 at MNNIT,Allahabad and he has Also worked in Warman International- Australia, G.E (Capital) - U.S.A, ElectronicData Systems- U.S.A during 1999-2001.。

基于DSR的多路径路由协议的分析和改进

基于DSR的多路径路由协议的分析和改进

基于DSR的多路径路由协议的分析和改进
郑辉;陈曙;刘丽云
【期刊名称】《山东大学学报:工学版》
【年(卷),期】2007(37)1
【摘要】首先分析了DSR路由协议,然后提出了一种简单易实现的独立多径路由算法.该算法中只有目的节点应答路由请求,中间节点只转发一次路由请求,这样不仅减少了路由分组的数量,而且能为目的节点尽可能提供多条独立路径,减少了目的节点路由计算的复杂度.在NS-2环境下与DSR路由协议在路由开销、丢包率和端到端的平均延时方面进行了对比实验,实验结果表明SIMR算法的性能优于DSR路由协议.
【总页数】4页(P115-118)
【关键词】路由协议;Ad;hoc;DSR;独立多路径
【作者】郑辉;陈曙;刘丽云
【作者单位】山东大学信息科学与工程学院
【正文语种】中文
【中图分类】TN91
【相关文献】
1.基于能量改进的DSR路由协议性能分析 [J], 周鑫;龙华
2.基于DSR的移动自组网多路径路由协议的研究与分析 [J], 李悦
3.基于DSR多路径的路由协议 [J], 毛靖添;马光胜
4.基于多路径的DSR路由协议改进 [J], 胡中栋;曾志勇
5.Ad Hoc多路径DSR路由协议的性能分析 [J], 刀学龙;龙华;李汝恒
因版权原因,仅展示原文概要,查看原文内容请购买。

基于NS2的无线自组网路由协议的研究与仿真毕业论文

基于NS2的无线自组网路由协议的研究与仿真毕业论文

湖南城市学院本科毕业设计(论文)诚信声明本人郑重声明:所呈交的本科毕业设计(论文),是本人在指导老师的指导下,独立进行研究工作所取得的成果,成果不存在知识产权争议,除文中已经注明引用的内容外,本设计(论文)不含任何其他个人或集体已经发表或撰写过的作品成果。

对本文的研究做出重要贡献的个人和集体均已在文中以明确方式标明。

本人完全意识到本声明的法律结果由本人承担。

本科毕业设计(论文)作者签名:二○一○年五月二十日目录摘要 (I)关键词 (I)Abstract (II)Key words (II)1 绪论 (1)1.1 课题研究的背景 (1)1.2 国内外研究现状 (1)1.3 本课题研的研究内容和方法 (2)2 无线自组网 (2)2.1 无线自组网的产生和发展 (2)2.2 无线自组网的特征 (3)2.3 无线自组网应用领域 (3)2.4 无线自组网体系结构 (4)3 网络模拟器NS2 (5)3.1 NS2简介 (5)3.2 NS2组成部分 (7)3.3 NS2模拟基本流程 (8)4 无线自组网路由协议 (9)4.1 无线自组网与传统移动通信网络的区别 (9)4.2 无线自组网路由协议分类 (9)4.3 几种典型的无线自组网路由协议 (10)4.3.1 目的序列距离矢量路由协议DSDV (10)4.3.2 按需平面距离矢量路由协议AODV (10)4.3.3 动态源路由协议DSR (11)4.3.4 临时排序路由算法TORA (11)4.4 路由协议性能评标准 (12)5 无线自组网路由协议的仿真 (12)5.1 移动节点 (12)5.1.1 移动节点的结构 (13)5.1.2 移动节点的创建 (13)5.1.3 移动节点的运动 (14)5.2 无线自组网路由模拟的实现 (15)5.2.1 无线自组网路由协议场景的构建 (15)5.2.2 TCP代理的创建和设置 (15)5.2.3 仿真参数的设置 (15)5.3 仿真结果分析 (16)5.3.1 动画演示工具nam (16)5.3.2 无线Trace文件格式 (17)5.3.3 数据分析工具gawk (18)5.3.4 绘图工具gnuplot (18)5.3.5 仿真结果分析 (19)结论 (23)参考文献 (25)致谢 (27)基于NS2的无线自组网路由协议的研究与仿真李聪颖(湖南城市学院计算机科学系2010届信息管理与信息系统专业,益阳,413000)摘要:无线自组网是一个多跳、临时、可自由移动的无中心网络。

DSR协议分析

DSR协议分析

分类:网络模拟器(NS2)MANET路由协议2013-07-04 11:35 141人阅读评论(0) 收藏举报NS2网络通信Source code :Not all flies in ./dsr/ directory are used by the ns-2. the routing agent is implemented as Agent/DSRAgent.Thus, the source codes include:∙ (h): DSR agent class. major state machine handling routings. Important variables; net_id, mac_id in ID type. (IP and MAC address), both of them are initialzied by tcl commands to set the initla valie, the commads are "addr" amd "mac_addr"∙hdr_(h): define hdr_sr class.∙request_(h)∙Path.h(cc):Path class. First, define struct ID, it has an unsigned long addr a enum of ID_type, and a time stamp t. and then in Path class, ID[] is the key members of the path, and operator [] is defined to return an element of ID array. thus whenever theSRPacket.route[n] will return to the reference of ID[n]. Other member variables include cur_index, len, ∙srpacket.h: Just define SRPacket class which enclose the hdr_sr as a full packet. The SRPacket construct has two parameters, a normal packet and a SR (Source Route) Header (a path variable). The constructor of "path" class makes a path from the bits of an NS source route header. And the other two variables of the SR packet are "dst" and "src" IP addresses.Data Structure for RouteIt is found that srh->addr and p.route are two different structures. srh() is always along with the packet. however, when DSR agent received a packet, it willSRPacket p(packet, srh);This generate a "p" which is frequently used by all other functions. remember p does not go along with the packet leaving dsr agent. Before the packet was sent out of the agent, another statement will be used to update "SRH" in sendOutPacketwithRoutep.route.fillSR(srh);Also, the tap() entry is also generate a p for its use. however, another entry point of agent "xmitFailed" use srh() directly.Special tcl interface.Unless other routing protocol, the ns-2.1b9a,has a special node type named as "SRNodeNew". From those routines in the ns-lib.tcl. We can see that speical. Also, there is a tcl file in mobiloty/dsr.tcl is also related.Simulator instproc create-node-instance args {$self instvar routingAgent_# DSR is a special caseif {$routingAgent_ == "DSR"} {set nodeclass [$self set-dsr-nodetype]} else {set nodeclass Node/MobileNode}return [eval new $nodeclass $args]}Simulator instproc set-dsr-nodetype {} {$self instvar wiredRouting_set nodetype SRNodeNew# MIP mobilenodeif [Simulator set mobile_ip_] {set nodetype SRNodeNew/MIPMH}# basestation dsr nodeif { [info exists wiredRouting_] && $wiredRouting_ == "ON"} {set nodetype Node/MobileNode/BaseStationNode}return $nodetype}DSR Signaling Packets in Brief:∙route-request. the packet itself is a layer 3 packet with a unique destination address, but MAC_Broadcast (labeled in common header's next_hop())∙route-reply: unicasting in both layer 2 and 3.∙route-error. unicasting in both layer 2 and 3. Generated when tx_failure in lower layer.Entry Points for DSR agent:1.first, as normal, the recv() function which means a packet with a address destine to this node or from upper-target.2.xmitFailed(). This is the callback function when a MAC transmission failes. Based on this chance, route-error message generated3.tap(). This is a hidden entry when you turn promiscuous on. snooping the route and shorten the path.Basic functions:∙recv(), the entry for a receving packet. depends on the ip address of the packet and the SR (Source Route) header, call different functions to handle it. like the diagram below:The route-reply, route-request messages need special handling routines written in the handlePacketReceipt() funciton. Note that if the RRequest message reached the destination, the receiptent should send a RReply message, this is done by a functionnamed returnSrcRouteToRequestor(p) which is called in handlePacketReceipt(). Otherwise, if the route-request and route-err ∙or are not destined to us, for route-request, the function handleRouteRequest() is called∙handlePacketReceipt(). A signaling reached its destination. There are two case:o if it is a route-request and "not processed", sends back a route-reply, pkt "p" is forged in this functionand returnSrcRouteToRequestor(p)o if it is a route-reply, call functiuon acceptRouteReply(p);∙handleRouteRequest(): From the version 2.27, we see some unused codes but probably under develop for future versions. It includes more close mac-routing cooperation, such as neighbor identity (is_neighnor()), and channel status (air_time_free()).Basically, this function has three branches:1.already processed, checked by function ignoreRouteRequestp(p).2.has a cached route, done by replyFromRouteCache(p), and "cached route" is enabled by theflag dsragent_reply_from_cache_on_propagating.3.append myself in route with p.route.appendToPath(net_id); and sendOutPacketWithRoute(p, false);handleForwarding. Forward packet on to next host in source route and snooping as appropriate. So, a route-reply message is not treat as exceptional. It is a normal packet with sr header and be snooped by this node. The snooping is enabled by the flag"dsragent_snoop_source_routes" .handleForwarding is dcallin "handleDefaultforwarding" for doing some simple operations for DSR rules. At last, the packet will be sentby sendOutPacketWithRoutesendOutPacketWithRoute: The function is used as for send packets, Take packet and send it out, packet must a have a route in it. return value is not very meaningful. if fresh is true then reset the path before using it, if fresh is false then our caller wants us use a path with the index set as it currently is. Basically,o cmn header's failure callback functon and data are seto cmn header 's next hop is set to addr of next-hop in dsr header. address type are also set.o move the pointer in SR header to the next (increase 1).Actually, the third operation is not valid in real DSR implementations. To undo this effect in error-handing, we'd better find current Ip address first and locate the position of this address in SR header. The other two operations are also invalid, because there are nocommon headers in a real packet. For the "next_hop()" in common header, it is used by DSR only for those packets without valid SR header, refer to recv().returnSrcRouteToRequestor(); this functionxmitFailed(): when the common header->xmit_failure_ point to a callback function, thus, when the packet cannot be delivered, the callback function is used, and finally will generate a route-error messages. There is always a pointer in the SR header curr() . ( Referto manet-ietf-dsr draft, there is no such a pointer in DSR Source Route Option, but has a "segments left" field to indicate how many nodes still to visit to reach the destination. ). Thus, an innovation needs to be done to re-interprete the "srh->cur_addr()" as a index number of the position in the path where fail happens. So, when not all nodes along the path handle the SR header, we need find the ip address of the node from srh. and set that index as cur_addr();processBrokenRouteError(p); This should be another branch under the main recv() entry. It gives what to do when a Route Error message is receoived or heard (snooped). Snoop means the message was sent to another node but it passes myself, so i heard it.tap(const Packet *packet): This is another entry point for DSR. When dsragent_use_tap flag is true. the mac is working in promiscuous mode and all overhearing packets will be processed if there is a SR header in it.Other:The longest route we can handle is defined in : define MAX_SR_LEN 16 // longest source route we can handlePossible Reason for xmit_failure below IP layer:∙arp failure∙interface queue is full∙mac transmission failure ( exceed the retry-limit)DSR scheme options:In the beginning of , it define many bool selectors of some options like:/*************** selectors ******************/bool dsragent_snoop_forwarded_errors = true;// give errors we forward to our cache?bool dsragent_snoop_source_routes = true;// should we snoop on any source routes we see?bool dsragent_reply_only_to_first_rtreq = false;// should we only respond to the first route request we receive from a host?bool dsragent_propagate_last_error = true;// should we take the data from the last route error msg sent to us// and propagate it around on the next propagating route request we do?// this is aka grat route error propagationbool dsragent_send_grat_replies = true;// should we send gratuitous replies to effect route shortening?bool dsragent_salvage_with_cache = true;// should we consult our cache for a route if we get a xmitfailure// and salvage the packet using the route if possiblebool dsragent_use_tap = true;// should we listen to a promiscuous tap?bool dsragent_reply_from_cache_on_propagating = true;// should we consult the route cache before propagating rt req's and// answer if possible?bool dsragent_ring_zero_search = true;// should we send a non-propagating route request as the first action// in each route discovery action?// NOTE: to completely turn off replying from cache, you should// set both dsragent_ring_zero_search and// dsragent_reply_from_cache_on_propagating to falsebool dsragent_dont_salvage_bad_replies = true;// if we have an xmit failure on a packet, and the packet contains a// route reply, should we scan the reply to see if contains the dead link? // if it does, we won't salvage the packet unless there's something aside // from a reply in it (in which case we salvage, but cut out the rt reply) bool dsragent_require_bi_routes = true;// do we need to have bidirectional source routes?// [XXX this flag doesn't control all the behaviors and code that assume // bidirectional links -dam 5/14/98]#if 0bool lsnode_holdoff_rt_reply = true;// if we have a cached route to reply to route_request with, should we// hold off and not send it for a while?bool lsnode_require_use = true;// do we require ourselves to hear a route requestor use a route// before we withold our route, or is merely hearing another (better)// route reply enough?#endifAbout Flow State:It is also desirable to disable the flow state stuff. it make the dsr code messy. flow state is not an orginal idea.static const bool dsragent_enable_flowstate = false;static const bool dsragent_prefer_default_flow = false;About Packet Salvageit's unknown how to complete disable the packet retransmission in layer 3. Even you change three expressions in .1.salvage_with_cache = false (from true)2.salvage_max_request =0 (from 1)3.salvage_times = 0 (from 15)The trace file still show that the routing agent send a undeliverable packet again. See xmitFail() function. I guess, it is necessary to disable "GOD" also.Reference:Bryan's NS-2 DSR FAQ。

基于NS2的AOMDV路由协议的改进与性能仿真

基于NS2的AOMDV路由协议的改进与性能仿真

基于NS2的AOMDV路由协议的改进与性能仿真
李波;潘进;李国朋;韩明奎
【期刊名称】《计算机应用与软件》
【年(卷),期】2010(027)002
【摘要】对AOMDV协议进行了分析,指出了协议存在的不足,利用"一主一备"式路由和抢先式路由对其进行了改进,提出了PAOMDV协议.对NS2(Network Simulator Version2)的分裂对象模型进行了分析,基于NS2实现了AOMDV及PAOMDV路由协议的扩展与仿真.仿真结果表明:在相同的网络环境下,与AOMDV 协议相比,PAOMDV协议减少了平均时延、降低了路由发现频率、提高了分组传送率.
【总页数】4页(P56-58,62)
【作者】李波;潘进;李国朋;韩明奎
【作者单位】西安通信学院网络安全与对抗研究室,陕西,西安,710106;西安通信学院网络安全与对抗研究室,陕西,西安,710106;西安通信学院网络安全与对抗研究室,陕西,西安,710106;西安通信学院网络安全与对抗研究室,陕西,西安,710106
【正文语种】中文
【相关文献】
1.基于NS2的LEACH路由协议及其改进的仿真研究 [J], 丰泽琪;刘二营
2.基于路径服务质量度量的AOMDV改进路由协议 [J], 王训兵;詹永照;王良民
3.基于改进AOMDV路由协议的WSNs拥塞控制和能耗均衡策略 [J], 陈文广;牛玉刚;邹媛媛
4.基于能量均衡的AOMDV路由协议的改进 [J], 胡平;张金钟
5.基于节点负载等级的自组网AOMDV路由协议改进方法 [J], 郭少雄;李正伟;宋志群
因版权原因,仅展示原文概要,查看原文内容请购买。

dsr协议书

dsr协议书

dsr协议书DSR(Dynamic Source Routing)是一种用于无线自组织网络的协议,旨在提供高效的路由和数据传输服务。

DSR协议采用源路由和动态路由的方式,具有较低的延迟和更好的可靠性。

本文将介绍DSR协议的基本原理、路由维护机制和数据传输过程。

DSR协议的基本原理是,在数据传输之前,源节点将整个路由路径打包成路由请求,并广播到整个网络中的节点。

所有收到该请求的节点都将其缓存,并返回给源节点。

源节点收到转发请求后,根据路由表选择一个最佳路径,并建立一条有效的通信路径。

DSR协议的动态路由机制允许节点动态添加和删除,使网络更具鲁棒性。

每个节点都保留一份路由维护表,记录着与其他节点之间的路由关系和可达性信息。

在数据传输过程中,源节点将数据分割成小数据包,并通过路由表选择一个信号强度良好的节点进行数据传输。

在每个传输节点中,会先检查数据包的路由标识,并根据路由表选择下一跳节点。

数据包经过多个节点的传递,直到到达目的节点。

DSR协议的核心思想是源节点维护所有可能的路由路径,并在数据传输之前选择一条最佳路径。

这种方式减少了路由查找的时间,提高了数据传输的效率。

同时,源节点动态维护路由表,适应网络拓扑变化,保证数据的可靠传输。

DSR协议在无线自组织网络中有着广泛的应用。

它适用于节点移动频繁、网络结构动态变化的环境中。

例如,在战场环境中,战士可以通过无线节点进行通信,DSR协议可以有效地为节点之间的数据传输提供支持。

此外,在城市中,智能交通系统也可以使用DSR协议进行车辆之间的通信。

然而,DSR协议也存在一些局限性。

首先,由于路由请求广播到整个网络,可能会浪费大量的网络资源,造成网络拥塞。

其次,由于节点的可靠性和可达性发生变化,可能导致数据传输失败。

最后,由于网络中的节点数量较大,路由查找时间可能会变得较长,降低了整个网络的吞吐量。

为了克服这些问题,可以使用改进的DSR协议,如基于信号强度的路由表更新和跳跃式路由查找。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

基于NS2下的DSR路由协议的研究与优化李志斌陶然摘要:AdHoc网络是当前无线通信领域一种新的、发展迅速的通信技术,由于它不依赖固定的基础通信设施,没有中心控制节点,抗毁性强,因此适用于许多网络布线存在困难的环境。

基于这些特殊优势,Adhoc网络在军事领域中发挥着重要作用,在民用领域也有着很好的应用前景。

DSR协议是专为Adhoc网络设计的一种按需路由控制协议,它以简单有效、网络开销小、算法复杂度不高、支持单向链路等优点而受到广泛的关注,被认为是最有实用前景的Adhoc网络路由协议之一。

NS2(NetworkSimulatorVersion2),是UCBerkeleP开发的一个离散事件驱动的事件模拟器。

它能模拟AdHoc网络路由协议运行的全过程,并把仿真结果输出到一个trace文件中。

通过对trace文件的分析,可以了解到AdHoc网络路由协议运行的状况,从而分析评价路由协议的性能好坏。

本文首先介绍AdHoc网络的基本概念、关键技术和路由协议。

其次,对DSR协议的概念、特点及工作原理给予详细的介绍和分析。

然后在NS2网络仿真模拟平台下建立无线网络模型,以AODV作对比,对DSR和AODV协议仿真模拟,分析评价DSR路由协议性能。

仿真结果表明,同AODV对比,DSR在快速变化的网络拓扑结构中更具优势。

最后文章对DSR协议的优化改进作总结。

关键词:Adhoc,DSR协议,优化,网络仿真,NS2TheresearchandoptimizationofDSRrouteprotocolbasedonNS2LIZhi-bin,TAORanAbstract:AdHocnetworkisanewtechniqueinwirelesscommu nicationfieldwhichdevelopsrapidlPinrecentPears.Asitdoesn otdependonfiGednetworkinfrastructure,andhasnocentralc ontrollingnodeaswellasgoodinresistingdestructions,itisapp licabletomanPsituationsthathavedifficultiesinwiringnetwor ks.Basedonthesespecialadvantages,AdhocplaPsanimporta ntpartinmilitarPapplications,anditalsohasagoodprospectin civilapplications.DSRprotocolisanon-demandroutingproto colthatisspecificallPdesignedforAdhoc.ItattractswidelPatte ntionbecauseofitsadvantagessuchasitssimplicitP,lownetwo rkoverhead,lowalgorithmcompleGitP,supportingunidirecti onalroutesandsoon.SoDSRprotocolwillprobablPplaPanimp ortantroleinfutureAdhocapplication.NS2(NetworkSimulatorVersion2),developedbPUCBerkeleP,i sasimulatordrivenbPdiscreteevents.Itcansimulatearoutingp rotocoloperationprocessofAdHocnetwork,andeGportsimulationresultstoatracefile.Fromthetracefile,wecanknowtheop erationprocessofroutingprotocol,thenanalPzeandevaluatet heperformanceofroutingprotocol.Thispaper,firstofall,introducesthebasicconcept,kePtechnolo giesandroutingprotocolsofAdHocNetwork.SecondlP,forthe concept,featureandworkingprincipleofDSR,thepapergivesadetailedintroductionandanalPsis.Then,toev aluatetheperformanceofDSRandAODV,weestablishedasim ulationplatformofwirelessnetworkmodelbasedontheNS2。

ThesimulatorresultsshowthatcomparedwithAODV,DSRperf ormsbetterinthenetworkwithdPnamictopologP.Atlast,thep aperanalPzestheimprovementandmakesasummarPofDSR. KePwords:AdHoc,DSRprotocol,Optimization,Networksimulation,NS2目录第一章绪论 (1)1.1 Ad hoc网络 (1)1.1.1 Ad hoc网络的产生与发展 (1)1.1.2 Ad hoc网络的特点 (2)1.1.3 Ad hoc网络的应用领域 (3)1.2 Ad Hoc研究的问题和技术挑战 (4)1.2.1进行相关研究的主要大学和组织 (4)1.2.2研究问题和技术挑战 (5)1.3 Ad hoc网络路由协议 (7)1.3.1表驱动路由协议 (8)1.3.2按需驱动路由协议 (10)1.4论文研究的内容和任务 (12)1.4.1研究内容 (12)1.4.1主要任务 (12)1.5本章小结 (13)第二章DSR协议 (16)2.1 DSR协议概述 (16)2.2 DSR协议分组格式 (16)2.3 DSR协议的运行机制 (17)2.3.1 DSR协议的路由发现机制 (17)2.3.1 DSR协议的路由维护机制 (20)2.4 DSR协议的优缺点分析 (21)2.5 DSR协议的优化途径 (23)2.5.1缓存cache 管理优化 (23)2.5.2路由建立过程中捎带数据分组的优化 (24)2.5.3路由请求分组的跳数限制 (24)2.5.4路径自动缩短 (24)2.5.5随机延迟 (25)2.5.6无确认路由修复 (25)2.5.7混合侦听 (25)2.5.8抢修 (26)2.6本章小结 (26)第三章DSR 协议的仿真及性能分析 (28)3.1网络仿真工具NS2 (28)3.1.1 NS2简介 (28)3.1.2 NS2的安装步骤 (28)3.2 Ad hoc网络路由协议在NS2中的实现 (31)3.3 NS2网络基本模拟流程 (33)3.4NS2下DSR代码分析 (35)3.5 DSR和AODV协议仿真比较 (38)3.5.1仿真过程 (38)3.5.2分析比较 (47)3.5.3 仿真结论 (54)3.5DSR协议优化方法 (55)3.7本章小结 (57)第四章总结与展望 (58)参考文献 (60)第一章绪论1.1Adhoc网络1.1.1Adhoc网络的产生与发展我们经常提及的移动通信网络一般都是有中心的,要基于预设的网络设施才能运行。

例如,蜂窝移动通信系统要有基站的支持;无线局域网一般也工作在有AP接入点和有线骨干网的模式下。

但对于有些特殊场合来说,有中心的移动网络并不能胜任。

比如,战场上部队快速展开和推进,地震或水灾后的营救等。

这些场合的通信不能依赖于任何预设的网络设施,而需要一种能够临时快速自动组网的移动网络。

Adhoc网络可以满足这样的要求。

Adhoc网络的前身是分组无线网(PacketRadioNetwork)。

对分组无线网的研究源于军事通信的需要,并已经持续了近20年。

早在1972年,美国DARPA (DefenseAdvancedResearchProjectAgencP)就启动了分组无线网(PRNET,PacketRadioNETwork)项目,研究分组无线网在战场环境下数据通信中的应用。

项目完成之后,DAPRA又在1993年启动了高残存性自适应网络(SURAN,SURvivableAdaptiveNetwork)项目。

研究如何将prnet的成果加以扩展,以支持更大规模的网络,还要开发能够适应战场快速变化环境下的自适应网络协议。

1994年,DARPA 又启动了全球移动信息系统(GloMo,GlobleMobileInformationSPstems)项目。

在分组无线网已有成果的基础上对能够满足军事应用需要的、可快速展开、高抗毁性的移动信息系统进行全面深入的研究,并一直持续至今。

1991年成立的IEEE802.11标准委员会采用了“Adhoc 网络”一词来描述这种特殊的对等式无线移动网络。

在Adhoc网络中,结点具有报文转发能力,结点间的通信可能要经过多个中间结点的转发,即经过多跳(MultiHop),这是Adhoc网络与其他移动网络的最根本区别。

结点通过分层的网络协议和分布式算法相互协调,实现了网络的自动组织和运行。

因此它也被称为多跳无线网(MultiHopWirelessNetwork)、自组织网络(SelfOrganizedNetwork)或无固定设施的网络(InfrastructurelessNetwork)。

1.1.2Adhoc网络的特点Adhoc网络是一种特殊的无线移动网络。

网络中所有结点的地位平等,无需设置任何的中心控制结点。

网络中的结点不仅具有普通移动终端所需的功能,而且具有报文转发能力。

与普通的移动网络和固定网络相比,它具有以下特点:(1)无中心Adhoc网络没有严格的控制中心。

所有结点的地位平等,即是一个对等式网络。

结点可以随时加入和离开网络。

任何结点的故障不会影响整个网络的运行,具有很强的抗毁性。

(2)自组织网络的布设或展开无需依赖于任何预设的网络设施。

结点通过分层协议和分布式算法协调各自的行为,结点开机后就可以快速、自动地组成一个独立的网络。

(3)多跳路由当结点要与其覆盖范围之外的结点进行通信时,需要中间结点的多跳转发。

与固定网络的多跳不同,Adhoc网络中的多跳路由是由普通的网络结点完成的,而不是由专用的路由设备(如路由器)完成的。

(4)动态拓扑Adhoc网络是一个动态的网络。

网络结点可以随处移动,也可以随时开机和关机,这些都会使网络的拓扑结构随时发生变化。

相关文档
最新文档