Coder Social home page Coder Social logo

pezou / wte_poc5 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from melacon/wte_poc5

0.0 1.0 0.0 7.79 MB

The Wireless Transport Emulator tailored for the 5th ONF WT PoC.

License: GNU General Public License v3.0

Dockerfile 0.01% Makefile 0.74% Shell 0.33% C 82.85% C++ 12.35% M4 0.01% Objective-C 0.02% HTML 2.18% Roff 0.42% Python 1.10%

wte_poc5's Introduction

Wireless Transport Emulator for ONF PoC 5

OpenYuma Wireless Transport Emulator (WTE) is a wireless transport topology emulation with OpenYuma NETCONF server, based on ONF TR-532.

Description

WTE takes as input three files:

  • a JSON topology file, with a specific structure, describing the network to be emulated.
  • a JSON configuration file giving details about the SDN controller information, ranges for the NEs management IP addresses and for the hosts connected to the NEs
  • the XML configuration file based on the YANG models to be used by each emulated Network Element as a startup configuration and an XML file containing the status parameters of the model. These two files can be automatically generated using a custom version of the pyang utility, that is available here.

Each NE is emulated as a docker container and exposes a NETCONF server based on the OpenYuma framework, reflecting an information model based on TR-532 from ONF. Links between different NEs, as described in the JSON topology file, are emulated as connections through veth pairs. The high-level architecture of the emulator is shown below.

As extension of Wireless Transport Emulator the java based netconf simulator NetconfServerSimulator can be used.

logo

Prerequisites

These instructions are for Ubuntu.

Docker

Install Docker following the instructions from here.

Make sure that you follow the instructions also for Manage Docker as a non-root user from here.

Summary:

sudo apt-get -y install \
  apt-transport-https \
  ca-certificates \
  curl \
  software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
       "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
       $(lsb_release -cs) \
       stable"
sudo apt-get update
sudo apt-get -y install docker-ce

Test that the docker installation was successful:

sudo docker run hello-world

Run docker without sudo:

sudo groupadd docker
sudo usermod -aG docker $USER

Log out and log back in so that your group membership is re-evaluated.

docker run hello-world

Python 3.6

Install version 3.6 for python:

sudo add-apt-repository ppa:jonathonf/python-3.6; \
sudo apt-get update; \
sudo apt-get install python3.6; \
sudo apt-get install python3.6-dev

Install

####These steps need to be done after every git pull to reflect the new changes

Build the docker container located in the OpenYuma folder:

cd OpenYuma
./docker_build.sh

From the base directory run the following commands:

./build.sh

Usage

An example of a JSON topology configuration file topology.json with 3 simulated devices looks like this:

