Ask is moving to Stack Overflow and! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode


Meter bandwidth

asked 2015-01-20 07:09:54 -0700

buddah gravatar image

Hi there, sorry to bother, i have opendaylight helium and i would like to know per example, how can i limit speed to connection between two hosts and give priority to this connection above others? Can it be done by GUI ? Thanks:)

edit retag flag offensive close merge delete

5 answers

Sort by » oldest newest most voted

answered 2015-01-30 08:58:16 -0700

mawil gravatar image

updated 2015-01-30 09:02:04 -0700

You can use REST calls for this, there are several tools for doing this, i use curl or the postman plugin for chrome. To enable REST functionality in karaf, please install odl-restconf or odl-restconf-noauth, if you only want to test the REST calls without any authentication.

To create an meter with the band type drop which limits the bandwidth to 50000kbps you can use the following REST call:

Address (change "ip" and "openflow:1" according to your settings):

PUT http://ip:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/meter/1



To assign a meter with id 1 to a flow (which should be limited to band of the meter) with id 10, see below. Note, you can also assign some other flows to this meter.


PUT http://ip:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/100/flow/10


<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">

There are several other examples in the wiki: OFPlugin1, OFPlugin2

And some others in the OpenflowPlugin git repository. You can clone the repository with:

git clone

The examples are used for Openflowplugin test-scripts and located in "test-scripts" -> "xmls".

edit flag offensive delete publish link more


thanks a lot i would give it a try:) Can you post also a simple Rest call for a flow from a input port to a output port:) i would apreciate it very much. Is that i can't add flow by gui in Helium. i'm gonna do it with postman. Thanks a lot really ...mawil. waiting for your answer.

buddah ( 2015-01-30 09:46:54 -0700 )edit

According to the links i posted previously (OFPlugin2, search for "Input Port"). You have to add " <in-port>5</in-port>" inside the "<match>...</match>" tag to match for in-port 5... I would really appreciate if you can upvote and accept (above, little tick on the left) the answer if it works for you :)

mawil ( 2015-01-30 10:31:26 -0700 )edit

thanks a lot:)

buddah ( 2015-02-02 08:16:38 -0700 )edit

i'm having a trouble adding meters. I can add normal flows by REST(using postman) and they work. I can see them on the switch and on the controller ( ...restconf/operational/...) but when i create a meter, it gives me success putting in but when i'm going to see it in ..restconf/operational... nothing appears and it gives me error - application data-missing Request could not be completed because the relevant data model content does not exist. It gives me the same error creating an flow using the meter (success-ok) but again when going to see it if it's operational , the same error... what you think it is? thanks

buddah ( 2015-02-18 02:57:31 -0700 )edit

Are the meters on the switch? Are the flows, to which you have assigned a meter on the switch (e.g. actions=meter:33,output:33)? restconf/operational contains stats of flows/meters/etc. You can check the statistics with restconf/operational/opendaylight-inventory:nodes/node/openflow:1/meter/33

mawil ( 2015-02-18 09:21:24 -0700 )edit

answered 2015-01-21 02:46:13 -0700

Ashwini_Mhatre gravatar image

Hi , If you are using mininet for network simulation then you can specify speed limit i.e bandwidth through mininet custom topology.

Regards, Ashwini mhatre.

edit flag offensive delete publish link more

answered 2015-01-21 03:30:39 -0700

buddah gravatar image

i have a real network , and i would like to speed limit bandwidth in diferent connections..thanks for your answer

edit flag offensive delete publish link more

answered 2015-01-23 01:14:29 -0700

buddah gravatar image

Ashwini mhatre, do you know if it's possible to limiet bandwidth through the controller opendaylight hydrogen?..:)

edit flag offensive delete publish link more


Hi, currently i am using opendaylight this distribution you can check following classes. Step1: controller/opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/switchmanager under this class there is one method createProperty through which you can create bandwidth as a controller property. step 2: /root/mdsal/controller/opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/ControllerProperties under this class there is setControllerProperty(Property property) method through which you can set bandwidth as a controller property. but i had never tried this approach.its just hint you can try it. and let me know if its working. Regards,

Ashwini_Mhatre ( 2015-01-23 02:29:05 -0700 )edit

answered 2015-01-30 07:32:22 -0700

tamburro gravatar image

updated 2015-01-30 07:33:05 -0700

Mininet enables specify speed limit and bandwidth, but implementation with OpenVSwitch (--switch ovsk) isn't aware of features of switches. It is a limitation of Linux Kernel ( becasue Mininet uses emulation from kernel) and for now it's impossible to get the real specific of switches, they will appear from controller standard for all type od links. So you shall specify in application the cost of each link. Regards Arthur

edit flag offensive delete publish link more


Really...thanks for all your answers. Well, MIninet is not an option for my situation, I really would like to meter bandwidth between switch and host. For example, let's say i have 10mb connection, i want to give 8 mb to host1 priority1 and the rest to the other host. Of course i would like to do this from the controller. I don't know if it's possbile. Regards José

buddah ( 2015-01-30 07:55:55 -0700 )edit
Login/Signup to Answer

Question Tools



Asked: 2015-01-20 07:09:54 -0700

Seen: 2,728 times

Last updated: Jan 30 '15