User Tools

Site Tools


informatica:linux:ns3

1. Descargar

wget -c --tries=0 http://www.nsnam.org/releases/ns-allinone-3.6.tar.bz2

2. Descomprimir

tar xvfj ns-allinone-3.6.tar.bz2

3. Instalar

./build.py

Dura casi 10'

4. (En construcción) Instalar paquetes adicionales:

aptitude install python-dev pkg-config valgrind

5. Cambiar de directorio:

cd ns-3.6

6. Ejecutar:

./waf -d optimized configure
Checking for program g++                 : ok /usr/bin/g++ 
Checking for program cpp                 : ok /usr/bin/cpp 
Checking for program ar                  : ok /usr/bin/ar 
Checking for program ranlib              : ok /usr/bin/ranlib 
Checking for g++                         : ok  
Checking for program pkg-config          : ok /usr/bin/pkg-config 
Checking for regression reference traces  : ok ../ns-3.6-ref-traces (guessed) 
Checking for -Wno-error=deprecated-declarations support : yes 
Checking for -Wl,--soname=foo support                   : yes 
Checking for header stdlib.h                            : ok 
Checking for header signal.h                            : ok 
Checking for header pthread.h                           : ok 
Checking for high precision time implementation         : 128-bit integer 
Checking for header stdint.h                            : ok 
Checking for header inttypes.h                          : ok 
Checking for header sys/inttypes.h                      : not found 
Checking for library rt                                 : ok 
Checking for header netpacket/packet.h                  : ok 
Checking for header linux/if_tun.h                      : ok 
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
Checking for pkg-config flags for GTK_CONFIG_STORE      : not found 
Package libxml-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libxml-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libxml-2.0' found
Checking for pkg-config flags for LIBXML2               : not found 
Checking for library sqlite3                            : not found 
Checking for NSC location                               : not found 
Checking for program python                             : ok /usr/bin/python 
Checking for Python version >= 2.3                      : ok 2.5.4 
Checking for library python2.5                          : ok 
Checking for program python2.5-config                   : ok /usr/bin/python2.5-config 
Checking for header Python.h                            : ok 
Checking for -fvisibility=hidden support                : yes 
Checking for pybindgen location                         : not found 
Checking for Python module pybindgen                    : not found 
pybindgen missing => no python bindings
Checking for program sudo                               : ok /usr/bin/sudo 
Checking for program hg                                 : not found 
Checking for program valgrind                           : ok /usr/bin/valgrind 
Package gsl was not found in the pkg-config search path.
Perhaps you should add the directory containing `gsl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gsl' found
Checking for pkg-config flags for GSL                   : not found 
---- Summary of optional NS-3 features:
Threading Primitives          : enabled
Real Time Simulator           : enabled
Emulated Net Device           : enabled
Tap Bridge                    : enabled
GtkConfigStore                : not enabled (library 'gtk+-2.0 >= 2.12' not found)
XmlIo                         : not enabled (library 'libxml-2.0 >= 2.7' not found)
SQlite stats data output      : not enabled (library 'sqlite3' not found)
Network Simulation Cradle     : not enabled (NSC not found (see option --with-nsc))
Python Bindings               : not enabled (PyBindGen missing)
Use sudo to set suid bit      : not enabled (option --enable-sudo not selected)
Build examples and samples    : enabled
Static build                  : not enabled (option --enable-static not selected)
GNU Scientific Library (GSL)  : not enabled (GSL not found)
'configure' finished successfully (2.091s)

7. Ejecutar:

./waf -d debug configurecd
Checking for program g++                 : ok /usr/bin/g++ 
Checking for program cpp                 : ok /usr/bin/cpp 
Checking for program ar                  : ok /usr/bin/ar 
Checking for program ranlib              : ok /usr/bin/ranlib 
Checking for g++                         : ok  
Checking for program pkg-config          : ok /usr/bin/pkg-config 
Checking for regression reference traces  : ok ../ns-3.6-ref-traces (guessed) 
Checking for -Wno-error=deprecated-declarations support : yes 
Checking for -Wl,--soname=foo support                   : yes 
Checking for header stdlib.h                            : ok 
Checking for header signal.h                            : ok 
Checking for header pthread.h                           : ok 
Checking for high precision time implementation         : 128-bit integer 
Checking for header stdint.h                            : ok 
Checking for header inttypes.h                          : ok 
Checking for header sys/inttypes.h                      : not found 
Checking for library rt                                 : ok 
Checking for header netpacket/packet.h                  : ok 
Checking for header linux/if_tun.h                      : ok 
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
Checking for pkg-config flags for GTK_CONFIG_STORE      : not found 
Package libxml-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libxml-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libxml-2.0' found
Checking for pkg-config flags for LIBXML2               : not found 
Checking for library sqlite3                            : not found 
Checking for NSC location                               : not found 
Checking for program python                             : ok /usr/bin/python 
Checking for Python version >= 2.3                      : ok 2.5.4 
Checking for library python2.5                          : ok 
Checking for program python2.5-config                   : ok /usr/bin/python2.5-config 
Checking for header Python.h                            : ok 
Checking for -fvisibility=hidden support                : yes 
Checking for pybindgen location                         : not found 
Checking for Python module pybindgen                    : not found 
pybindgen missing => no python bindings
Checking for program sudo                               : ok /usr/bin/sudo 
Checking for program hg                                 : not found 
Checking for program valgrind                           : ok /usr/bin/valgrind 
Package gsl was not found in the pkg-config search path.
Perhaps you should add the directory containing `gsl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gsl' found
Checking for pkg-config flags for GSL                   : not found 
---- Summary of optional NS-3 features:
Threading Primitives          : enabled
Real Time Simulator           : enabled
Emulated Net Device           : enabled
Tap Bridge                    : enabled
GtkConfigStore                : not enabled (library 'gtk+-2.0 >= 2.12' not found)
XmlIo                         : not enabled (library 'libxml-2.0 >= 2.7' not found)
SQlite stats data output      : not enabled (library 'sqlite3' not found)
Network Simulation Cradle     : not enabled (NSC not found (see option --with-nsc))
Python Bindings               : not enabled (PyBindGen missing)
Use sudo to set suid bit      : not enabled (option --enable-sudo not selected)
Build examples and samples    : enabled
Static build                  : not enabled (option --enable-static not selected)
GNU Scientific Library (GSL)  : not enabled (GSL not found)
'configure' finished successfully (2.176s)

