Latest stable release: ns-3.6 (October 21st, 2009)
http://www.nsnam.org/news.html
http://www.nsnam.org/releases/ns-allinone-3.6.tar.bz2
Ipv4GlobalRoutingHelper::PopulateRoutingTables ();
のところで出てたエラー解消
./waf
./waf --run scratch/mytest
実行まで完了
ns-allinone-3.5.1ディレクトリに.pcapファイルが生成される
解析はtcpdumpコマンドか何かで行う
とりあえず環境の構築はこれでできたのかな?
wget http://www.nsnam.org/releases/ns-allinone-3.5.1.tar.bz2
tar xjvf ns-allinone-3.5.1.tar.bz2
cd ns-allinone-3.5.1
./build.py
cd ns-3.5.1
./waf --check
./waf --regression
./waf --run scratch/simple
前回と同じ環境でビルドとテストを完了
6 Building Topologies
6.1 Building a Bus Network Topology
cmd.AddValue (‘‘nCsma’’, ‘‘Number of \"extra\" CSMA nodes/devices’’, nCsma);
cmd.AddValue (‘‘verbose’’, ‘‘Tell echo applications to log if true’’, verbose);
PDFファイルのチュートリアルの中からソースをコピペしたらエラー
‘‘とかは"に変更
Ipv4GlobalRoutingHelper::PopulateRoutingTables ();
のところで,未定義ですよのエラー
なんか探しても発見できない・・・
ns-3.3だとだめで,
allinone-3.5.1のほうを探すと見つかるってことは,こっちを入れろってことなのかな??
とりあえずallinone-3.5.1のビルドを開始
参考資料
・クラスリスト
http://www.nsnam.org/doxygen/annotated.html
・チュートリアル
http://www.nsnam.org/docs/release/tutorial.pdf
■ソースはscratchディレクトリに入れる
cp myfirst.cc ns-3.3/scratch/myfirst.cc
■ビルド
ns-3.3ディレクトリに移動
./waf
■実行
./waf --run scratch/myfirst
Fedora 10を利用(VMWare Server 1.0.9 上にインストール)
■Fedoraインストール時に一緒に入れたパッケージ
・開発ツール
・エディタ
・GNOMEデスクトップ環境
・グラフィックス
・Xソフトウェア開発
・他にも関係なさそうなのをいくつか
■yumで入れたもの
bison
bzr
doxygen
flex
gdb
goocanvas
goocanvas-devel
graphviz
graphviz-python
gtk2-devel
ImageMagick
libxml
libxml2
mercurial
pygoocanvas
python
python-devel
python-kiwi
sqlite-devel
valgrind
はたして上記のパッケージが全部いるのか,他に必要なものが無いのかは分らない.
■SELinuxの停止
・SELinuxを止めるか,別の設定を加えないと下のようなエラーが出る.(./waf --regressionのところで)
cannot restore segment prot after reloc: Permission denied
/etc/selinux/config
SELINUX=enforcingを
↓
SELINUX=disabledに変更
再起動
■ダウンロードとインストール
wget http://www.nsnam.org/releases/ns-3.3.tar.bz2
tar xjvf ns-3.3.tar.bz2
cd ns-3.3
./waf --enable-nsc configure
./waf
./waf check
./waf --regression
./waf --run hello-simulator
これで一応テストまでは通った.
参考資料
http://www.nsnam.org/
http://www.nsnam.org/docs/release/tutorial.pdf
http://www.nsnam.org/wiki/index.php/Installation
http://www.aida.k.u-tokyo.ac.jp/~saeki/hiki/?ns-3