今天第一次聽說snmpwalk,,因此,對(duì)它進(jìn)行了整理,。 本文介紹了snmpwalk,,它的作用和它的用法。 什么是snmpwalksnmpwalk是一個(gè)SNMP小程序,,它使用SNMP的GETNEXT請(qǐng)求查詢指定OID(SNMP協(xié)議中的對(duì)象標(biāo)識(shí))入口的所有OID樹信息,,并顯示給用戶。 以下是原英文解釋: snmpwalk is an SNMP application that uses SNMP GETNEXT requests to query a network entity for a tree of information. An object identifier (OID) may be given on the command line. This OID specifies which portion of the object identifier space will be searched using GETNEXT requests. All variables in the subtree below the given OID are queried and their values presented to the user. Each variable name is given in the format specified in variables(5). If no OID argument is present, snmpwalk will search the subtree rooted at SNMPv2-SMI::mib-2 (including any MIB object values from other MIB modules, that are defined as lying within this subtree). If the network entity has an error processing the request packet, an error packet will be returned and a message will be shown, helping to pinpoint why the request was malformed. If the tree search causes attempts to search beyond the end of the MIB, the message “End of MIB” will be displayed. snmpwalk的作用可使用snmpwalk查看支持SNMP協(xié)議的設(shè)備的一些信息,,如cisco交換機(jī)或路由器IP地址等,,也可用來(lái)協(xié)助開發(fā)SNMP功能。 snmpwalk的用法snmpwalk -v 1或2(代表SNMP版本) -c SNMP讀密碼 IP地址 OID(對(duì)象標(biāo)示符) (1) -v: 指定snmp的版本, 1或者2,; 用法舉例: 例如獲取cisco設(shè)備192.168.17.191的接口類型 |
|