0

I am coding in C some tool for monitoring ethernet switch by snmp v1 and Net-SNMP lib. In one of the step I get FDB table from switch. It gets by request getnext with OID .1.3.6.1.2.1.17.7.1.2.2.1. After I get for example:

getnext .1.3.6.1.2.1.17.7.1.2.2.1     answer .1.3.6.1.2.1.17.7.1.2.2.1.2.1.144.2.166.50.206.43 3
getnext .1.3.6.1.2.1.17.7.1.2.2.1.2.1.144.2.166.50.206.43   answer .1.3.6.1.2.1.17.7.1.2.2.1.2.1.144.2.166.50.206.63      6
getnext .1.3.6.1.2.1.17.7.1.2.2.1.2.1.144.2.166.50.206.63   answer .1.3.6.1.2.1.17.7.1.2.2.1.2.1.144.2.166.50.206.126    4
getnext  .1.3.6.1.2.1.17.7.1.2.2.1.2.1.144.2.166.50.206.126 answer  .1.3.6.1.2.1.17.7.1.2.2.1.2.41.0.21.100.59.187.78    26
getnext .1.3.6.1.2.1.17.7.1.2.2.1.2.41.0.21.100.59.187.78   answer NULL

Unfortunately some switch ports have a very large number of rows and the full cycle of getnext takes long time.

Is there any method to get all rows of getnext OID .1.3.6.1.2.1.17.7.1.2.2.1 etc. at one request?

Or may be have other methods for get its requests faster?

techraf
  • 4,243
  • 8
  • 29
  • 44
Black S.
  • 35
  • 3
  • For SNMPv1, no. If you could use SNMPv2 or later, you could use the `GETBULK` request to query more OIDs in one request. – Castaglia Aug 17 '16 at 16:56
  • Castaglia sorry but getBULTnot work for me. If I right understand the GETBULK request can do more then one request but for get FDB I am must request the OID by GETNEXT, after I receive answer and request answer by the GETNEXT and etc by the full cycle until I receive NULL. Sorry for my english – Black S. Aug 18 '16 at 17:37

0 Answers0