/njica

Primary LanguagePythonMIT LicenseMIT

License: MIT Network Joint Independent Componet Analysis (NJICA)

Table of Contents

Description

This application emulates the Network Joint Independent Componet Analysis (NJICA) in comnetsemu. The implementation of Newton's Iteration is based on FastICA in scikit-learn.

Requirements

Please install vagrant and Virtualbox on the host OS to build the testbed VM.

Getting Started

Please run the following steps to set up the emulator.

Assume the source directory of njica project is ~/njica.

  1. Create the testbed VM using Vagrant on your host OS.

    cd ~/njica || exit
    vagrant up testbed

    Then run vagrant ssh testbed to login into the VM. Following steps should be run inside the VM.

  2. Install docker-ce and add docker into user group

    cd ~/comnetsemu/util
    bash ./install.sh -d
    
    sudo groupadd docker
    sudo gpasswd -a vagrant docker
    newgrp docker
    sudo systemctl start docker
    
    cd /home/vagrant/comnetsemu/test_containers || exit
    sudo bash ./build.sh
  3. Upgrade ComNetsEmu Python module and all dependencies automatically inside VM

    cd ~/comnetsemu/util
    bash ./install.sh -u
  4. Run test to make sure the ComNetsEmu is installed correctly (optional).

    cd ~/comnetsemu
    sudo make test

    Only run following steps when all tests passed without any errors. Otherwise, please create issues on Github from Zuo Xiang.

Run NJICA in the Emulator

  1. Build the Docker image for in-network_bss

    cd /vagrant
    ./build.sh

    After this step, you should see the image with name in-network_bss when running docker image ls.

    You should change your current path to /vagrant/emulation (inside the VM, of course) for following steps.

  2. Build executables for VNFs.

    cd /vagrant/emulation
    sudo ./build_executable.py

    After this step, you should find meica_vnf ELF file in ./build/ directory.

  3. Run the multi-hop network emulation script with store and forward mode.

    cd /vagrant/emulation
    sudo ./topology.py

    Now you should also see the prompt mininet> when the network configuration is finished. If you check the CPU usage inside the VM using htop, three VNF processes are heavily using the second CPU core (Because they are based on DPDK with polling mode).

  4. Run server and client programs inside the corresponded container.

    mininet> xterm client server

    Then two windows are popped up, you can identify the client and server by looking at the host name (e.g. @client) in the shell.

    Then please firstly run server.py inside the server's shell and then client.py in the clients shell (use -h to check the CLI options). (Currently, this order must be kept manually.)

    Run server and client with the default options:

    root@server# python3 ./server.py
    
    root@client# python3 ./client.py

Citation

About Us

We are researchers at the Deutsche Telekom Chair of Communication Networks (ComNets) at TU Dresden, Germany. Please feel free to contact us with any questions you may have.

Todo

  1. Error by starting network sudo ./topology.py:
    xrdb: Can't open display ''
  2. Error by client.py, it might be because controller can not be started.