Search code examples
c#network-programmingsnmp

Unreliable ipNetToMediaPhysAddress SNMP entries in Brocade ICX 6450


I'm writing software that performs a minor form of network discovery by looking up LLDP neighbor switch IP addresses using SNMP. I've had success finding neighbor switch information in lldpRemoteSystemsData (1.0.8802.1.1.2.1.4), and then finding the corresponding switch IP address in iPNetToMediaPhysAddress (1.3.6.1.2.1.4.22.1.2). I'm finding that some of our Brocade ICX6450 switches seem to be missing certain neighbor IP address entries in iPNetToMediaPhysAddress.

I can telnet to a switch and run

show lldp neighbor detail

and all the neighbor information I need is there, including the IP address I'm looking for. It's obviously known to the switch, but missing when I query the switch using SNMP. All switches involved have the same running config as one another.

Can I expect to reliably find neighbor switch IP's using iPNetToMediaPhysAddress, or is something wrong?

If there is a better undocumented way to find neighbor switch IP's, please let me know and I'll post a new question.


Solution

  • I've found information that indicates the iPNetToMediaPhysAddress reply is based on the current state of the ARP cache on the switch. I pinged the missing neighbor switch from the switch in question, and the IP address is now showing up in the iPNetToMediaPhysAddress reply.

    https://community.brocade.com/t5/Ethernet-Switches-Routers/How-to-get-mac-address-via-SNMP/td-p/17055