Software Defined Networking
1828233 Members
2552 Online
109975 Solutions
New Discussion

How to wildcard Ipv4 address?

 
SOLVED
Go to solution
panluowei
Advisor

How to wildcard Ipv4 address?

Can anyone help me with a flow definition containing a wildcarded ipv4 address in json. I thought it would be something like the following, but the HP VAN Controller (version 2.4.5.0614) returns:

{"error":"java.lang.IllegalArgumentException","message":"Bad address format: 192.168.0.0/16"}

----- flow.json ------

{

"flow": {

"priority": 30000,

"idle_timeout": 30,

"match": [

{"eth_type": "ipv4"},

{"ipv4_dst": "192.168.0.0/16"}

],

"instructions":[{

"apply_actions": [{"output": "NORMAL"}]}]

}}

 

Thanks!

 

1 REPLY 1
ShaunWackerly
HPE Pro
Solution

Re: How to wildcard Ipv4 address?

You'd want to modify the flow JSON you're pushing to include a "mask" parameter along with the IPv4 address, as shown below:

{
  "flow": {
    "priority": 30000,
    "idle_timeout": 30,
    "match": [
      {"eth_type": "ipv4"},
      {"ipv4_dst": "192.168.0.0",
       "mask": "255.255.0.0"}
    ],
    "instructions":[{
      "apply_actions": [{"output": "NORMAL"}]
    }]
  }
}

I am an HPE Employee