SNMP returning strange values BSR 64K | docsis.org

You are here

SNMP returning strange values BSR 64K

4 posts / 0 new
Last post
kamien
SNMP returning strange values BSR 64K

I've built a small app our techs can use to monitor CMTS status, currently has simple things like upstream SNR, total modems online/offline, that sort of thing.

I'm trying to add a simple ping test to show online/offline and latency, but I'm getting strange results from the CMTS for mac addresses. When I query the CMTS for a list of MAC addresses, most return fine but some show up like "P9UJ%", "P9UT[", "P9UK5", "P9UMv".

If I login to the CMTS and do a "show cable modem" command, all of the modems and their MAC addresses show up fine. Naturally this is causing some false-positives as these modems appear to actually be online and working fine.

Here's basically how my script works:

1. snmpwalk 1.3.6.1.2.1.10.127.1.3.3.1.2 to get a list of MACs
2. snmpwalk 1.3.6.1.2.1.10.127.1.3.3.1.3 to get a list of IPs
3. Correlate the MAC and IPs via their snmp ID.
4. Ping each IP
5. Record modems that either have no IP, the ping fails, or the ping has high RTT.
6. Correlate those modems to customer info from provision server using the modem MAC
7. Generate a human-readable list of modems w/ helpful info our techs can use to identify issues.

kamien
Forgot to mention that the

Forgot to mention that the script is running on a CentOS 7 server using basic snmp tools in a bash script. I quickly tried msarmento's "CMTS simple monitoring tool" on a test windows server and all of the modems showed up fine.

kwesibrunee
This is net-snmp trying to

This is net-snmp trying to interperet the Octet string that is returned as ascii

basically because your using the oid notation net-snmp doesn't know what format the mac address should be it is just a sequence of octets.

you can do a few things

add -Ox as a parameter to your net-snmp command this tells net-snmp to treat octet strings like hex rather than ascii. The default is to look at the first octet, if it is a printable ascii character treat as ascii, hex otherwise.

e.g. snmpbulkwalk -v2c -c -Ox 1.3.6.1.2.1.10.127.1.3.3.1.2

install the MIBs necessary for Net-SNMP to use the Textual Convention to automatically convert the Octet string to a human readable value. Note the Textual convention for mac adressses puts them in the 0:1:2:3:a:3a:b2 format, i.e. single character for hex strings less than 10 (in hex this is 16). you would then tell net-snmp where to look for the mibs and what mibs to load, and you can query by name as well
i.e. snmpbulkwalk -v2c -c -M /usr/shar/snmp/mibs DOCS-IF3-MIB::docsIf3CmtsCmRegStatusMacAddr

if you include the name of the mib i.e. DOCS-IF3-MIB :: oidname it will automatically load the appropriate modules otherwise use the -m ALL flag or -m DOCS-IF3-MIB

kamien
Thanks

Thanks for the explanation. I added the correct MIB to my snmpwalk command and now I'm getting the correct values!

Log in or register to post comments