snmpciscodiscoverysnmp4joid

Ip Address is not returning on rquesting cdpCacheAddress in snmp, instead showing c0:a8:0a:xX


i did a snmpwalk code in java , to retrieve data associated with cdp cache. except cdpCacheAddress, every thing is showing as expected. cdpCacheAddress is expected as IP but shows as c0:a8:0a:xX . the oid i requested is begins with .1.3.6.1.4.1.9.9.23.1.2.1.1.4. how can i find the ip address of the neighbor with this data. is there any other way to find the neighbor's IP address with cdp . please help.


Solution

  • That is an IP address.

    It's four octets, each shown in hex, delimited by colons. It could also be rendered as "192.168.10.xX".

    The syntax is defined to be a CiscoNetworkAddress (whose definition includes the DISPLAY-HINT that results in the default rendering you see), so you should interpret it as such.

    You can transform & display it however you like!

    How to do that depends entirely on your language/environment.