• PUDN用户
    了解作者
  • Others
    开发工具
  • 1KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 160
    下载次数
  • 2008-01-05 11:17
    上传日期
ns2 tcl 仿真AODVad hoc 路由协议
NS2AODV.rar
  • www.pudn.com.txt
    218B
  • NS2AODV.txt
    2.1KB
内容介绍
# Define options set val(chan) Channel/WirelessChannel ;# channel type set val(prop) Propagation/TwoRayGround ;# radio-propagation model set val(netif) Phy/WirelessPhy ;# network interface type set val(mac) Mac/802_11 ;# MAC type set val(ifq) Queue/DropTail/PriQueue ;# interface queue type set val(ll) LL ;# link layer type set val(ant) Antenna/OmniAntenna ;# antenna model set val(ifqlen) 50 ;# max packet in ifq set val(nn) 50 ;# number of mobilenodes set val(rp) AODV ;# routing protocol set val(x) 1000 ;# X dimension of topography set val(y) 500 ;# Y dimension of topography set val(stop) 100 ;# time of simulation end set ns_ [new Simulator] # 命名规则: # 协议名-节点数-暂停时间-序号(-文件类型).(tr/nam…) set tracefd [open Tracefd-1-AODV-10-0 w] #set windowVsTime2 [open Win-1-AODV-10-0 w] #set namtrace [open Nam-1-AODV-10-0 w] $ns_ trace-all $tracefd #$ns_ namtrace-all-wireless $namtrace $val(x) $val(y) # set up topography object set topo [new Topography] $topo load_flatgrid $val(x) $val(y) set god_ [create-god $val(nn)] # # Create nn mobilenodes [$val(nn)] and attach them to the channel. # # configure the nodes $ns_ node-config -adhocRouting $val(rp) \ -llType $val(ll) \ -macType $val(mac) \ -ifqType $val(ifq) \ -ifqLen $val(ifqlen) \ -antType $val(ant) \ -propType $val(prop) \ -phyType $val(netif) \ -channelType $val(chan) \ -topoInstance $topo \ -agentTrace ON \ -routerTrace ON \ -macTrace OFF \ -movementTrace ON for {set i 0} {$i < $val(nn) } { in for {set i 0} {$i < $val(nn) } { incr i } { set node_($i) [$ns_ node] } # # nodes: 50, max conn: 10, send rate: 0.125, seed: 1.0 # # #Total sources/connections: 7/10 # # # nodes: 50, pause: 0.00, max speed: 20.00, max x: 1000.00, max y: 500.00 # # Telling nodes when the simulation ends for {set i 0} {$i < $val(nn) } { incr i } { $ns_ at $val(stop) "$node_($i) reset"; } # ending nam and the simulation #$ns_ at $val(stop) "$ns_ nam-end-wireless $val(stop)" $ns_ at $val(stop) "stop" $ns_ at 100.01 "puts \"end simulation\" ; $ns_ halt" proc stop {} { global ns_ tracefd #namtrace $ns_ flush-trace close $tracefd #close $namtrace } $ns_ run
评论
    相关推荐
    • AODV.zip
      AODV路由ns2 tcl脚本,30节点。
    • NS2-AODV-TCL.zip
      AODV on NS2, network simulation
    • AODVNS2环境下源文件
      AODV协议在NS2下的源文件 内含详细中文注释 包括(1) aodv.h (2aodv.cc (3) aodv_mcast.cc (4) aodv_mtable.h (5) aodv_mtable.cc (6)aodv_mtable_aux.h (7)aodv_mtable_aux.cc (8)aodv_packet...
    • AODV路由协议NS2仿真
      Linux下(redhat9)NS安装具体方法及疑问解答 自己做的AODV仿真tcl文件以及分析报告(包括NAM仿真结果图)
    • aodv.rar
      NS2AODV源代码 包含我自己的一些注释
    • ns2下的aodv源码
      ns2下对aodv协议的完整实现,C++实现
    • AODV+.rar
      AODV+算法可以将AODV用作adhoc路由协议,用于模拟ns-2中的有线和无线场景
    • ns2aodv.rar
      Network Simulation : AODV program on ns2.
    • AODV-ns2.zip
      AODV (Ad-hoc On-demand Distance Vector) is a loop-free routing protocol for ad-hoc networks.
    • NS2example.rar
      在ns2下实现无线传感器网络仿真,多个节点进行网络活动