博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
fedora ns3_在Fedora Linux上安装ns-2和ns-3
阅读量:2519 次
发布时间:2019-05-11

本文共 2864 字,大约阅读时间需要 9 分钟。

fedora ns3

ns is a discrete-event network simulator targeted primarily for research and educational use. There are two version of ns, and , which are quite different with each other in the implementation and method to use them. In this post, we introduce how to install and on Fedora 15.

ns是主要用于研究和教育用途的离散事件网络模拟器。 ns有两种版本,即和 ,它们在实现和使用它们的方法上彼此完全不同。 在本文中,我们介绍如何在Fedora 15上安装和 。

在Fedora上安装ns-2.34 (Install ns-2.34 on Fedora)

Download the allinone package

下载allinone软件包

$ wget http://downloads.sourceforge.net/project/nsnam/allinone/ns-allinone-2.34/ns-allinone-2.34.tar.gz

Uncompress the pacakge

解压缩pacakge

$ tar xf ns-allinone-2.34.tar.gz

Install needed pacakges

安装所需的功能

# yum install gcc make libX11-devel libXt-devel libXmu-devel

Ns-2 requires older version of gcc. So we install gcc-34 and gcc-34-c++ for it

Ns-2需要较旧版本的gcc。 所以我们为此安装了gcc-34和gcc-34-c ++

# yum install compat-gcc-34 compat-gcc-34-c++

Install the allinon package of ns-2. During the install process, specify the CXX compiler we use

安装ns-2的allinon软件包。 在安装过程中,指定我们使用的CXX编译器

$ cd ns-allinone-2.34$ CXX=g++34 ./install

Configure the environmental variables for ns-2 and nam, and add the executables to the PATH so that we can use ns and nam directly.

为ns-2和nam配置环境变量,并将可执行文件添加到PATH,以便我们可以直接使用ns和nam。

Add to ~/.bashrc if you use bash

如果使用bash,请添加到〜/ .bashrc

NS_HOME=/full/path/to/ns-allinone-2.34PATH=$NS_HOME/bin:$NS_HOME/tcl8.4.18/unix:$NS_HOME/tk8.4.18/unix:$PATHexport PATH

or

要么

Add to ~/.cshrc_user if you use c shell

如果使用c shell,请添加到〜/ .cshrc_user

setenv NS_HOME "/full/path/to/ns-allinone-2.34"setenv PATH "${PATH}:${NS_HOME}/bin:${NS_HOME}/tcl8.4.18/unix:${NS_HOME}/tk8.4.18/unix"setenv LD_LIBRARY_PATH "${NS_HOME}/otcl-1.13:${NS_HOME}/ns-2.34/lib:/usr/local/lib"setenv TCL_LIBRARY "${NS_HOME}/tcl8.4.18/library"

The installation is done by this step. Open another shell and try our installation:

通过此步骤完成安装。 打开另一个外壳,然后尝试安装:

$ nam

and

$ ns

在Fedora上安装ns-3.12.1 (Install ns-3.12.1 on Fedora)

Install needed packages

安装所需的软件包

# yum install libxml2 libxml2-devel gcc gcc-c++ make automake autoconf binutils openssh-server openssh-clients openssl python python-devel mercurial bzr scons flex bison tcpdump valgrind gdb

Download the allinone pacakge for ns-3

下载适用于ns-3的allinone pacakge

$ mkdir tarballs$ cd tarballs$ wget http://www.nsnam.org/release/ns-allinone-3.12.1.tar.bz2$ tar xjf ns-allinone-3.12.1.tar.bz2

Build ns-3

版本ns-3

$ cd ns-allinone-3.12.1/$ ./build.py

We will now interact directly with Waf in the ns-3.12.1 directory

现在,我们将直接在ns-3.12.1目录中与Waf进行交互

$ cd ns-3.12.1

Configuration with Waf

用Waf配置

$ ./waf -d optimized configure --enable-examples; ./waf

Validate our installation by running one example

通过运行一个示例来验证我们的安装

$ ./waf shell$ cd build/optimized/examples/$ udp/udp-echo

Use tcpdump to display the simulation result

使用tcpdump显示模拟结果

$ tcpdump -tt -r udp-echo-0-1.pcap

翻译自:

fedora ns3

转载地址:http://hmowd.baihongyu.com/

你可能感兴趣的文章
[模板] 最大流和费用流分别的两种做法
查看>>
python 最大连续子数组的和
查看>>
Python中的闭包
查看>>
05.if else format
查看>>
如何从Eclipse官网下载我们想要的版本
查看>>
js获取spn里面的东西
查看>>
Mongodb之增删改查操作
查看>>
elasticsearch 索引,更新,增量更新,不停机修改升级 ,简单使用
查看>>
前端生成二维码图片以及条形码图片
查看>>
LA4794 分享巧克力
查看>>
《梦断代码》第四阶段阅读感想(包括第9、10、11共三章)
查看>>
OpenCV4Android 之 OpenCV4Android SDK
查看>>
serialVersionUID作用
查看>>
解决无法访问U盘打开提示拒绝访问的问题
查看>>
unicode 字符串。互相准换
查看>>
分组加密算法CBC模式的 Padding Oracle Attack 与 Hash算法的Length Extention Attack 小记...
查看>>
虚拟基类的初始化
查看>>
C++中析构函数为什么要是虚函数
查看>>
【转】记录pytty用户名和密码
查看>>
Django Rest Framework 视图和路由
查看>>