Ask Your Question

REST command (body) with tcp port range?

asked 2016-05-05 02:37:22 -0700

nodachi gravatar image

updated 2016-05-05 03:59:37 -0700


I'm trying to add a flow on my OVS with tcp port range (e.g. 1000-1007) via controller. I have successfuly installed this flow directly through CLI on my OVS (command: sudo ovs-ofctl add-flow bridge1 dltype=0x800,nwproto=6,tp_dst=1000/65528,actions=output:1) so I know my OVS version supports this.

What I want to do now is send REST command to my controller, and then the controller sends appropriate OpenFlow command to OVS which will add specified flow. To do this, I need appropirate XML body to send in my REST command. I've tried with the .xml body presented below, but I'm getting an error.

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

I'm using OpenDaylight Lithium controller and OVS 2.4

I think that I'm not using correct .xml tag for tcp port since I get an error below. Does anyone know how to do this?

        <error-message>Error parsing input: Incorrect lexical representation of integer value: 1000/65528.
An integer value can be defined as: 
  - a decimal number,
  - a hexadecimal number (prefix 0x),
  - an octal number (prefix 0).
Signed values are allowed. Spaces between digits are NOT allowed.</error-message>
edit retag flag offensive close merge delete


Check this link

karthik330 ( 2016-05-05 03:30:50 -0700 )edit

I've searched through all these examples and haven't found the REST body I need. The example I've shown in my question is derived from your link.

nodachi ( 2016-05-05 03:57:13 -0700 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2016-05-05 21:29:57 -0700

jamoluhrsen gravatar image

I may be wrong, but I think this might be a limitation of openflowplugin. You can ask for clarification by sending an email to openflowplugin-dev@lists.opendaylight... . If that's the case, you could request the enhancement on that list or open a bug on bugzilla.

The yang model that describes the tcp port match fields does not appear to have masking available. see here

In the meantime, as a workaround, maybe you could add 8 separate flows, one for each of the ports in your 1000-1007 range?

edit flag offensive delete publish link more


Thank you very much, it really appears that yang model does not support tcp port masking. I'll send an e-mail to and ask them about my problem.

nodachi ( 2016-05-05 23:44:54 -0700 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2016-05-05 02:37:22 -0700

Seen: 59 times

Last updated: May 05 '16