Installing The ns-3 Network Simulator on Mac

Daniel Weibel
Created 16 May 2016

ns-3 is a discrete-event network simulator.

The following installation instructions have been tested on macOS 10.11.1


  • Xcode Command Line Tools installed (gcc and clang)
  • Python installed


  • Download desired version of ns-3 from here
  • Build it with the following command:
      ./ --enable-examples --enable-tests
  • cd to the ns-3 root directory (for example, ns-3.25)
  • Validate installation with the following command
      ./ -c core

Hello World

Run the following for a “hello world” simulation:

./waf --run hello-simulator