Skip to content

AbelKidaneHaile/batman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

B.A.T.M.A.N

Better Approach to Mobile Ad-hoc Networking (non-official)

Static Badge

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.)

Prerequisite

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
docker

To 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-world

How to use

Clone 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 batman

Then, 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 ns3dce

Now, 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 build

Finally, 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.

About

Simulation code for simulating the batman protocol in ns3 (not for deployment)

Resources

Stars

Watchers

Forks

Contributors