Software Defined Networking
1753774 Members
6814 Online
108799 Solutions
New Discussion юеВ

Problem by adding Netmasks to Ipv4-Match Fields

 
SOLVED
Go to solution
Tobias-hab
Occasional Advisor

Problem by adding Netmasks to Ipv4-Match Fields

Hello,

I try to add a Flow, via RSdoc REST-API at HPE SDN-Controller V 2.17.18, to my HPE 2920 Switch. I tried it like this:

{
"flow":{
"priority":50000,
"hard_timeout":60,
"table_id":100,
"match":[
{"ipv4_src": "192.168.59.10/24"},
{"ipv4_dst": "192.168.58.10/24"},
{ "eth_type": "ipv4"},],
"instructions":[
{ "apply_actions":[{"output":23}]}
]
}
}

Even I tried /255.255.255.0 instead of /24. Both did not work with netmasks, but without them the flow is able to be send to the switch. The error Response Body says:

{
"error": "java.lang.IllegalArgumentException",
"message": "Unsupported customized Match Field ipv4_src"
}

Does someone know the right syntax?

Regards Tobias 

2 REPLIES 2
checho
Occasional Advisor
Solution

Re: Problem by adding Netmasks to Ipv4-Match Fields

I think you have to specify the mask separately:

{
  "flow":{
    "priority":50000,
    "hard_timeout":60,
    "table_id":100,
    "match":[
      {"ipv4_src": "192.168.59.10", "mask": "255.255.255.0"},
      {"ipv4_dst": "192.168.58.10", "mask": "255.255.255.0"},
      { "eth_type": "ipv4"},],
      "instructions":[
        { "apply_actions":[{"output":23}]}
      ]
   }
}
Tobias-hab
Occasional Advisor

Re: Problem by adding Netmasks to Ipv4-Match Fields

Thanks Checho,

just remove the comma between the two closing brackets here { "eth_type": "ipv4"} , ] , and it works fine for me.