Simple simulation code for simulating the Batman routing protocol in ns-3. (N.B. This repo contains a "from-scratch" Batman protocol implementation, and is not recommended for any use. Please use the official release instead.)
Install Docker in your PC by following the installation instructions from Docker. For Windows, install the Docker Desktop Application. For Ubuntu, install it using the following commands.
sudo apt update
sudo apt install docker.io
# to verify installation just type
dockerTo avoid usign sudo everytime you use docker, create a group and add the user to it:-
sudo groupadd docker
sudo usermod -aG docker $USER
# verify using
docker run hello-worldClone this repo and pull the image for the project from Docker Hub.
git clone https://github.com/AbelKidaneHaile/batman.git
docker pull abelkidane/ns3-dce
cd batmanThen, start the container by using docker compose.
docker compose run ns3dce
OR alternatively (this removes warnings that docker compose has leftover from older runs)
docker compose run --rm --remove-orphans ns3dceNow, we are ready to run ns3 terminal commands using waf. Always make sure to configure at least once. Building might take a bit of time.
./waf configure --enable-examples --enable-tests
./waf buildFinally, we can run the simulation
./waf --run "batman-simulation --nNodes=5 --duration=12"After completing the simulation, an xml file will be generated (batman-animation.xml). This file can be used in netanim to show the transfer of the packets across nodes. Open netanim and select the xml file to view the packet traffic in the simulation.