Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我对 SNMP 还是很陌生,我想知道如何使用尽可能少的查询来获得 MIB 的整个分支。
我的方法:使用 GETBULK 消息一次获取pow(2,tries)条目,然后在我得到一个与我的 OID 指定的对象的子对象不匹配的对象时停止
pow(2,tries)
为什么需要它:我正在尝试获取 MIB 的变体大小的分支,具体来说是 ipRouteTable 部分。
你知道 SNMP 有一个 WALK 操作,你可以依次访问所有对象吗?Net-SNMP 有这样一个实用程序,
http://net-snmp.sourceforge.net/docs/man/snmpwalk.html