Software Defined Networking
cancel
Showing results for 
Search instead for 
Did you mean: 

Error while posting new flow

 
SOLVED
Go to solution
Occasional Visitor

Error while posting new flow

Hi experts,

I'm having some troubles while trying to post some flows using a Python script to the VAN SDN Controller.
I'm just trying for now a very basic POST request, applying a new output port, based on the Source IP and Eth Type.

 

{
   "flow":{
      "priority":50000,
      "hard_timeout":60,
      "table_id":100,
      "flow_mod_flags": ["send_flow_rem"],
      "match":[
         {
            "ipv4_src": "10.105.211.11"
         },
         {
            "eth_type": "ipv4"
         },
         {
            "in_port": 4
         }
       ],
       "instructions":[
         {
            "apply_actions":[
               {
                  "output":1
               }
            ]
         }
       ]
    }
}
 

 

Unfortunately, I get an error from the Controller :

"error": "java.lang.IllegalArgumentException",
"message": "Failed to validate flowmod: {ofm:[V_1_3,FLOW_MOD,96,1394077],cmd=ADD,match={Match(V_1_3):[type=OXM,len=18],fields=ETH_TYPE,IPV4_SRC},...}"


I tried with an empty POST request, to block flows from a client, and it works fine.
I've already change the table_id, trying table 100 and 200, but still get this issue.

 

Knowing that the ultimate goal of this script is to redirect a packet to a new IP dest, with the following JSON code :

 

		"instructions": [{
			"apply_actions": [{
				"set_field": {
					"ipv4_dst": "10.105.100.1"
				}
			}, {
				"output": 1
			}]
		}]


Does anyone already get this error, and how to fix it ?
VAN is in 2.7.18.0503 release, and switch is 2930F 8 ports in 16.03 release.

Thanks a lot for your suggestions.

 

2 REPLIES 2
Highlighted

Re: Error while posting new flow

Hi legall,

I tried the same flow JSON data against a 2930F running WC.16.03.0003 and it worked using VAN 2.8.8. If you use the RSdoc API with this flow JSON, does the RSdoc API give the same failure message? That might help us distinguish a python issue from a JSON issue.

Also, if you could post the OpenFlow portion of your 2930F configuration, that would be helpful.

Shaun

I am an HPE Employee
Highlighted
Occasional Visitor
Solution

Re: Error while posting new flow

Hi all,

After a discussion with Shaun Wackerly, it appeared that the physical port I used to redirect my traffic was not in an openflow-enabled VLAN. The output port has to be in this VLAN, tagged or untagged.
That's why the flow's creation failed.

Thanks a lot for your help, Shaun.