JoeBaltes
2 months agoContributor
Snippet possible bug w/ mac address encoding
Has anyone run into an issue where a few MAC addresses are being read by the snmp handler `snmp_walk` method as gibberish? Non-MAC address string data is returned on some interfaces that seems to be some form of unicode.
This is an example when running the SNMP walk from bash:
IP-MIB::ipNetToMediaPhysAddress.2.10.250.123.5 = STRING: 24:2a:4:f0:7a:c7
This is the same OID when read by the python SNMP handler:
('.1.3.6.1.2.1.4.22.1.2.2.10.250.123.5', '$*\x04ðzÇ')
I've tested the python2.7 execution environment, and the 3.6 env from the Cisco base pack 214.
Thanks!
Joe