INSTALLATION GUIDE

From fresh Mac
to first trace.

Set up Docker Desktop and XQuartz, install the environment, then run the included sender-to-receivers simulation.

APPLE SILICON·DOCKER + XQUARTZ·NS-2 + NAM
OPENCOMMUNITY TESTING IS OPEN!
01 / REQUIREMENTS

Prepare the Mac

Install Docker Desktop and XQuartz. Start Docker Desktop and make sure your Mac is connected to the internet before installing.

NAM has a window.

XQuartz provides the graphical display for NAM. Keep it installed to view network animations.

See the compatibility guide for platform and display requirements.

02 / INSTALL

Run the installer

Open Terminal and run the install command from the project README:

TERMINAL · INSTALL
curl -fsSL https://raw.githubusercontent.com/Deeptanu2005/NS2-Nam-MacOS/main/install.sh | bash

The installer downloads the project files to ~/NS2Nam, configures XQuartz, builds the Docker environment, installs the global ns2 command, adds the sample simulation, and verifies NS-2, NAM, and Tcl.

Review before running.This command downloads and runs the project installer from the repository’s main branch.Read install.sh ↗
03 / LAUNCH

Open your NS-2 workspace

Start the interactive container shell from Terminal:

TERMINAL · LAUNCH
ns2

Inside the environment, the simulation directory on your Mac is mounted at /simulations. You can use ns, nam, and tclsh.

04 / FIRST SIMULATION

Run the sample

From the NS2-Nam shell, run:

/SIMULATIONS
ns send_receive.tcl

The sample creates send_receive.nam and launches NAM when the simulation finishes. To open the trace manually, run nam send_receive.nam from the simulations directory.

NAM visualization of a sender linked to three receiversTHE INCLUDED SAMPLE · ONE SENDER / THREE RECEIVERS

Add your own Tcl scripts to ~/NS2Nam/simulations on macOS to keep them between sessions.

05 / REMOVE

Uninstall when needed

Review the README for uninstall instructions. The uninstaller asks for confirmation, preserves the simulations folder, removes NS2-Nam resources, and revokes the XQuartz localhost grant.

Review README for uninstall ↗