{
  "network-elements" : [
    {
      "network-element" :
      {
        "uuid" : "NE1",
        "type" : "OpenYuma",
        "interfaces" : [
          {
            "layer" : "MWPS",
            "LTPs" : [
                      { "id": "ai1",
                        "supportedAlarms" : "signalIsLost, rslIsExceeded, signalIDMismatching, temperatureIsExceeded, modemIsFaulty, radioIsFaulty, modulationIsDownShifted",
                        "physical-port-reference" : "shelf1:slot2:card-type:port1",
                        "conditional-package" : "mw-air-interface-pac"
                      },
			          { "id": "ai2",
                        "supportedAlarms" : "signalIsLost, rslIsExceeded, signalIDMismatching, temperatureIsExceeded, modemIsFaulty, radioIsFaulty, modulationIsDownShifted",
                        "physical-port-reference" : "shelf1:slot3:card-type:port1",
                        "conditional-package" : "mw-air-interface-pac"
                      }
                    ]
          },
          {
            "layer" : "MWS",
            "LTPs" : [
                      { "id" : "pe1",
                        "supportedAlarms" : "structureAlarm",
                        "serverLTPs" : [{"id" : "ai1"}],
                        "conditional-package" : "mw-pure-ethernet-structure-pac"
                      },
			          { "id" : "pe2",
                        "supportedAlarms" : "structureAlarm",
                        "serverLTPs" : [{"id" : "ai2"}],
                        "conditional-package" : "mw-pure-ethernet-structure-pac"
                      }
                    ]
          },
          {
            "layer" : "ETC",
            "LTPs" : [
                      { "id" : "me1",
                        "supportedAlarms" : "framingIsFaulty, containerIsDown",
                        "serverLTPs" : [{"id" : "pe1"}],
                        "conditional-package" : "mw-ethernet-container-pac"
                      },
                      { "id" : "me2",
                        "supportedAlarms" : "framingIsFaulty, containerIsDown",
                        "serverLTPs" : [{"id" : "pe2"}],
                        "conditional-package" : "mw-ethernet-container-pac"
                      }
                    ]
          },
          {
            "layer" : "ETY",
            "LTPs" : [
                      {"id" : "ety1", "physical-port-reference" : "shelf1:slot1:card-type:port1"},
                      {"id" : "ety2", "physical-port-reference" : "shelf1:slot1:card-type:port2"}
                    ]
          },
          {
            "layer" : "ETH",
            "LTPs" : [
                    ]
          }
          ],
        "eth-cross-connections" : [
          
          ]
      }
    },
    {
      "network-element" :
      {
        "uuid" : "NE2",
        "type" : "OpenYuma",
        "interfaces" : [
          {
            "layer" : "MWPS",
            "LTPs" : [
                      { "id": "ai1",
                        "supportedAlarms" : "signalIsLost, rslIsExceeded, signalIDMismatching, temperatureIsExceeded, modemIsFaulty, radioIsFaulty, modulationIsDownShifted",
                        "physical-port-reference" : "shelf1:slot2:card-type:port1",
                        "conditional-package" : "mw-air-interface-pac"
                      },
			          { "id": "ai2",
                        "supportedAlarms" : "signalIsLost, rslIsExceeded, signalIDMismatching, temperatureIsExceeded, modemIsFaulty, radioIsFaulty, modulationIsDownShifted",
                        "physical-port-reference" : "shelf1:slot3:card-type:port1",
                        "conditional-package" : "mw-air-interface-pac"
                      }
                    ]
          },
          {
            "layer" : "MWS",
            "LTPs" : [
                      { "id" : "pe1",
                        "supportedAlarms" : "structureAlarm",
                        "serverLTPs" : [{"id" : "ai1"}],
                        "conditional-package" : "mw-pure-ethernet-structure-pac"
                      },
			          { "id" : "pe2",
                        "supportedAlarms" : "structureAlarm",
                        "serverLTPs" : [{"id" : "ai2"}],
                        "conditional-package" : "mw-pure-ethernet-structure-pac"
                      }
                    ]
          },
          {
            "layer" : "ETC",
            "LTPs" : [
                      { "id" : "me1",
                        "supportedAlarms" : "framingIsFaulty, containerIsDown",
                        "serverLTPs" : [{"id" : "pe1"}],
                        "conditional-package" : "mw-ethernet-container-pac"
                      },
                      { "id" : "me2",
                        "supportedAlarms" : "framingIsFaulty, containerIsDown",
                        "serverLTPs" : [{"id" : "pe2"}],
                        "conditional-package" : "mw-ethernet-container-pac"
                      }
                    ]
          },
          {
            "layer" : "ETY",
            "LTPs" : [
                      {"id" : "ety1", "physical-port-reference" : "shelf1:slot1:card-type:port1"},
                      {"id" : "ety2", "physical-port-reference" : "shelf1:slot1:card-type:port2"}
                    ]
          },
          {
            "layer" : "ETH",
            "LTPs" : [
                    ]
          }
          ],
        "eth-cross-connections" : [
          
          ]
      }
    },
    {
      "network-element" :
      {
        "uuid" : "NE3",
        "type" : "OpenYuma",
        "interfaces" : [
          {
            "layer" : "MWPS",
            "LTPs" : [
                      { "id": "ai1",
                        "supportedAlarms" : "signalIsLost, rslIsExceeded, signalIDMismatching, temperatureIsExceeded, modemIsFaulty, radioIsFaulty, modulationIsDownShifted",
                        "physical-port-reference" : "shelf1:slot2:card-type:port1",
                        "conditional-package" : "mw-air-interface-pac"
                      },
			          { "id": "ai2",
                        "supportedAlarms" : "signalIsLost, rslIsExceeded, signalIDMismatching, temperatureIsExceeded, modemIsFaulty, radioIsFaulty, modulationIsDownShifted",
                        "physical-port-reference" : "shelf1:slot3:card-type:port1",
                        "conditional-package" : "mw-air-interface-pac"
                      }
                    ]
          },
          {
            "layer" : "MWS",
            "LTPs" : [
                      { "id" : "pe1",
                        "supportedAlarms" : "structureAlarm",
                        "serverLTPs" : [{"id" : "ai1"}],
                        "conditional-package" : "mw-pure-ethernet-structure-pac"
                      },
			          { "id" : "pe2",
                        "supportedAlarms" : "structureAlarm",
                        "serverLTPs" : [{"id" : "ai2"}],
                        "conditional-package" : "mw-pure-ethernet-structure-pac"
                      }
                    ]
          },
          {
            "layer" : "ETC",
            "LTPs" : [
                      { "id" : "me1",
                        "supportedAlarms" : "framingIsFaulty, containerIsDown",
                        "serverLTPs" : [{"id" : "pe1"}],
                        "conditional-package" : "mw-ethernet-container-pac"
                      },
                      { "id" : "me2",
                        "supportedAlarms" : "framingIsFaulty, containerIsDown",
                        "serverLTPs" : [{"id" : "pe2"}],
                        "conditional-package" : "mw-ethernet-container-pac"
                      }
                    ]
          },
          {
            "layer" : "ETY",
            "LTPs" : [
                      {"id" : "ety1", "physical-port-reference" : "shelf1:slot1:card-type:port1"},
                      {"id" : "ety2", "physical-port-reference" : "shelf1:slot1:card-type:port2"}
                    ]
          },
          {
            "layer" : "ETH",
            "LTPs" : [
                    ]
          }
          ],
        "eth-cross-connections" : [
          
          ]
      }
    }
    ],
  "topologies" : {
    "mwps" : {
      "links" : [
        [{"uuid" : "NE1", "ltp" : "ai2", "radio-signal-id" : "26"}, {"uuid" : "NE2", "ltp" : "ai1", "radio-signal-id" : "26"}],
        [{"uuid" : "NE2", "ltp" : "ai2", "radio-signal-id" : "27"}, {"uuid" : "NE3", "ltp" : "ai1", "radio-signal-id" : "27"}],
        [{"uuid" : "NE3", "ltp" : "ai2", "radio-signal-id" : "28"}, {"uuid" : "NE1", "ltp" : "ai1", "radio-signal-id" : "28"}]
        ]
    },
    "ety" : {
      "links" : [        
      ]
    }
  }
}

