SD-WAN

 View Only
  • 1.  How to get DataPathId of switch for a node that has a certain IP Address

    Posted Oct 15, 2014 10:36 PM

    Hello,

    I would like to kindly ask how via the 2.3.5 SDN Controller API I would be able to get the DataPathId(s) of the switch(es) that are passing packets with a specific source IP Address.

     

    I know that I can get all the nodes with the IP Address by using the NodeService as follows:

     

    Set<Node> nodes = nodeService.getNodes(IpAddress.ip(ipAddress));

     

    Now with the node's NodeLocation I can even get the node's elementId/InterfaceId/DeviceId, but via this information how can i get the swtich(es) DatapathId(s) that are passing packets with this as a source IP Address? I need this information to target the specific switches with FlowMod messages to drop packets with the specified source IP Address. Thanks!

     

    -David



  • 2.  RE: How to get DataPathId of switch for a node that has a certain IP Address

    Posted Oct 17, 2014 12:45 AM

    Hello David,

     

    Function call getNodes as below

    Set<Node> getNodes(IpAddress ip) which returns all nodes in the domain with a given IP address.

     

    Node has below function which returns the most recent node location(NodeLocation ).

    NodeLocation    location()

     

    Again NodeLocation can call a function elementId() which returns DeviceId    and then function toString() can be called .

    Finally             static DataPathId    dpid(String spec) will give the dpid i.e. DataPathID

     

    Please let us know if this helps or you still face the issue.

     

    Thanks,

    HP SDN Team

     



  • 3.  RE: How to get DataPathId of switch for a node that has a certain IP Address

    Posted Oct 20, 2014 01:27 PM

    Thank you,

     

    Out of curiosity is this documented anywhere in the SDK PDF manual? I would like to read more about how to use the different interfaces and what they mean. 

     

    -David



  • 4.  RE: How to get DataPathId of switch for a node that has a certain IP Address

    Posted Oct 28, 2014 01:29 AM

    Hello David,

     

    You can find the information in Java API documentation.

    Doing a follow up to see if you need any further assistance with respected to the query.

     

    Thanks,

    HP SDN Team