`
文章列表
SRM using NS-2     这一节给出一个关于在NS中实现SRM的概况。运行一个SRM模拟需要 建立并配置代理creating and configuring the agent 添加一个应用层的数据源application level data source (a traffic generator) 启动代理和流量产生器starting the agent and the traffic generator   The key steps in configuring a virgin SRM agent are to assign its multicast group ...
Web Server Example (Obsolete: work with ns-2.1b4a)   Web Server模拟脚本和网络拓扑。 脚本文件"ex-web.tcl"和"dumbbell.tcl" (This example is from the 5th VINT/NS Simulator Tutorial/Workshop). Note that you should change the path for "http-mod.tcl" at the begining of the script to an appro ...
Multicasting Example (Obsolete: work with ns-2.1b4a)   multicasting例子的模拟脚本和NAM中模拟的截图, 模拟脚本"ex-mcast.tcl".    Figure 33. The NAM screen capture of the multicasting simulation     # Polly Huang 8-7-98 set ns [new Simulator] $ns multicast set f [open out.tr w] $ns trace-all $f $ns namtrace- ...
LAN Example (Obsolete: work with ns-2.1b4a)   LAN例子的模拟脚本并演示了它的网络拓扑和模拟场景。 模拟脚本 "ex-lan.tcl"。    Figure 32. LAN simulation network topology and scenario     # Author: Jae Chung # Date: 7/20/99 # # This file is modified from # "ns-2/tcl/ex/lantest.tcl" set opt(tr) "out.tr&q ...
Mini-HOWTO: Pareto On/Off Traffic Generator   描述 Description   Pareto(柏拉图) On/Off Traffic Generator (POO_Traffic) 是一种流量生成器traffic generator (一种应用程序) 包含在OTcl类Application/Traffic/Pareto。 POO_Traffic产生网络流量依照Pareto On/Off distribution。 数据包在闭合周期(on periods)内以固定的速率发送, 并且在间歇期间(off period)停止发包。 on和off perio ...
Add New Queue (Tested with ns-2.1b8a, ns-2.1b9a and ns-2.26)   目标 Objective   建立一个简单的drop-tail router output queue, 这个队列使用round-robin dequeue scheduling 在priority 15数据包 (from a "MmApp" over "UDPmm")和队列中其他数据包上。 当priority 15 包和其他包在队列中共存时, 它让每一类中在队列中时间最长(oldest)的数据包依次出列。       设计 D ...
Add New Application and Agent (Tested with ns-2.1b8a, ns-2.1b9a and ns-2.26)     目标 Objective 建立一个运行在UDP连接上的多媒体应用, 它模拟了一个虚构的多媒体应用的行为, 这个应用实现了5种媒体缩放比率("five rate media scaling")为的 ...
OTcl Linkage 联接     添加新的基础网络对象去扩展NS,通常需要从C++代码中得到OTcl linkage(联接), 对象的类用C++来编写由于它的高效性。 本节介绍了NS中C++/OTcl联接, 并给出新建一个简单的名叫"MyAgent"代理的示例,"M ...
Where to Find What? 了解什么信息保存在什么文件夹或文件中。Figure 17 说明了部分的模拟程序的文件夹结构(ns-allinone-2.1b package)。  Figure 17. NS Directory Structure   ns-2 存放了所有的模拟程序的实现代码(不论C++ 还是OTcl 代码), 测试验证(validation test)的OTcl脚本和 example OTcl scripts。 tcl 文件夹下存放全部的OTcl代码和test/example脚本,还有大部分C++代码去实现event scheduler和基本网络组件对象类(除了与W ...
Trace Analysis Utilities 这里收集了几个非常有用到的追踪分析工具:     用于提取信息列的perl工具"column"。 它把输出的文本分成多个列,并用空白隔开。 perl脚本stats.pl 打印一些stats沿着瓶颈连接(node 1 to node 2在这例子中,例子输出文件stats.tr)。运行命令: stats.pl -l1 1 -l2 2 -max 1.5 stats.tr. tunneled shell command jitter.sh结合上awk, 用来计算CBR traffic jitter在接收节点(n3)通 ...
RED Queue Monitor Example     Example 5中OTcl脚本建立了网络拓扑并运行Figure 15所描述的模拟场景。   备注RED队列可以持有最多25个数据包用于连接r1-r2, 并且我们可以看到RED队列如何通过测量当前队列大小和平均队列大小的动态变化来运行。  Figure 15. RED Queue Monitor Example Setup  Example 5. RED Queue Monitor Simulation Script     上面的脚本中要注意到 高级的模拟对象的成员函数create-connection用来建立TCP连接。  ...
Trace Analysis Example     #Create a simulator object set ns [new Simulator] #Define different colors for data flows (for NAM) $ns color 1 Blue $ns color 2 Red #Open the NAM trace file set nf [open out.nam w] $ns namtrace-all $nf #Open the Trace file set tf [open out.tr w] $ns trace-all $tf #Defi ...
数据包 Packet     一个NS数据包包含一个报头的堆栈头文件和一个可选的数据空间(见 Figure 12)。"Simple Simulation Example"小节中简要提到, 数据包的报头格式被初始化在创建模拟对象Simulator object后, 所有已注册(或可能用到)的报头,比如 common header通常被任何需要它的对象使用、IP header、TCP header、RTP header (UDP使用RTP header)和 trace header, 并且每个报头的位移(offset of each header)在堆栈中记录。这样做的意义是无 ...
Network Components 网络组件   Figure 6 显示了NS中部分OTcl类的等级结构。     Figure 6. Class Hierarchy (Partial)   层级的根节点是TclObject 类, 它是所有OTcl 库对象(scheduler, network components, timers and the other objects including NAM related ones)的超类superclass。NsObject类是所有基础网络组件对象的超类,它负责处理数据包,也可以用于构成复合的网络对象(compound network obje ...
Event Scheduler     NS的离散的事件调度机制。 事件调度机制的主要用途是网络组件模拟包处理时的延迟或计时器。Figure 5 演示每个网络对象使用一个事件调度器。 注意一个网络对象发起一个事件后,这个事件将交给同一个对象( ...
Global site tag (gtag.js) - Google Analytics