您好,欢迎访问三七文档
FundamentalsofWirelessSensorNetworksTheoryandPractice课程设计报告班级:学号:姓名:老师:电话:邮箱:年月日目录实习一..........................................................................................................................................11.ns-3安装...........................................................................................................................11.1ns-3开发环境设置..................................................................................................11.2Downloadinns-3UsingMercurial...............................................................................21.3Buildingns-3................................................................................................................31.4testingns-3..................................................................................................................31.5runningascrip.............................................................................................................42.BuildingaWirelessNetworkTopology.............................................................................52.1代码分析....................................................................................................................52.2运行结果..................................................................................................................133.3抓包分析..................................................................................................................153.ArealExample.................................................................................................................213.1代码分析..................................................................................................................213.2运行结果..................................................................................................................26实习二........................................................................................................................................304.AODV分析......................................................................................................................30实习三........................................................................................................................................345.DTMN的翻译.................................................................................................................346.ONE的分析....................................................................................................................396.1配置..........................................................................................................................406.2安装运行...................................................................................................................406.3default_setting..........................................................................................................417.Epidemic和PRoPHET.....................................................................................................48无线传感网报告1实习一1.ns-3安装本次实验是在虚拟机上完成,所使用的系统是ubuntu,下面是ns-3安装的详细说明。ns-3是一个离散事件驱动网络模拟器,不支持ns-2的API。ns-3是完全用C++编写的(也有可选的Python接口)。ns-3的一些名词解释:◆POSIX:PortableOperatingSystemInterface,一组操作系统API的协议/标准簇,最开始为了Unix系统上的可移植性而开发的,也适用于其他操作系统。◆Doxygen:DocumentationGenerator,支持C++、C、Java、Objective-C、Python、IDL、Fortran、VHDL、C#等各种语言的文档生成器,用于从源代码中生成说明文档。◆nam:NetworkAnimator,基于Tcl/TK的网络动画演示工具,能提供拓扑和包级别的动画以及数据流观察。◆Mercurial,ns-3代码维护使用的源码版本控制管理系统。◆Waf,ns-3项目使用的新一代的基于Python的构建系统。◆WireShark,一种GUI包嗅探器,由于ns-3能生成.pcap文件,因此可以使用类似于WireShark的软件对数据进行分析。◆tcpdump,另一种包嗅探器,在linux下使用CLI进行数据分析。1.1ns-3开发环境设置sudoapt-getinstallgccg++python//C++和python安装,必装sudoapt-getinstallmercurial//NS3代码维护使用的源码版本控制管理系统sudoapt-getinstallbzr//运行python绑定ns-3-dev需要bazaar这个组件sudoapt-getinstallgdbvalgrind//调试工具sudoapt-getinstallgsl-binlibgsl0-devlibgsl0ldbl//支持更多精确WIFI模块的GNUScientificLibrary(GSL)sudoapt-getinstallflexbison//仿真必需的词法分析器和语法分析生成器,必无线传感网报告2装sudoapt-getinstallg++gcc//一些NetworkSimulationCradle(nsc)stacks需要gccsudoapt-getinstalltcpdump//读取pcap的packettraces,即包嗅探器sudoapt-getinstallsqlitesqlite3libsqlite3-dev//支持统计特性的数据库软件sudoapt-getinstalllibxml2libxml2-dev//xml的配置存储软件sudoapt-getinstalllibgtk2.0-0libgtk2.0-dev//基于GTK的配置系统sudoapt-getinstallvtunlxc//在虚拟机andns-3上测试sudoapt-getinstalluncrustify//支持utils/check-style.py代码风格检查程序sudoapt-getinstalldoxygengraphvizimagemagick//文档生成器sudoapt-getinstalltexinfodiatexlive-latex-extratexlive-extra-utils//文档生成器texlive-generic-recommended//ns-3手册和tutorial编写查看工具sudoapt-getinstallpython-pygraphvizpython-kiwipython-pygoocanvaslibgoocanvas-dev//Gustavo'sns-3-pyviz的可视化软件sudoapt-getinstalllibboost-signals-devlibboost-filesystem-dev//支持openflow模块(requiressomeboostlibraries)1.2Downloadinns-3UsingMercurial作为练习,我们首先在home目录下建立一个目录并取名为repos,用来存放本地Mercurial源码库,如果使用如下的方法,可以在Linux的shell中下载到一份ns-3-allinone软件包(假定你已经安装了Mercurial):cdmkdirreposcdreposhgclone无线传感网报告3./download.py-nns-3-dev1.3Buildingns-3本次使用build.py编译。./build.py--enable-examples--enable-tests1.4testingns-3./test.py–ccore无线传感网报告41.5ru
本文标题:无线传感网报告
链接地址:https://www.777doc.com/doc-4963542 .html