Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting queues on ports #120

Open
ghost opened this issue Jul 16, 2017 · 9 comments
Open

Setting queues on ports #120

ghost opened this issue Jul 16, 2017 · 9 comments

Comments

@ghost
Copy link

ghost commented Jul 16, 2017

Hi,

I am new to the whole SDN thing and I am exploring QoS with ONOS controller and Openflow 1.3 enabled switch using Queues and Meters. I have setup a simple network using 1 Lagopus switch and 2 virtual hosts.
I want to set 2 queues on each port with high and low priority. I do not know how to set queues on the Lagopus switch. I have done it previously on Open vSwitch but then found out that it does not support meters yet.

This guide gives a brief hint

http://www.lagopus.org/lagopus-book/en/html/datastore.html?highlight=queue#queue-object

do I need to add these lines to the lagopus.dsl file? If someone could point me to any guide or example, it would be great help. @kishiguro @falcon8823 @cl4u2 @hidetai @ynkjm

Thanks
Pradeep Jha

@ghost
Copy link
Author

ghost commented Jul 17, 2017

do I simply add the lines to add the queue in lagopus.dsl ?? As mentioned in the file https://github.com/lagopus/lagopus/blob/master/test/datastore/long_run/test_scenarios/functional_tests/queue.dsl .

i want to set 2 queues on the ports with different priorities.

@hibitomo @ynkjm

@hirokazutakahashi
Copy link
Contributor

Hi,

You have to make queue objects and attach them to port objects.

The queue objects can be attached by using "-queue" of port objects as mentioned in the lagopus-book
http://www.lagopus.org/lagopus-book/en/html/datastore.html?highlight=queue#port-object .
Multiple queues can be attached by using multiple "-queue" options.

Then you can use the set-queue action of OpenFlow to select the queue.

But actually the queue function have not been tested well and it may have bugs.
So please tell us your test results.

Thank you!

@ghost
Copy link
Author

ghost commented Jul 20, 2017

@hirokazutakahashi Thanks for the reply.

I do everything as mentioned by you and the link you have provided. but as soon as I add the lines to create the queue object to the lagopus.dsl file and the restart the switch using sudo lagopus command, the switch doesnt start anymore. the show version command on lagosh shows the error "switch not running?"

Any idea why that might be happening?

@hirokazutakahashi
Copy link
Contributor

Can you check or paste the console log and syslog by using "-d" option for lagopus?
$ sudo lagopus -d (other options)

@ghost
Copy link
Author

ghost commented Jul 21, 2017

hi @hirokazutakahashi thanks for the reply.

everything works fine with mininet and onos and lagopus, unitl I configure the file to add queues.

sudo lagopus -d does not do anything and remains in a blank screen forever. I have to stop it by keyboard interrupt. lagopus -l option however produces the log file which I have included in the comment.

Attached below are my lagopus.conf file and lagopus.dsl file. If only I remove everything related to queues, it starts working correctly.

With these setting in place, mininet won't start anymore and fail at starting switches

Starting 1 switches
s1 --------------------------------------------------------------------------------
Caught exception. Cleaning up...

error: [Errno 111] Connection refused
--------------------------------------------------------------------------------

I have tried both the methods, writing directly to the dsl file as well as using the lagosh shell to configure->edit->commit->save to the same result. One thing to note though is that when I commit my conf file, it throws an error saying INVALID_ARGS: Bad opt = -id.

lagopusConf.txt
lagopusDSL.txt
lagopus-l.txt

@hirokazutakahashi
Copy link
Contributor

Hi @pjpradeepjha,

Please try to edit the DSL file as follows.

The lagopus-l.txt seems to indicate multiple starts, another lagopus process was already running.

@ghost
Copy link
Author

ghost commented Jul 24, 2017

oh great. thanks @hirokazutakahashi
I removed the queue id from the queue object and added it on the port object and the configure -> commit -> save was successful.

It just that the instructions on the lagopus-book says otherwise. Maybe we should update it accordingly.

Also, is there any way we can check if the queues have actually been created and attached to a port. Like, is there any Lagosh CLI command that would confirm that.

I created a flow on the switch and pointed it to the queue using ONOS. The pings are going through, but for some reason the iperf tcp test is unable to connect the client with the server. and iperf udp test is not sending any server statistics. FYI, I am using the lagopus version of mininet. The tests works fine with the OVS switch and rate limiting queues.

@hirokazutakahashi
Copy link
Contributor

At now, there are no commands related to queues in the lagosh.
But you can check queue related configuration by using lagopus DSL interface.

$ telnet localhost 12345
Then you can check queue configuration by
queue[enter]
and port configuration by
port[enter].

At now, I have no idea for the iperf problem.
But the mininet version of lagopus uses raw sockets instead of DPDK interfaces by some interoperability problems.
The raw socket implementation is for debug purpose.
So it's very low performance and may not have full functionality.
Please try DPDK configuration if you can.

@ghost
Copy link
Author

ghost commented Jul 26, 2017

thank you so much @hirokazutakahashi

you have been extremely helpful throughout. I tried everything as you directed and got the following output on telnet

pradeep@peace:~$ telnet localhost 12345
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
queue
{"ret":"OK",
"data":[{"name":":queue01",
"type":"two-rate",
"id":1,
"priority":2,
"color":"color-blind",
"committed-burst-size":15000,
"committed-information-rate":15000,
"peak-burst-size":1500,
"peak-information-rate":1500,
"is-used":true,
"is-enabled":true}]}


port
{"ret":"OK",
"data":[{"name":":s1-eth1-p",
"port-number":1,
"interface":":s1-eth1-i",
"policer":"",
"queues":{":queue01":1},
"is-used":true,
"is-enabled":true},
{"name":":s1-eth2-p",
"port-number":2,
"interface":":s1-eth2-i",
"policer":"",
"queues":{},
"is-used":true,
"is-enabled":true}]}

Looks like the queues are successfully created and bound to the ports. I'll now try to test them with iperf and let you know the results.

Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant