I'm trying to perform rate limiting using Queues on Openflow. I've been using 3 files. One to create the topology (top.py), one to create the policies (pol.py) and one to create queues (queue.py).
The topology consists of 3 nodes (h1, h2, h3) and 3 switches (s1, s2, s3), with each switch being able to communicate with every node. The default rate limit is set to 1GBps, but I'm trying to limit it to 1MBps using queues.
Top.py contains the default policy between nodes set to 1GBps, which is working fine between h1 and h2
S1Staticflow1 ={'switch':"00:00:00:00:00:00:00:01","name":"S1h1toh2","cookie":"0", "priority":"1","in_port":"1","eth_type":"0x800","ipv4_src":"10.0.0.1", "ipv4_dst":"10.0.0.2","active":"true","actions":"output=2"}
S1Staticflow2 ={'switch':"00:00:00:00:00:00:00:01","name":"S1h2toh1","cookie":"0", "priority":"1","in_port":"2","eth_type":"0x800","ipv4_src":"10.0.0.2", "ipv4_dst":"10.0.0.1","active":"true","actions":"output=1"}
S2Staticflow1 ={'switch':"00:00:00:00:00:00:00:02","name":"S2h2toh1","cookie":"0", "priority":"1","in_port":"1","eth_type":"0x800","ipv4_src":"10.0.0.2", "ipv4_dst":"10.0.0.1","active":"true","actions":"output=2"}
S2Staticflow2 ={'switch':"00:00:00:00:00:00:00:02","name":"S2h1toh2","cookie":"0", "priority":"1","in_port":"2","eth_type":"0x800","ipv4_src":"10.0.0.1","ipv4_dst":"10.0.0.2","active":"true","actions":"output=1"}
However, when I try to use the queue, using set_queue, it doesn't seem to be working.
S1H2 = {'switch': "00:00:00:00:00:00:00:01", "name": "S1H2", "cookie": "0", "priority": "256", "in_port": "1", "eth_type": "0x800", "ipv4_src": "10.0.0.1", "ipv4_dst": "10.0.0.2", "active": "true", "actions": "output=2, set_queue=1"}
S1H1 = {'switch':"00:00:00:00:00:00:00:01","name":"S1H1","cookie":"0", "priority":"256","in_port":"2","eth_type":"0x800","ipv4_src":"10.0.0.2", "ipv4_dst":"10.0.0.1","active":"true","actions":"output=1, set_queue=1"}
S2H1 = {'switch':"00:00:00:00:00:00:00:02","name":"S2H1","cookie":"0", "priority":"256","in_port":"1","eth_type":"0x800","ipv4_src":"10.0.0.2", "ipv4_dst":"10.0.0.1","active":"true","actions":"output=2,set_queue=1"}
S2H2 = {'switch':"00:00:00:00:00:00:00:02","name":"S2H2","cookie":"0", "priority":"256","in_port":"2","eth_type":"0x800","ipv4_src":"10.0.0.1", "ipv4_dst":"10.0.0.2","active":"true","actions":"output=1,set_queue=1"}
Here's my queue implementation:
queuecmd = "sudo ovs-vsctl %s -- --id=@defaultqos create qos type=linux-htb other-config:max-rate=1000000000 queues=0=@q0,1=@q1,2=@q2 -- --id=@q0 create queue other-config:max-rate=1000000000 other-config:min-rate=1000000000 -- --id=@q1 create queue other-config:max-rate=1000000 other-config:min-rate=1000000 -- --id=@q2 create queue other-config:max-rate=512000 other-config:min-rate=512000"
I'm testing using iperf3, but the rates seem the same with or without the queues. How do I fix this?
0 Answers