Skip to content

Intra site routing (Example 2)

Adib Rastegarnia edited this page Dec 23, 2017 · 16 revisions

This example is very similar to the Example 1 except we add some path constraints to route web traffic via a specific path.

Figure 1

  1. First change the current directory to the example1 directory using the following command:
  • cd OSDF-REACTIVE-APP/osdf-reactive/src/main/java/org/osdfreactive/tools/mininet/example1

2- Execute the following scripts from two separate terminals to setup a mininet simulation scenario which simulates a leaf-spine network topology, define a region of network swtiches that we call it siteA in this example, and post configuration details using REST API:

  • sudo python leaf_spine.py
  • leafspineregions.sh
  • sudo python config.py

3- Deactivate onos reactive forwarding application using the following command:

  • app deactivate org.onosproject.fwd

4- Suppose we want to configure the given network based on the following high level network policy:

  • route web traffic in siteA via of:0000000000000191 using priority 100

To do so, we should execute the following commands from onos cli:

  • intra-route -a WEB -region siteA -p 100 -psa ON_DEMAND --via of:0000000000000191/1 policy1
    • Note: psa option specifies path selection algorithm which is ON_DEMAND here to route a specific traffic through a set of network switches.

5- After the above steps, two hosts should be able to send web traffic to each other and the web traffic will routed via the switch with ID: of:0000000000000191.

6- For the testing purposes, you can use iperf from mininet command line to send TCP traffic on port 80 between two end hosts as follows:

  • xterm h1
  • xterm h4
  • From h1 terminal: sudo iperf3 -s -p 80
  • From h4 terminal: iperf3 -c 10.0.0.1 -t 100 -i 1 -p 80
Clone this wiki locally