版本: ns-3 3.21
OS: CentOS6.5
Python: 2.6.6
预置条件安装:
1151 sudo yum install libgtk2.0-0 libgtk2.0-dev
1152 sudo yum install gdb valgrind
1153 sudo yum install libgoocanvas-dev
1154 yum install goocanvas-devel -y
1155 sudo yum install python-pygraphviz python-kiwi python-pygoocanvas -y
1156 sudo yum install tcpdump
1157 yum list | grep sqlite
1158 sudo yum install sqlite
1159 sudo yum install sqlite-devel
1160 yum remove sqlite
1161 sudo yum install sqlite-devel
1162 sudo yum remove sqlite-devel
1163 yum list | grep gccxml
1164 yum list | grep goocanvas
1165 yum install goocanvas goocanvas-devel
1166 udo yum install python-pygraphviz python-kiwi python-pygoocanvas
1167 yum install python-pygraphviz python-kiwi python-pygoocanvas
1168 pip install pygoocanvas
1169 pip install --upgrade pip
1170 pip install pygoocanvas
1171 pip list | grep gooc
1172 pip list
1173 pip2.6 list
1174 pip --version
1175 yum install http://li.nux.ro/download/nux/dextop/el6/x86_64/pygoocanvas-0.14.1-3.el6.nux.x86_64.rpm
1176 yum install pysqlite3
1177 yum install gsl
1178 yum install gsl-devel
1179 sqlite3 --version
1180 yum install python-sphinx dia texlive texlive-latex
1181 yum install http://dl.fedoraproject.org/pub/epel/6/x86_64/gccxml-0.9.0-0.25.20140718.gitab651a2.el6.x86_64.rpm -y
1182 history
其他需要安装
yum install gsl-debuginfo
yum install gtk2-devel
安装步骤
[root@gdc1000 ns-3.21]# ./waf clean
'clean' finished successfully (0.115s)
[root@gdc1000 ns-3.21]# ./waf --build-profile=debug --enable-examples --enable-tests configure
Setting top to : /home/gftp/tool/network/ns-allinone-3.21/ns-3.21
Setting out to : /home/gftp/tool/network/ns-allinone-3.21/ns-3.21/build
Checking for 'gcc' (c compiler) : /usr/local/bin/gcc
Checking for cc version : 4.8.2
Checking for 'g++' (c++ compiler) : /usr/local/bin/g++
Checking for compilation flag -Wl,--soname=foo... support : ok
Checking for program python : /usr/bin/python
Checking for python version : (2, 6, 6, 'final', 0)
Checking for library python2.6 in LIBDIR : yes
Checking for program /usr/bin/python-config,python2.6-config,python-config-2.6,python2.6m-config : /usr/bin/python-config
Checking for header Python.h : yes
Checking for compilation flag -fvisibility=hidden... support : ok
Checking for compilation flag -Wno-array-bounds... support : ok
Checking for pybindgen location : ../pybindgen-0.17.0.876 (guessed)
Python module pybindgen : 0.17.0.876
Checking for pybindgen version : 0.17.0.876
Checking for types uint64_t and unsigned long equivalence : yes
Checking for types uint64_t and unsigned long long equivalence : no
Checking for the apidefs that can be used for Python bindings : gcc-LP64
Checking for internal GCC cxxabi : complete
Python module pygccxml : not found
Checking boost includes : 1_41
Checking boost libs : ok
Checking for boost linkage : ---- Summary of optional NS-3 features:
Build profile : debug
Build directory : /home/gftp/tool/network/ns-allinone-3.21/ns-3.21/build
Python Bindings : enabled
Python API Scanning Support : not enabled (Missing 'pygccxml' Python module)
BRITE Integration : not enabled (BRITE not enabled (see option --with-brite))
NS-3 Click Integration : not enabled (nsclick not enabled (see option --with-nsclick))
GtkConfigStore : enabled
XmlIo : enabled
Threading Primitives : enabled
Real Time Simulator : enabled
Emulated Net Device : enabled
File descriptor NetDevice : enabled
Tap FdNetDevice : enabled
Emulation FdNetDevice : enabled
PlanetLab FdNetDevice : not enabled (PlanetLab operating system not detected (see option --force-planetlab))
Network Simulation Cradle : not enabled (NSC not found (see option --with-nsc))
MPI Support : not enabled (option --enable-mpi not selected)
NS-3 OpenFlow Integration : not enabled (OpenFlow not enabled (see option --with-openflow))
SQlite stats data output : not enabled (library 'sqlite3' not found)
Tap Bridge : enabled
PyViz visualizer : enabled
Use sudo to set suid bit : not enabled (option --enable-sudo not selected)
Build tests : enabled
Build examples : enabled
GNU Scientific Library (GSL) : enabled
'configure' finished successfully (4.948s)
[root@gdc1000 ns-3.21]#
编译
./waf
验证
./test.py -c core
Waf: Entering directory `/home/gftp/tool/network/ns-allinone-3.21/ns-3.21/build'
Waf: Leaving directory `/home/gftp/tool/network/ns-allinone-3.21/ns-3.21/build'
'build' finished successfully (2.589s)
Modules built:
antenna aodv applications
bridge buildings config-store
core csma csma-layout
dsdv dsr emu
energy fd-net-device flow-monitor
internet lr-wpan lte
mesh mobility mpi
netanim (no Python) network nix-vector-routing
olsr point-to-point point-to-point-layout
propagation sixlowpan spectrum
stats tap-bridge test (no Python)
topology-read uan virtual-net-device
wave wifi wimax
Modules not built (see ns-3 tutorial for explanation):
brite click openflow
visualizer
PASS: TestSuite hash
PASS: TestSuite watchdog
PASS: TestSuite type-traits
PASS: TestSuite timer
PASS: TestSuite traced-callback
PASS: TestSuite time
PASS: TestSuite simulator
PASS: TestSuite event-garbage-collector
PASS: TestSuite sample
PASS: TestSuite basic-random-number
PASS: TestSuite ptr
PASS: TestSuite object
PASS: TestSuite object-name-service
PASS: TestSuite global-value
PASS: TestSuite int64x64
PASS: TestSuite command-line
PASS: TestSuite config
PASS: TestSuite callback
PASS: TestSuite attributes
PASS: TestSuite double-probe
PASS: TestSuite basic-data-calculators
PASS: TestSuite average
PASS: TestSuite packet-socket-apps
PASS: TestSuite sequence-number
PASS: TestSuite pcap-file
PASS: TestSuite red-queue
PASS: TestSuite packet-metadata
PASS: TestSuite packetbb-test-suite
PASS: TestSuite ipv6-address
PASS: TestSuite error-model
PASS: TestSuite drop-tail-queue
PASS: TestSuite buffer
PASS: TestSuite rocketfuel-topology-reader
PASS: TestSuite waypoint-mobility-model
PASS: TestSuite steady-state-rwp-mobility-model
PASS: TestSuite mobility-ns2-trace-helper
PASS: TestSuite mobility-trace
PASS: TestSuite mobility
PASS: TestSuite type-id
PASS: TestSuite threaded-simulator
PASS: TestSuite itu-r-1411-nlos-over-rooftop
PASS: TestSuite itu-r-1411-los
PASS: TestSuite okumura-hata
PASS: TestSuite kun-2600-mhz
PASS: TestSuite propagation-loss-model
PASS: TestSuite buildings-shadowing-test
PASS: TestSuite buildings-pathloss-test
PASS: TestSuite building-position-allocator
PASS: TestSuite buildings-helper
PASS: TestSuite devices-wifi-tx-duration
PASS: TestSuite devices-wifi-dcf
PASS: TestSuite devices-wifi
PASS: TestSuite wifi-block-ack
PASS: TestSuite basic-energy-harvester
PASS: TestSuite wifi-80211p-ocb
PASS: TestSuite basic-energy-model
PASS: TestSuite li-ion-energy-source
PASS: TestSuite uan-energy-model
PASS: TestSuite devices-uan
PASS: TestSuite devices-point-to-point
PASS: TestSuite codel-queue
PASS: TestSuite ipv6-address-helper
PASS: TestSuite rtt
PASS: TestSuite ipv6-ripng
PASS: TestSuite ipv6-fragmentation
PASS: TestSuite ipv6-forwarding
PASS: TestSuite ipv6-dual-stack
PASS: TestSuite ipv6-address-generator
PASS: TestSuite udp
PASS: TestSuite tcp-header
PASS: TestSuite tcp-option
PASS: TestSuite tcp-timestamp
PASS: TestSuite tcp-wscaling
PASS: TestSuite ipv6-raw
PASS: TestSuite ipv6-protocol
PASS: TestSuite ipv6-packet-info-tag
PASS: TestSuite rv-battery-model
PASS: TestSuite ipv6-list-routing
PASS: TestSuite ipv6-extension-header
PASS: TestSuite ipv4-global-routing
PASS: TestSuite ipv4-static-routing
PASS: TestSuite tcp
PASS: TestSuite ipv4-protocol
PASS: TestSuite ipv4-forwarding
PASS: TestSuite ipv4-fragmentation
PASS: TestSuite ipv4-header
PASS: TestSuite ipv4-raw
PASS: TestSuite ipv4-packet-info-tag
PASS: TestSuite ipv4-address-helper
PASS: TestSuite ipv4-list-routing
PASS: TestSuite ipv4-address-generator
PASS: TestSuite global-route-manager-impl
PASS: TestSuite sixlowpan-hc1
PASS: TestSuite sixlowpan-iphc
PASS: TestSuite sixlowpan-fragmentation
PASS: TestSuite packet
PASS: TestSuite wimax-fragmentation
PASS: TestSuite wimax-qos
PASS: TestSuite wimax-ss-mac-layer
PASS: TestSuite wimax-mac-messages
PASS: TestSuite wimax-service-flow
PASS: TestSuite wimax-tlv
PASS: TestSuite wimax-phy-layer
PASS: TestSuite histogram
SKIP: TestSuite nsc-tcp-loss
PASS: TestSuite routing-dsr
PASS: TestSuite routing-dsdv
PASS: TestSuite ns3-tcp-no-delay
PASS: TestSuite ns3-tcp-socket
SKIP: TestSuite ns3-tcp-interoperability
SKIP: TestSuite ns3-tcp-cwnd
PASS: TestSuite udp-client-server
PASS: TestSuite ns3-tcp-state
PASS: TestSuite ns3-wifi-interference
PASS: TestSuite ns3-wifi-msdu-aggregator
PASS: TestSuite routing-olsr
PASS: TestSuite routing-olsr-regression
PASS: TestSuite routing-olsr-header
PASS: TestSuite devices-mesh-flame
PASS: TestSuite devices-mesh-flame-regression
PASS: TestSuite devices-mesh-dot11s
PASS: TestSuite csma-system
PASS: TestSuite ns3-tcp-loss
PASS: TestSuite devices-mesh
PASS: TestSuite devices-mesh-dot11s-regression
PASS: TestSuite routing-aodv
PASS: TestSuite routing-aodv-regression
PASS: TestSuite routing-id-cache
PASS: TestSuite cosine-antenna-model
PASS: TestSuite parabolic-antenna-model
PASS: TestSuite isotropic-antenna-model
PASS: TestSuite degrees-radians
PASS: TestSuite angles
PASS: TestSuite spectrum-value
PASS: TestSuite spectrum-converter
PASS: TestSuite spectrum-interference
PASS: TestSuite spectrum-ideal-phy
PASS: TestSuite lte-uplink-power-control
PASS: TestSuite lte-cqi-generation
PASS: TestSuite lte-handover-target
PASS: TestSuite lte-handover-delay
PASS: TestSuite lte-downlink-power-control
PASS: TestSuite lte-cell-selection
PASS: TestSuite lte-ue-measurements
PASS: TestSuite lte-interference-fr
PASS: TestSuite lte-ue-measurements-piecewise-1
PASS: TestSuite test-asn1-encoding
PASS: TestSuite lte-ue-measurements-handover
PASS: TestSuite lte-ue-measurements-piecewise-2
PASS: TestSuite lte-rrc
PASS: TestSuite lte-harq
PASS: TestSuite lte-x2-handover
PASS: TestSuite lte-mimo
PASS: TestSuite lte-antenna
PASS: TestSuite lte-phy-error-model
PASS: TestSuite epc-s1u-uplink
PASS: TestSuite lte-epc-e2e-data
PASS: TestSuite epc-s1u-downlink
PASS: TestSuite eps-tft-classifier
PASS: TestSuite epc-gtpu
PASS: TestSuite lte-rlc-am-e2e
PASS: TestSuite lte-rlc-um-e2e
PASS: TestSuite lte-rlc-am-transmitter
PASS: TestSuite lte-rlc-um-transmitter
PASS: TestSuite lte-pathloss-model
PASS: TestSuite lte-spectrum-value-helper
PASS: TestSuite lte-earfcn
PASS: TestSuite lte-cqa-ff-mac-scheduler
PASS: TestSuite lte-pss-ff-mac-scheduler
PASS: TestSuite lte-fdtbfq-ff-mac-scheduler
PASS: TestSuite lte-tdbet-ff-mac-scheduler
PASS: TestSuite lte-tdtbfq-ff-mac-scheduler
PASS: TestSuite lte-tta-ff-mac-scheduler
PASS: TestSuite lte-tdmt-ff-mac-scheduler
PASS: TestSuite lte-fdbet-ff-mac-scheduler
PASS: TestSuite lte-fdmt-ff-mac-scheduler
PASS: TestSuite lte-x2-handover-measures
PASS: TestSuite lte-pf-ff-mac-scheduler
PASS: TestSuite lte-rr-ff-mac-scheduler
PASS: TestSuite lte-link-adaptation
PASS: TestSuite lte-downlink-sinr
PASS: TestSuite lte-uplink-sinr
PASS: TestSuite animation-interface
PASS: TestSuite lr-wpan-spectrum-value-helper
PASS: TestSuite lte-interference
PASS: TestSuite lr-wpan-plme-pd-sap
PASS: TestSuite lr-wpan-packet
PASS: TestSuite lr-wpan-energy-detection
PASS: TestSuite lr-wpan-clear-channel-assessment
PASS: TestSuite lr-wpan-error-model
PASS: TestSuite lr-wpan-collision
PASS: TestSuite lr-wpan-ack
PASS: TestSuite lte-frequency-reuse
190 of 193 tests passed (190 passed, 3 skipped, 0 failed, 0 crashed, 0 valgrind errors)
List of SKIPped tests: nsc-tcp-loss ns3-tcp-interoperability ns3-tcp-cwnd
参考
https://www.nsnam.org/wiki/Installation