[SNMP4SDN-15] Exception error of REST API get-arp-entry, if the IP address is not in the switch's ARP table Created: 17/Feb/16  Updated: 19/Oct/17

Status: In Review
Project: snmp4sdn
Component/s: General
Affects Version/s: unspecified
Fix Version/s: None

Type: Bug
Reporter: Christine Hsieh Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 5367

 Description   

To get ARP entry, using the REST API, if the <ip_address> is not in the switch's ARP table, then get an Exception error message.

curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://<controller_ip_address>:8181/restconf/operations/misc-config:get-arp-entry -d "{input:{"node-id":<node_id>, "ip-address":'<ip_address>'}}"

Client get error:

<p>Problem accessing /restconf/operations/misc-config:get-arp-entry. Reason:
<pre> Server Error</pre></p><h3>Caused by:</h3><pre>java.lang.NullPointerException
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:210)
...



 Comments   
Comment by Nanfei Chen [ 29/Feb/16 ]

I have committed two changes for this bug.

https://git.opendaylight.org/gerrit/#/c/35522/

https://git.opendaylight.org/gerrit/#/c/35523/

There will be some problems if we use the oid which consists of arpTableEntryPhyAddrOID, midStuffForArpTableEntryOID and ipAddress to get the mac address corresponding to the ipAddress in arp table.

Because the midStuffForArpTableEntryOID is not always 5121 for all devices which come from different vendors.

Furthermore, the midStuffForArpTableEntryOID is also not a constant even for a same device. For example, when I use MG-SOFT MIB Browser software to get ipNetToMediaPhysAddress(this oid is arpTableEntryPhyAddrOID, and it is 1.3.6.1.2.1.4.22.1.2) from h3c's device, the result is as follows.

          • SNMP QUERY STARTED *****
            1: ipNetToMediaPhysAddress.37.192.168.1.1 (PhysAddress) 70:F9:6D:EB:03:17 [70.F9.6D.EB.03.17 (hex)]
            2: ipNetToMediaPhysAddress.39.192.168.5.1 (PhysAddress) 70:F9:6D:EB:03:17 [70.F9.6D.EB.03.17 (hex)]
            3: ipNetToMediaPhysAddress.47.172.168.2.1 (PhysAddress) 00:50:56:60:AC:56 [Vmware_60:AC:56]
            4: ipNetToMediaPhysAddress.26446.98.0.0.1 (PhysAddress) 00:0F:E1:21:21:15 [Id_21:21:15]
            5: ipNetToMediaPhysAddress.26446.98.0.0.5 (PhysAddress) 5C:DD:70:0F:00:D0 [5C.DD.70.0F.00.D0 (hex)]

We can see that the midStuffForArpTableEntryOID is not a constant even for a same device from this example.

Comment by Nanfei Chen [ 29/Feb/16 ]

By the way, I have committed two new bugs, SNMP4SDN-16 and SNMP4SDN-17.

And I have also committed four changes for the two bugs.

Thank you.

Generated at Wed Feb 07 20:39:18 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.