ns3博客资源
ns3仿真之两个节点之间通信加入背景流量
http://blog.csdn.net/mary19920410/article/details/72817846
NS3学习资料
http://blog.csdn.net/yanerhao/article/details/53335562
NS3 Tracing System
http://blog.csdn.net/yanerhao/article/details/53304216
Ubuntu中利用GNUPLOT画NS3产生的数据
http://blog.csdn.net/yanerhao/article/details/53215593
NS3 seventh.cc为例说明Probe
http://blog.csdn.net/yanerhao/article/details/53930373
以wifi-example-sim.cc为例说明NS3统计数据模型
http://blog.csdn.net/yanerhao/article/details/53979539
NS3命令行学习
http://blog.csdn.net/yanerhao/article/details/53436774
浅析ns3之OnOffApplication类
http://blog.csdn.net/mary19920410/article/details/71641305
NS3中,./waf –run “自定义文件夹”(脚本以及模拟场景都放在该自定义的文件夹内)
http://blog.csdn.net/xdf191/article/details/53340435
ns3中调试程序——命令行、gdb和logging系统
http://blog.csdn.net/xdf191/article/details/53400614
NS3网络仿真(8): 实时仿真
http://blog.csdn.net/lights_joy/article/details/47322513
NS3网络仿真(7): Wifi节点
http://blog.csdn.net/lights_joy/article/details/46868631
[NS3]Openflow Modle安装
http://blog.csdn.net/roger__king/article/details/9272141
NS3仿真wifi网络环境 - NS3中无线节点的通信传输范围如何设置?
http://blog.csdn.net/ztguang/article/details/71107037
浅析NS3中各个流量发送应用的异同(UdpEcho, OnOffApplication, BulkSend)
http://blog.csdn.net/xinwenfei/article/details/72599103
关于NS3中各个WifiRemoteStationManager(一)
http://blog.csdn.net/xinwenfei/article/details/70266320
全双工无线通信在ns3上的实现
http://blog.csdn.net/u013712533/article/details/60136444
NS-3上下行链路丢包仿真
http://blog.csdn.net/u014565333/article/details/53886515
NS-3 模拟FTP数据流
http://blog.csdn.net/u014565333/article/details/53419429
ns3 installation
https://www.nsnam.org/wiki/Installation
———————-9月30日 更————————————-
在使用FlowMonitor
模块的时候,关于include哪个头文件的问题。
当我
#include "ns3/flow-monitor-module.h"
的时候,给我报错。
error: ‘ns3::FlowMonitorHelper::FlowMonitorHelper(const ns3::FlowMonitorHelper&)’ is private
还有../scratch/goal-topo.cc:164:84: error: within this context
Simulator::Schedule (nSamplingPeriod, &CheckThroughput, flowmon, monitor, dataset);
当我
#include "ns3/flow-monitor-helper.h"
的时候,又给我报这个错误。
不知道到底是什么鬼。。。
以上已解决。
去掉Simulator::Stop(stopTime);
之后
Simulation不会停止,而且不能显示吞吐量。
把Simulator::Schedule()从CheckThroughput()函数里拿出来放到main()之后
依然不能测得吞吐量。
———————–9月24日更————————————-
今天临晨试着在ubuntu-14.04上再装一下openflow integration。最后用另外一种方式./bake
安装好了openflow integration.
记住目录结构是这样的。
草!终于尼玛安装成功了。
———————–9月24日更————————————–
Links
参考:
http://www.cnblogs.com/yibobo-blog/p/4924340.html
ns-3的API:
https://www.nsnam.org/docs/release/3.17/doxygen/
一些学习的视频:
ns3 overview
ns3share’s channel
tutorial-ns3
Building Simple Network Topologies p2
Main
——————7月8日更新———————————–
我拿着这个bug在网上半天找不到答案,突然找到一个Google Group里面的回答,发现跟我之前装ns3的方式不一样。于是在之前ns3的兄弟目录装了一个他们说的那种版本的ns3.
http://mailman.isi.edu/pipermail/ns-bugs/2015-February/011975.html
并按照这里面的内容改了一下几个文件(其实就是在一个.cc文件里面include了某个头文件,而在另一个文件.h里取消了include那个头文件,然后改了一下wscript)。
编译这两千个.cc文件也是不简单给ubuntu的2.2G内存用完了,结果还碰到一个g++编译器的问题,得用swap,于是在本来就不多的硬盘上给了1G用作swap,sudo dd if=/dev/zero of=/swapfile bs=64M count=16
,sudo mkswap /swapfile
。编译完成之后删除
sudo swapon /swapfilesudo swapoff /swapfile
。其实就是在『bindings/ns3module.cc』这个文件编译的时候超级吃内存(感觉得要2G),这种文件编译完了立马内存就释放了。
sudo rm /swapfile
http://skypacer210.github.io/2014/12/26/building-ns-3-on-ubuntu/
OK,在这种下载ns3的方式下,编译成功了。
————————-我是分割线——————————–
最近准备建一些混杂的拓扑(有WIFI,有点对点,有CSMA以太网),但是OpenNet这个库是刚出来的,有一些小bug,不太好用,于是跟Gilani交流后,他说ns-3可以做,于是我上网找了一些视频开始学习。
看视频里面的代码的一个示例:tutorial4.cc
这里是要建立的拓扑:
实际上每个节点(由NodeDeviceContainer
建立的)是按照创建顺序然后依次排入一个NodeList
中,用来为没个节点建立数字索引。
每个网卡(API里面叫NetDevice
,比如回环网卡LoopbackNetDevice
, 点对点网卡PointToPointNetDevice
等)
一个物理的网络设备可以有安装多个网卡
————————–9月1日————————-
现在要监控网络流量,测速。要用到ns3/flow-monitor-helper.h
。
但是网上看到的例子
https://groups.google.com/forum/#!topic/ns-3-users/9_X3qWt3dBI里面碰到一个issue。
然后发现可以这样解决。
For ns-3.15 or later, you should be doing instead:
onOffHelper.SetAttribute (“OnTime”, StringValue
(“ns3::ConstantRandomVariable[Constant=20]”));
This was an API change from ns-3.14 to ns-3.15.
https://groups.google.com/forum/#!topic/ns-3-users/iG9Y3KBx29U
————-9月18日 更————————–
设置NS_LOG
环境变量
原来得在命令行里设置环境变量,那些NS_LOG_INFO()
才会生效。
$ export NS_LOG=GoalTopoScript=info
其中GoalTopoScript
这个值是在我的那个goal-topo.cc
文件开头定义的。
// 用于命令行操作 `$ export NS_LOG=GoalTopoScript=info`
NS_LOG_COMPONENT_DEFINE ("GoalTopoScript");
设置好NS_LOG
环境变量之后,再运行,就可以看到NS_LOG_INFO()
的消息了。
————————9月20日 更—————————–
『./ns3/log-macros-enabled.h:156:11: error: ‘g_log’ was not declared in this scope』
当我运行
$ ./waf --run wifi-wired-bridging
的时候,他给我报这个错。
查了下google groups里面说的,
https://groups.google.com/forum/#!topic/ns-3-users/i9HijXJADKU
原来是没有在using namespace ns3
和int main()
之间加
NS_LOG_COMPONENT_DEFINE ("wifiWiredBridgingScript");
加上之后,果然编译成功了。
然后查看一下.pcap抓包文件。
$ tcpdump -tt -nn -r wifi-wired-bridging-0-2.pcap |grep -E "192.168.0.6|192.168.0.2"
#或者 grep -e "192.168.0.6" -e "192.168.0.2"