Install network emulator under Ubuntu NS3 3.22

Source: Internet
Author: User
Tags valgrind

Install network emulator under Ubuntu NS3 3.22

1, NS3 download

Enter NS3 official website, https://www.nsnam.org. Download the NS3 package ns-allinone-3.22.tar.bz2. Then, unpack the package.

2. Dependent Package Installation

Because of the more dependent packages, we use shell scripting to program the installation. Write all the installation commands to the script file, append the auto-confirm parameter (-y), and then compile and execute the script file.

as follows:

1 ), in VI Edit the following file

#!/bin/sh
sudo apt-get install gcc g++ python-y
sudo apt-get install gcc g++ python python-dev-y
sudo apt-get install mercurial-y
sudo apt-get install bzr-y
sudo apt-get install gdb valgrind-y
sudo apt-get install gsl-bin libgsl0-dev libgsl0ldbl-y
sudo apt-get install Flex Bison libfl-dev-y
sudo apt-get install g++-3.4 gcc-3.4-y
sudo apt-get install tcpdump-y
sudo apt-get install aqlite aqlite3 libsqlite3-dev-y
sudo apt-get install libxml2 libxml2-dev-y
sudo apt-get install libgtk2.0-0 libgtk2.0-dev-y
sudo apt-get install Vtun lxc-y
sudo apt-get install uncrustify-y
sudo apt-get install Doxygen grphviz imagemagick-y
sudo apt-get install texlive texlive-extra-untils texlive-latex-extra-y
sudo apt-get install Python-sphinx dia-y
sudo apt-get install Python-pygraphviz python-kiwi python-pygoocanvaslibgoocanvas-dev-y
sudo apt-get install Libboost-signals-dev libboost-filesystem-dev-y
sudo apt-get install openmpi*-y

: Wq Mysetup # (note) to save as Mysetup file for the name

2 ), the terminal compiles: chmod+x Mysetup

3 ), run the installation, enter in the terminal: ./mysetup

3. Compile and install NS3

In the terminal, enter the NS3 unpacking package.

Run:

sudo./build.py–enable-example–enable-tests

Successful results:

waf:leaving directory '/home/peng/ns-allinone-3.22/ns-3.22/build '
' Build ' finished successfully (4M48.801S)
Modules built:
Antenna AODV Applications
Bridge Buildings Config-store
Core CSMA Csma-layout
DSDV DSR 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 Visualizer
Wave WiFi WiMAX

Modules not built (see ns-3 tutorial forexplanation):
Brite Click OpenFlow

4. Test whether the installation is successful

In the terminal, enter the ns-3.22 folder of the NS3 unpacking package.

1) test that the release is compiled correctly

Run:

./test.py–c Core

Results:

Pass:testsuite Lte-frequency-reuse
195 of 198 tests passed (195 passed, 3skipped, 0 failed, 0 crashed, 0 valgrind errors)
List of skipped Tests:ns3-tcp-cwnd
Ns3-tcp-interoperability
Nsc-tcp-loss

2) Run the script test

Run:

sudo./waf--run Scratch-simulator

Results

waf:entering directory '/home/peng/ns-allinone-3.22/ns-3.22/build '
waf:leaving directory '/home/peng/ns-allinone-3.22/ns-3.22/build '
' Build ' finished successfully (3.263S)
Scratch Simulator


Congratulations, NS3 Software Installation Successful!

Install network emulator under Ubuntu NS3 3.22

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.