目前,ns支持由Don Libes开发的OTcl调试器tcl-debug,可以在网站 http://expect.nist.gov/tcl-debug 上下载。 安装步骤如下: 1. 将下载的tar包拷贝到与ns平行的目录下,例如/home/romeo/ns2/ns-allinone-2.30/下,使用命令tar -zxvf tcl-debug.tar.gz 进行解压 2. 进入解压时创见的目录tcl-debug-2.0,运行命令 ./configure --prefix=/home/romeo/ns2/ns-allinone-2.30 --with-tcl=/home/romeo/ns2/ns-allinone-2.30/tcl8.4.13/u...
by 刘健 - 网络技术文档中心 - 2008-10-16 17:20:44 阅读(1342) 回复(0)
一.cbrgen(~ns/indep-utils/cmu-scen-gen) cbrgen用来生成传输负载,可以产生TCP流或者CBR流。 使用方法如下: ns cbrgen.tcl [-type cbr|tcp] [-nn nodes] [-seed seed] [-mc connections] [-rate rate] -type tcp流或cbr流 -nn 节点数 -mc 节点间的最大连接数 -rate 每个连接间的流的负载数 -seed 指定随机数种子 二.s...
ns2在Win系统中三种调试方法 ns2是开源的,因此其基本的编译和调试工具为GCC和GDB,不管你是将它安装在window、linux中。在window系统中,GCC和GDB比较的承载平台为Cygwin。因此在window中使用ns2一般建议大家先安装Cygwin,注意你必须安装GCC和GDB。在此前提下,你可以选择的调试方式有三种。 1、直接使用GDB,在Cygwin现在版本中,它包含的GDB包有两种分别是2006XXX和2004XXX,它们都是基于命令行的方式。据说早期的GDB中有图形调...
大概分几类,1)分析trace;2)场景制作;3)结果绘图;4)awk和sh脚本等等 1. 分析Trace NAns - Network Analyzer for Network Simulator ns2 –By Java http://www.geocities.com/ankurjain009/projects.htm NAns is the utility which brings all these features into one and from now on wards, strives to eliminate all the problem associated with it. TRACEGRAPH - Network Simulator ns-2 trace files analyzer ...
cbr set interval_ 0.005 设置时间间隔 $cbr set random_1 设置噪声 改变无线网络中 802.11 的能量状态 # Pt_ = 8.5872e-4; // For 40m transmission range. # Pt_ = 7.214e-3; // For 100m transmission range. # Pt_ = 0.2818; // For 250m transmission range. # Pt_ = pow(10, 2.45) * 1e-3; // 24.5 dbm, ~ 281.8mw Phy/WirelessPhy set Pt_ 8.5872e-4 (1)移动场景的建立 使用命令:./ setdest -n 10 -p 0 -M 10 -t 500 -x ...
ns学习 ns学习笔记 1、tcl只支持一种数据结构:字符串(string)。所有的命令、命令的所有参数、命令的结果、所有的变量都是字符串。 基本语法为: command arg1 arg2 arg3... 2、# 是注释符号 3、tcl中通过空白字符分段表示不同的字符串,而使用花括号或双引号来把多个字符串组合在一起形成一个字符串。 两种组合的区别仅仅在于双引号内允许进行替代,而花括号内不会进行替代。 example:...
# 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) ...
# wrls1.tcl # A 3-node example for ad-hoc simulation with DSDV # 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/DropT...