8. Ejecutar:

./waf
...Waf: Leaving directory `/usr/local/src/ns-allinone-3.6/ns-3.6/build'
'build' finished successfully (8m57.246s)

9. Lanzar el comando:

./waf -d debug --enable-sudo configure
Checking for program g++                 : ok /usr/bin/g++ 
Checking for program cpp                 : ok /usr/bin/cpp 
Checking for program ar                  : ok /usr/bin/ar 
Checking for program ranlib              : ok /usr/bin/ranlib 
Checking for g++                         : ok  
Checking for program pkg-config          : ok /usr/bin/pkg-config 
Checking for regression reference traces  : ok ../ns-3.6-ref-traces (guessed) 
Checking for -Wno-error=deprecated-declarations support : yes 
Checking for -Wl,--soname=foo support                   : yes 
Checking for header stdlib.h                            : ok 
Checking for header signal.h                            : ok 
Checking for header pthread.h                           : ok 
Checking for high precision time implementation         : 128-bit integer 
Checking for header stdint.h                            : ok 
Checking for header inttypes.h                          : ok 
Checking for header sys/inttypes.h                      : not found 
Checking for library rt                                 : ok 
Checking for header netpacket/packet.h                  : ok 
Checking for header linux/if_tun.h                      : ok 
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
Checking for pkg-config flags for GTK_CONFIG_STORE      : not found 
Package libxml-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libxml-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libxml-2.0' found
Checking for pkg-config flags for LIBXML2               : not found 
Checking for library sqlite3                            : not found 
Checking for NSC location                               : not found 
Checking for program python                             : ok /usr/bin/python 
Checking for Python version >= 2.3                      : ok 2.5.4 
Checking for library python2.5                          : ok 
Checking for program python2.5-config                   : ok /usr/bin/python2.5-config 
Checking for header Python.h                            : ok 
Checking for -fvisibility=hidden support                : yes 
Checking for pybindgen location                         : not found 
Checking for Python module pybindgen                    : not found 
pybindgen missing => no python bindings
Checking for program sudo                               : ok /usr/bin/sudo 
Checking for program hg                                 : not found 
Checking for program valgrind                           : ok /usr/bin/valgrind 
Package gsl was not found in the pkg-config search path.
Perhaps you should add the directory containing `gsl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gsl' found
Checking for pkg-config flags for GSL                   : not found 
---- Summary of optional NS-3 features:
Threading Primitives          : enabled
Real Time Simulator           : enabled
Emulated Net Device           : enabled
Tap Bridge                    : enabled
GtkConfigStore                : not enabled (library 'gtk+-2.0 >= 2.12' not found)
XmlIo                         : not enabled (library 'libxml-2.0 >= 2.7' not found)
SQlite stats data output      : not enabled (library 'sqlite3' not found)
Network Simulation Cradle     : not enabled (NSC not found (see option --with-nsc))
Python Bindings               : not enabled (PyBindGen missing)
Use sudo to set suid bit      : enabled
Build examples and samples    : enabled
Static build                  : not enabled (option --enable-static not selected)
GNU Scientific Library (GSL)  : not enabled (GSL not found)
'configure' finished successfully (4.881s)

10. Comprobar la instalación:

