Hi,
I am looking for OID for CISCO for:
1. current MAC address table size
2. current ARP table size, current routing table size,
3. TCAM usage stats
Mostly for Cisco 6500/6800 platform.
You'll need to run the snmpset commands manually or automatically through a windows batch file, you'll just need to install net-snmp on a desktop or on your Orion server itself to test this. Snmpset will store the calculated values in the device's MIB. You can then use the Universal Device Poller, or the SAM SNMP Monitor, to query the calculated value. In that forum post, it goes something like below:
snmpset -v 2c -c private 1.3.6.1.4.1.9.10.22.1.2.3.1.3.110.110.110.110.110 i 6snmpset -v 2c -c private 1.3.6.1.4.1.9.10.22.1.2.3.1.3.110.110.110.110.110 i 5snmpset -v 2c -c private 1.3.6.1.4.1.9.10.22.1.2.3.1.2.110.110.110.110.110 u 1snmpset -v 2c -c private 1.3.6.1.4.1.9.10.22.1.3.1.1.4.1 s "NumberOfRoutes"snmpset -v 2c -c private 1.3.6.1.4.1.9.10.22.1.3.1.1.2.1 s '$1 >= 0'snmpset -v 2c -c private 1.3.6.1.4.1.9.10.22.1.3.2.1.2.1.1 o 1.3.6.1.2.1.4.21.1.8snmpset -v 2c -c private 1.3.6.1.4.1.9.10.22.1.3.1.1.3.1 i 4snmpset -v 2c -c private 1.3.6.1.4.1.9.10.22.1.3.2.1.3.1.1 i 1snmpset -v 2c -c private 1.3.6.1.4.1.9.10.22.1.3.2.1.10.1.1 i 1snmpset -v 2c -c private 1.3.6.1.4.1.9.10.22.1.2.3.1.3.110.110.110.110.110 i 1
snmpset -v 2c -c private 1.3.6.1.4.1.9.10.22.1.2.3.1.3.111.111.111.111.111 i 6snmpset -v 2c -c private 1.3.6.1.4.1.9.10.22.1.2.3.1.3.111.111.111.111.111 i 5snmpset -v 2c -c private 1.3.6.1.4.1.9.10.22.1.2.3.1.2.111.111.111.111.111 u 2snmpset -v 2c -c private 1.3.6.1.4.1.9.10.22.1.3.1.1.4.2 s "SumOfRoutes"snmpset -v 2c -c private 1.3.6.1.4.1.9.10.22.1.3.1.1.2.2 s 'sum($1)'snmpset -v 2c -c private 1.3.6.1.4.1.9.10.22.1.3.2.1.2.2.1 o 1.3.6.1.4.1.9.10.22.1.4.1.1.4.1.0.0snmpset -v 2c -c private 1.3.6.1.4.1.9.10.22.1.3.1.1.3.2 i 4snmpset -v 2c -c private 1.3.6.1.4.1.9.10.22.1.3.2.1.3.2.1 i 1snmpset -v 2c -c private 1.3.6.1.4.1.9.10.22.1.3.2.1.10.2.1 i 1snmpset -v 2c -c private 1.3.6.1.4.1.9.10.22.1.2.3.1.3.111.111.111.111.111 i 1
To get the count of the entries in the IP route table, use the following:
snmpget -v 2c -c private 1.3.6.1.4.1.9.10.22.1.4.1.1.4.2.0.0.0
You just need to add the host IP address on those lines. Just give it a shot on one of your lab routers
I took a look at the interwebs for your questions 1 & 2, as I was curious too if this was an OID readily available and one that I might need next time. I found this:
Solved: MIB branch to poll for route table size - Cisco Support Community
The post was 8 years ago and I'm not sure anything much easier to query has superseded this. It basically tells you to use the EXPRESSION-MIB OIDs to do calculations on the MIB tables where you get your route, MAC and ARP information.
Hope this helps
Thanks for you quick response. So, in this Cisco link they suggest to use EXPRESSION-MIB to count ipRouteTable, object ipRouteDest.
But I am a bit confused: There exist ipRouteDest with OID 1.3.6.1.2.1.4.21.1.1
When I do SNMPWalk with OID 1.3.6.1.2.1.4.21.1.1 I get I list of lines (a routing table) that lloks like:
.1.3.6.1.2.1.4.21.1.1.192.168.0.0 = IPADDRESS: 192.168.0.0
....
So now I want to count the lines, and when I check the EXPRESSION-MIB on Cisco Website - I see all bunch of OIDs, like:
"expExpressionEntry" "1.3.6.1.4.1.9.10.22.1.3.1.1"
"expExpressionTable" "1.3.6.1.4.1.9.10.22.1.3.1"
So my question is - how do I apply the EXPRESSION-MIB to the ipRouteDest (OID 1.3.6.1.2.1.4.21.1.1)?
They suggest to " use wildcard with the expression sum($1)".