-1

我想问一下是否可以在 ns 输入中添加一些数据包文件,如 .pcap 或 .txt(数据包统计)。例如,如果我想向设备接口插入一些数据包。ns2 / ns3可以吗?

谢谢

4

1 回答 1

0

是的,ns2 有可能.. 不确定 ns3.. 为了在 ns2 中执行此操作,您需要在 ns2 中启用“仿真”。模拟 ns2 -- 1. 在终端中.. 切换到 root 模式 2. 在您的 ns2 安装中移动到目录“ns-2.35”。3.运行'make nse' 4.运行'./configure',仿真在ns2中被激活。现在在您的 tcl 文件中 1. 创建一个 Tap Agent,例如“ set tap1 [new Agent/Tap] ”。2. 创建一个网络对象,例如 ' set nob [new Network/Pcap/File];3. 提供 Pcap 文件的路径,例如“$nob open readonly Real/xplico_youtube_mail.pcap ”,该文件位于给定路径的 ns-2.35 文件夹中。4. 在 Tap Agent 中,提供网络代理为 network.. $tap1 network $nob $ns attach-agent $node_(0) $tap1; 5.

于 2014-12-08T07:14:08.220 回答