Giter Site home page Giter Site logo

mahantaf / vanet-trust-management Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 257.16 MB

C 7.07% C++ 33.60% Dockerfile 0.01% Shell 0.14% Python 0.39% Makefile 0.16% HTML 55.30% CSS 0.20% XSLT 0.24% R 0.03% Batchfile 0.04% Perl 0.27% Raku 0.04% Lex 0.05% Yacc 0.17% FreeMarker 0.02% Awk 0.01% JavaScript 2.23% Emacs Lisp 0.01% Java 0.05%

vanet-trust-management's Introduction

5G VANET Trust Management Simulation

In this project we used omnet++ to simulate Vehicular Adhoc Network (VANET) and add trust management algorithm to that. We used Simu5G project to model the 5g network and we added our trust management algorithms along with that project code. This documentation is written to help you replicate our work or contribute to it.

Table of Contents

Installation

In order to run the simulation you have to have oment++ and sumo installed on your machine. There different methods that you can use to install this project. Our recommended version is to use the Docker file provided in the repository but you are free to use other methods.

Install on Ubuntu

  1. Install system dependencies:
apt-get update && \\
apt-get -qq install git wget cmake python3 g++ libxerces-c-dev libfox-1.6-dev libgdal-dev libproj-dev libgl2ps-dev python3-dev swig default-jdk maven libeigen3-dev unzip
  1. Update cmake version:
mkdir ~/temp && \
cd ~/temp && \
wget https://github.com/Kitware/CMake/releases/download/v3.22.2/cmake-3.22.2.tar.gz && \
tar -xzvf cmake-3.22.2.tar.gz && \
cd cmake-3.22.2/ && \
./bootstrap && \
make -j$(nproc) && \
make install && \
cd ~ && \
rm -rf temp/
  1. Clone the repository and checkout mahan-build branch:
git clone https://github.com/mahantaf/vanet-trust-management.git && \
cd vanet-trust-management/ && \
git checkout mahan-build
  1. Download and extract SUMO:
git clone --recursive https://github.com/eclipse/sumo &&\
export SUMO_HOME="$PWD/sumo"
  1. Configure and build SUMO from source:
cd sumo && \
mkdir build/cmake-build && \
cd build/cmake-build && \
cmake ../.. && \
make -j$(nproc) && \
make install
  1. Install omnetpp dependencies:
apt-get -y install build-essential gcc bison flex perl \
python qt5-default libqt5opengl5-dev tcl-dev tk-dev \
libxml2-dev zlib1g-dev default-jre doxygen graphviz libwebkitgtk-3.0-0 libpcap-dev
  1. Install omnetpp and export path to environment variable:
cd omnetpp-5.6.1 && \
source setenv -f &&\
sed -i 's/WITH_OSGEARTH=yes/WITH_OSGEARTH=no/g' configure.user && \
sed -i 's/WITH_OSG=yes/WITH_OSG=no/g' configure.user && \
./configure && \
make -j$(nproc) &&\
export PATH="/path/to/github-repo/omnetpp-5.6.1/bin:$PATH"

Install using Dockerfile

  1. Download and build the Dockerfile in this repository using the following command:
DOCKER_BUILDKIT=1 docker build . --ssh default=$SSH_AUTH_SOCK -t <CONTAINER_NAME>

Execution

Run on Ubuntu

Simply run the omnetpp command or directly run it from the source:

/path/to/github-repo/omnetpp-5.6.1/bin/omnetpp

Run using docker (Ubuntu)

  1. Generate the xauth token to allow GUI applications from docker container to run on the local host:
 xauth list
  1. Run the image using the following command:
docker run -it --net=host -e DISPLAY -v /tmp/.X11-unix <CONTAINTER_NAME> bash
  1. Add the listed token from step 4 to the docker container:
$(containter) xauth add <token>
  1. Start omnetpp:
$(containter) ~/mahantp/legendary-simu5g-broccoli/omnetpp-5.6.1/bin/omnetpp

Run using docker (Mac)

  1. Install XQuartz to allow GUI applications from docker container to run on the local host:
brew cask install xquartz
  1. Open XQuartz:
open -a XQuartz
  1. Export display:
export DISPLAY=:0
  1. Ensure the "Allow connections from network clients" option in Preferences >> Security is turned on: XQuartz security setting page

  2. Add all hosts as an allowed source:

/opt/X11/bin/xhost +
  1. Run the image using the following command:
docker run -it --net=host -e DISPLAY=host.docker.internal:0 -v /Users/<username>/.Xauthority:/home/mahantp/.Xauthority <CONTAINTER_ID> bash
  1. Start omnetpp:
$(containter) ~/mahantp/legendary-simu5g-broccoli/omnetpp-5.6.1/bin/omnetpp

Build Project

After successfully run the omnetpp you can add the simulation as a project in omentpp and start run the simulations. Here are the steps to replicate the simulation.

  1. Start the container and run the omnetpp
  2. Select the repository directory as the workspace directory
  3. From the menu choose "File" >> "Open Projects from File System"
  4. Specify repository directory as directory for searching existing projects
  5. After the search is complete select the following projects from the list
    • inet
    • veins
    • veins_inet
    • Simu5G-1.1.0
  6. For each of the projects do the following
    • From the menu choose "Project" >> "Properties"
    • On the left menu select "OMNeT++" >> "Makemake"
    • In the Makemake window select "src:makemake" from the list and click "options" on the right
    • In the new window choose tab "Custom"
    • In the text box put the following code and save the option:
    MSGC:=$(MSGC) --msg6
    
  7. From the menu choose "Project" >> "Build All"
  8. After building successfully you can run the simulation which is located at: ./Simu5G-1.1.0/simulations/NR/cars/omnetpp.ini

vanet-trust-management's People

Contributors

nagrawal63 avatar mahantaf avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.