An example emulator configuration file config.json is shown below:

{
  "controller" : [  
  {
    "ip-address" : "192.168.254.254",
    "port" : 8181,
    "username" : "admin",
    "password" : "admin"
  }
  ],
  "managementIpNetwork" : "192.168.0.0/16",
  "hostIpNetwork" : "10.10.0.0/16",
  "notificationPeriod" : 10,
  "automatic-odl-registration" : true,
  "portBasedEmulation" : true,
  "netconfPortBase" : 12000,
  "sshPortBase" : 15000,
  "emulatorIpAddress" : "192.168.254.253"
}

The information about the SDN controller, where the emulated NEs automatically register, is available under the controller object.

The range for the management IP of the network elements is given by the managementIpNetwork object, and the range for the IPs of the hosts connected to the NEs is configurable through the linksIpNetwork element.

Each NE is capable of generating a random problem-notification NETCONF nofiticaion, from its available supported-alarms. The value of notificationPeriod object represents the amount of seconds between each such random notifications.

  • Starting the emulator is done with the following command (asuming you are in the base folder):

sudo wtemulatorpoc5 --config=config.json --topo=topology.json --xml=yang/microwave-model-config.xml

Alternatively, the emulator can be starting using the start.sh script, after you configure there what topology file to be used:

./start.sh

  • Stopping the emulator is done with the commands quit or exit executed from the CLI. This will delete all the previously created docker containers, docker networks.

  • Cleaning might be necessary if previous runs were not terminated correctly. This will delete all the previously created docker containers, docker networks.

sudo wtemulatorpoc5 --config=config.json --clean

Alternatively:

./clean.sh

Contact

[email protected]

[email protected]

wte_poc5's People

Contributors

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