2

I want to make testbed for testing the my own algorithm in mininet. I want to setup link data traffic rate, control traffic rate and link processing rate. but i am not able to it. if anyone have idea how to set up all these. please help me.

thanks, abha

abha
  • 21
  • 1
  • 3
  • What have you tried so far? What has happened? What did you expect to happen? https://stackoverflow.com/help/mcve – Robert Sep 03 '16 at 15:33
  • 1
    I have made a network which consists of some switches as nodes and links between these nodes and a controller as pox. load balancing balancing application is working. I want to find out avg. delay of network for which i need to setup link data traffic rate(40packet/s), control traffic rate(20packet/s) and link processing rate. how to setup these parmeters – abha Sep 04 '16 at 12:43
  • how to use d-itg to generate continuous random traffic in the network with abilene topology and and each switch has 3 hosts? I want that traffic should look like internet traffic. – Vinay Sep 06 '20 at 20:04

1 Answers1

7

TL;DR Use D-ITG to generate traffic of your choice.

To define a topology in Mininet -

You can use the MininetEdit.py application in mininet/examples/miniedit.py folder. This will create a .py file defining the topology. You could have also written the same code to create the topology, the MininetEdit application is just a GUI to make it easy.

A sample topology definition looks something like this -

(I have created a simple network with 2 hosts h1, h2 connected to a switch s1)

#!/usr/bin/python

from mininet.net import Mininet
... #More import calls

def myNetwork(net):

info( '*** Add switches\n')
s1 = net.addSwitch('s1')


info( '*** Add hosts\n')
h1 = net.addHost('h1',ip='10.0.0.1',defaultRoute=None)    
h2 = net.addHost('h2',ip='10.0.0.2',defaultRoute=None)

info( '*** Add links\n')    
net.addLink(h1, s1,bw=200,delay='0ms',loss=0,max_queue_size=1000)
net.addLink(h2, s1,bw=200,delay='0ms',loss=0,max_queue_size=1000)
return net

You can set the maximum link rate / bandwitdh in the MininetEdit app, or change the bw parameter in the addLink function in the code file manually.

If you want to generate some real traffic on this mininet topology, use D-ITG. This is a simple tool that will allow you to generate traffic with different distributions, inter-arrival times, packet sizes, etc.,

So if you want to generate constant rate traffic of say rate KB/s from host h1 to h2, you can follow these steps -

Run xterm h1 from mininet instance

Run the following command on the terminal of h1

ITGSend -a <ip_of_h2> -T UDP -C <rate> -c <packet_size>

You can refer the D-ITG manual for more.

Piyush Jain
  • 438
  • 4
  • 11