- Community Home
- >
- Networking
- >
- Software Defined Networking
- >
- Problems by adding Flows via REST API of HPE-SDN-C...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-18-2017 02:39 AM
тАО10-18-2017 02:39 AM
Hi HPE Team,
I am trying to add a Flow via REST API on HPE SDN-Controller Version 2.7.18. I just added a picture to illustrate my method. Below you can see my "test" Flow which I copied from an other user of this forum (sylee). He had the same problem. But he tried to add 2 Flows and not just one. According to him this Flow below was able to add.
{
"flow": {
"priority": 30000,
"table_id": 200,
"idle_timeout": 60,
"match": [
{ "ipv4_src": "10.0.0.1"},
{"ipv4_dst": "10.0.0.22"},
{"ip_proto": "tcp"},
{"eth_type": "ipv4"},
{"tcp_dst": "80"}],
"instructions": [{"apply_actions": [{"output": 1}]}]
}
}
But I get this error message. I also tried own Flows but I get always the same error message. I also did authenticate myself at the RSdoc UI.
{
"error": "java.lang.IllegalArgumentException",
"message": "Failed to validate flowmod: {ofm:[V_1_3,FLOW_MOD,112,452680],cmd=ADD,match={Match(V_1_3):[type=OXM,len=37],fields=ETH_TYPE,IP_PROTO,IPV4_SRC,IPV4_DST,TCP_DST},...}"
}
I use the RSdoc Web REST API via Chromium Browser with Debian 8.9. If u need further information, just ask me.
I hope you can help me
Regards Tobias
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-18-2017 04:43 PM
тАО10-18-2017 04:43 PM
Re: Problems by adding Flows via REST API of HPE-SDN-Controller V 2.7.18
I am unable to test this right away, but the only extraneous thing I see is the "tcp_dst":"80" ... can you try without the quotes around 80?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-19-2017 02:48 AM
тАО10-19-2017 02:48 AM
Re: Problems by adding Flows via REST API of HPE-SDN-Controller V 2.7.18
Thanks a lot for your answer.
Meanwhile I found some other discussion here in this forum with the same problem. Furthermore I found the "Main-Problem" in my switch configuration. I had 2 problems:
1. On my HPE 2920 Switch I configured in my OpenFlow instance "table-num sw-table-1 0". But 0 seems not to be allowed, according to the other discussions. Finally I deleted this configuration. (See appendix picture "no_table_num").
2. The port in my above posted flow, isn't part of a VLAN which contains to my OpenFlow instance of_vlan. So I changed my flow a bit and used a correct port and that worked almost fine for me. Here my new flow:
{
"flow":{
"priority":50000,
"hard_timeout":60,
"table_id":100,
"match":[
{
"ipv4_src": "192.168.59.10"
},
{
"eth_type": "ipv4"
},
{
"in_port": 23
}
],
"instructions":[
{
"apply_actions":[
{
"output":24
}
]
}
]
}
}
There is one problem left:
Although I can send the flow now to my switch, I still get an "error" message (see picture error_json)
Code 201 seems to be okay, but this may leads to a problem I am not aware of?
Hope you know this report message.
Regards Tobias
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-24-2017 01:26 PM - edited тАО10-24-2017 01:30 PM
тАО10-24-2017 01:26 PM - edited тАО10-24-2017 01:30 PM
SolutionHi Tobias,
It looks like things are operating now. The '201' status code indicates 'created' and should be considered equivalent to 200 when testing for success. Regrettably the "Response Body" is highlighted in red in our JSON web interface, as shown in your "error_json.png" screenshot:
https://restfulapi.net/http-status-201-created
In general, when you see the REST API return a message that says "Failed to validate flowmod", a good rule of thumb is to enable OpenFlow debug messages on the switch. This will only be useful if the switch is in a controlled environment (because you'd be seeing debug for all OpenFlow operations), but it will tell you why the switch is rejecting the flowmod. In your case above, it would remove the guesswork as to what is wrong with the flowmod (ingress port). If you don't see any openflow debug output on the switch, then the flowmod is being rejected by the VAN controller (but that's a rarer case, usually caused by improperly-formatted JSON).
To enable OpenFlow debug on the switch, use:
debug openflow debug destination session
Then to turn it off, use:
no debug all
I think the result of the "table-num sw-table-1 0" command would be that the switch would use table 0 in the pipeline as a software table, which means no hardware table would be used. For what it's worth, you should only need to use "table-num ..." commands if you're dealing with a non-VAN controller that doesn't understand the HPE Aruba switch pipeline. In all other cases, just using "pipeline-model standard" (tables 0,100,200) or "pipeline-model custom" (flexible tables, only available on 2930F, 3810, 5400R) should be sufficient.
I hope this helps!
Shaun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-07-2017 12:51 AM
тАО11-07-2017 12:51 AM
Re: Problems by adding Flows via REST API of HPE-SDN-Controller V 2.7.18
Hello Shaun Wackerly,
sorry for the late response and thank you for this information. I use the Flow-Tables now in that way you mentioned it. I am going to add some other Meters via the REST API next time and there I will use the debug mode.
I hope this will help me there too. Thanks for your support!
Tobias