1

I am running a small experiment to isolate bandwidth with flowvisor (version 1.4, version 1.0 of openflow) implementing a port based slicing. With mininet, I create a topology that consists of a host h1 (10.0.0.1), connected to a switch, called s3, connected to another host, h2 (10.0.0.2), this way:

h1 ----- s3 ------ h2

To achieve this I use this mininet command to run my custom topology (called simpletopo.py): sudo mn --custom simpletopo.py --topo mytopo --switch ovsk --controller remote --mac --arp --link tc

I want all traffic going to port 666 from h1 to h2 (and vice versa) to have a bandwidth of 1Mbps, and all traffic going to port 555 from h1 to h2 (and vice versa) to have a bandwidth of 1Gbps. To achieve this, I create two queues in switch s3, q0 and q1. q0 is for the 1Mbps traffic and q1 for 1Gbps traffic.

First, I create the two slices:

fvctl add-slice slice1 tcp:127.0.0.2:6643 [email protected]
fvctl add-slice slice2 tcp:127.0.0.3:6653 [email protected]

Then, I allocate flowspace:

fvctl -f pass add-flowspace --queues=1 --forced-queue=1 flow1 3 100 in_port=2,tp_dst=666 slice1=7
fvctl -f pass add-flowspace --queues=1 --forced-queue=1 flow2 3 100 in_port=1,tp_src=666 slice1=7
fvctl -f pass add-flowspace --queues=1 --forced-queue=1 flow3 3 100 in_port=1,tp_dst=666 slice1=7
fvctl -f pass add-flowspace --queues=1 --forced-queue=1 flow4 3 100 in_port=2,tp_src=666 slice1=7
fvctl -f pass add-flowspace --queues=0 --forced-queue=0 flow5 3 100 in_port=2,tp_dst=555 slice2=7
fvctl -f pass add-flowspace --queues=0 --forced-queue=0 flow6 3 100 in_port=1,tp_src=555 slice2=7
fvctl -f pass add-flowspace --queues=0 --forced-queue=0 flow7 3 100 in_port=1,tp_dst=555 slice2=7
fvctl -f pass add-flowspace --queues=0 --forced-queue=0 flow8 3 100 in_port=2,tp_src=555 slice2=7

I use the queue option to tell flowvisor which slices are available to each flowspace and the forced-queue option to force flowvisor to change the output actions for enqueue actions in the queue specified.

Then I run two POX controllers, one for each slice:

./pox.py --verbose pox.openflow.of_01 --address=127.0.0.2 --port=6643 pox.forwarding.l2_learning
./pox.py --verbose pox.openflow.of_01 --address=127.0.0.3 --port=6653 pox.forwarding.l2_learning

Now, I run the topology with mininet. At this point, the two slices work fine, each one controlls its traffic. Traffic uses all bandwidth.

Now I want to throttle the bandwidth. To achieve this I create the queues mentioned above.

I create the queues like this:

sudo ovs-vsctl -- set Port s3-eth1 qos=@newqos -- set Port s3-eth2 qos=@newqos -- --id=@newqos create QoS type=linux-htb other-config:max-rate=1000000000 queues=0=@q0,1=@q1 -- --id=@q0 create Queue other-config:min-rate=1000000 other-config:max-rate=1000000 -- --id=@q1 create Queue other-config:min-rate=1000000000 other-config:max-rate=1000000000

When I run tests with iperf, I got all traffic throttled to 1 Mbps. When I run sudo ovs-ofctl queue-stats s3, I see that all traffic passes through queue 0 (default queue for openflow) and no traffic passes through queue 1.

What's going wrong? Is there something wrong with flowvisor or the creation of queues?

Thanks a lot.

2
  • It seems to be working on vm port only. What about setting the qos and queues on real router's port like wlan0? Any idea?
    – Garlex
    Commented Mar 30, 2016 at 5:36
  • I am working on similar topology. When I run the add-flow my flowvisor stops immediately. Can please suggest me any? Thank you NB: Here are the versions I am using Flow-visor version 1.4 Open-flow version 1.0 Best Regards, Haftay Commented May 10, 2016 at 13:51

1 Answer 1

3

Finally I figured out what was wrong:

After creating the qos and queues, it's necessary to define the flows, like this:

sudo ovs-ofctl add-flow s3 in_port=1,dl_type=0x0800,nw_proto=6,tp_dst=666,priority=100,actions=set_queue:1,normal

sudo ovs-ofctl add-flow s3 in_port=1,dl_type=0x0800,nw_proto=6,tp_dst=555,priority=100,actions=set_queue:0,normal

sudo ovs-ofctl add-flow s3 in_port=2,dl_type=0x0800,nw_proto=6,tp_dst=666,priority=100,actions=set_queue:1,normal

sudo ovs-ofctl add-flow s3 in_port=2,dl_type=0x0800,nw_proto=6,tp_dst=555,priority=100,actions=set_queue:0,normal

This way we are telling openflow which traffic must pass through each queue. However, with this procedure, I have seen that it is not necessary to use the options queue and forced-queue of flowvisor.

Source:

ovs-ofctl add-flow<bridge><match-field>actions=set_queue:<queue>

By taking this action, the packets that is output the port will be output the specified queue. Different switch has different numbers of supported queues. (http://www.pica8.com/document/v2.3/html/ovs-commands-reference/)

2
  • You should accept your answer so that the question doesn't keep popping up and looking for an answer.
    – Ron Maupin
    Commented Feb 18, 2016 at 15:46
  • I want to do that, but I have to wait 23 hours since I posted my answer... Commented Feb 19, 2016 at 8:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.