./test.py -c core
Waf: Entering directory `/usr/local/src/ns-allinone-3.6/ns-3.6/build'
Waf: Leaving directory `/usr/local/src/ns-allinone-3.6/ns-3.6/build'
'build' finished successfully (0.586s)
PASS: TestSuite histogram
PASS: TestSuite ns3-wifi-interference
PASS: TestSuite sample
PASS: TestSuite devices-mesh-flame
PASS: TestSuite devices-mesh-dot11s
PASS: TestSuite devices-mesh
PASS: TestSuite ipv4-address-helper
PASS: TestSuite devices-wifi
PASS: TestSuite devices-wifi-dcf
PASS: TestSuite devices-wifi-tx-duration
PASS: TestSuite propagation-loss-model
PASS: TestSuite ipv6-list-routing
PASS: TestSuite ipv4-list-routing
PASS: TestSuite global-route-manager-impl
PASS: TestSuite olsr-routing
PASS: TestSuite devices-point-to-point
PASS: TestSuite ipv6-protocol
PASS: TestSuite ipv4-protocol
PASS: TestSuite udp
PASS: TestSuite tcp
PASS: TestSuite packetbb-test-suite
PASS: TestSuite drop-tail-queue
PASS: TestSuite ipv4-address-generator
PASS: TestSuite event-garbage-collector
PASS: TestSuite pcap-file-object
PASS: TestSuite packet
PASS: TestSuite packet-metadata
PASS: TestSuite buffer
PASS: TestSuite high-precision-128
PASS: TestSuite watchdog
PASS: TestSuite timer
PASS: TestSuite simulator
PASS: TestSuite time
PASS: TestSuite ptr
PASS: TestSuite traced-callback
PASS: TestSuite type-traits
PASS: TestSuite object-name-service
PASS: TestSuite callback
PASS: TestSuite attributes
PASS: TestSuite config
PASS: TestSuite global-value
PASS: TestSuite command-line
PASS: TestSuite basic-random-number
PASS: TestSuite object
44 of 44 tests passed (44 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors)
./waf --regression
Waf: Entering directory `/usr/local/src/ns-allinone-3.6/ns-3.6/build'
[450/472] regression-test (test-csma-bridge)
SKIP test-csma-bridge (Python bindings not available.)
[451/472] regression-test (test-csma-broadcast)
PASS test-csma-broadcast
[452/472] regression-test (test-csma-multicast)
PASS test-csma-multicast
[453/472] regression-test (test-csma-one-subnet)
PASS test-csma-one-subnet
[454/472] regression-test (test-csma-packet-socket)
PASS test-csma-packet-socket
[455/472] regression-test (test-csma-ping)
PASS test-csma-ping
[456/472] regression-test (test-csma-raw-ip-socket)
PASS test-csma-raw-ip-socket
[457/472] regression-test (test-csma-star)
PASS test-csma-star
[458/472] regression-test (test-dynamic-global-routing)
PASS test-dynamic-global-routing
[459/472] regression-test (test-global-routing-slash32)
PASS test-global-routing-slash32
[460/472] regression-test (test-ns2-mob)
PASS test-ns2-mob
[461/472] regression-test (test-realtime-udp-echo)
PASS test-realtime-udp-echo
[462/472] regression-test (test-second)
PASS test-second
[463/472] regression-test (test-simple-error-model)
PASS test-simple-error-model
[464/472] regression-test (test-simple-global-routing)
PASS test-simple-global-routing
[465/472] regression-test (test-simple-point-to-point-olsr)
PASS test-simple-point-to-point-olsr
[466/472] regression-test (test-static-routing-slash32)
PASS test-static-routing-slash32
[467/472] regression-test (test-tcp-large-transfer)
PASS test-tcp-large-transfer
[468/472] regression-test (test-tcp-nsc-lfn)
SKIP test-tcp-nsc-lfn (NSC not available)
[469/472] regression-test (test-third)
PASS test-third
[470/472] regression-test (test-udp-echo)
PASS test-udp-echo
[471/472] regression-test (test-wifi-wired-bridging)
PASS test-wifi-wired-bridging
[472/472] regression-test-collector
Regression testing summary:
SKIP: 2 of 22 tests have been skipped (test-csma-bridge, test-tcp-nsc-lfn)
PASS: 20 of 22 tests passed
Waf: Leaving directory `/usr/local/src/ns-allinone-3.6/ns-3.6/build'
'build' finished successfully (34.419s)

11. Ejecutar un guión de prueba:

./waf --run hello-simulator
Waf: Entering directory `/usr/local/src/ns-allinone-3.6/ns-3.6/build'
Waf: Leaving directory `/usr/local/src/ns-allinone-3.6/ns-3.6/build'
'build' finished successfully (0.704s)
Hello Simulator
informatica/linux/ns3.txt · Last modified: 2015/04/13 20:19 by 127.0.0.1