SD-WAN

 View Only
Expand all | Collapse all

How to wildcard Ipv4 address?

This thread has been viewed 1 times
  • 1.  How to wildcard Ipv4 address?

    Posted May 24, 2016 03:39 PM

    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!

     



  • 2.  RE: How to wildcard Ipv4 address?

    Posted May 24, 2016 04:40 PM

    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"}]
        }]
      }
    }