Ping组是思科管理分支(.1.3.6.1.4.1.9.9.16.)下的思科专有MIB的一部分。 Ping组可用于从管理站设置、执行和检索远程设备之间的互联网控制消息协议(ICMP)活动。
本文档没有任何特定的要求。
本文档不限于特定的软件和硬件版本。
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。
有关文件规则的更多信息请参见“ Cisco技术提示规则”。
您可以使用示例脚本在HP OpenView或NetView上启动此序列。您还可以使用网络管理平台的GUI将这些命令输入为snmpsets和snmpgets。使用以下方法之一访问GUI:
从菜单栏中,选择工具,然后选择MIB浏览器:SNMP.
在命令行中键入xnmbrowser。
Management_Station-----------Router_Source------------Router_Dest echo "###### Create the instance #######" ###### We've chosen 333 at random. 333 will be the row instance to use for this particular ###### ping experiment. After the ping, the row will be deleted. ###### This keeps the table clean. Router_Source is the dns name of the device we are ###### working with, and public is its RW community string. The values for ###### ciscoPingEntryStatus status are as follows (see Ping MIB): ###### 1 - active ###### 2 - notInService ###### 3 - notReady ###### 4 - createAndGo ###### 5 - createAndWait ###### 6 - destroy ###### We will clear out any previous entries by setting ciscoPingEntryStatus = 6 (destroy) snmpset -c public Router_Source .1.3.6.1.4.1.9.9.16.1.1.1.16.333 integer 6 ###### We start building the row by setting ciscoPingEntryStatus = 5 (createAndWait) echo snmpset -c public Router_Source .1.3.6.1.4.1.9.9.16.1.1.1.16.333 integer 5 echo echo "###### Now let's set the characteristics of the ping #######" ###### Only the first three sets below are REQUIRED. The rest have default ###### values. #Set ciscoPingEntryOwner = any_name snmpset -c public Router_Source .1.3.6.1.4.1.9.9.16.1.1.1.15.333 octetstring any_name #Set ciscoPingProtocol = 1 = ip (see CISCO-TC-V1SMI.my CiscoNetworkProtocol) snmpset -c public Router_Source .1.3.6.1.4.1.9.9.16.1.1.1.2.333 integer 1 #Set ciscoPingAddress = #.#.#.#--take Remote_Dest's ip & convert each octet to hex snmpset -c public Router_Source .1.3.6.1.4.1.9.9.16.1.1.1.3.333 octetstringhex “AB 44 76 67” #Set the packet count to 20 (ciscoPingPacketCount) snmpset -c public Router_Source .1.3.6.1.4.1.9.9.16.1.1.1.4.333 integer 20 #Set the packetsize to 100 (ciscoPingPacketSize) snmpset -c public Router_Source .1.3.6.1.4.1.9.9.16.1.1.1.5.333 integer 100 echo echo "##### Now let's verify that the ping is ready to go and launch it #######" #Get ciscoPingEntryStatus and make sure it is now equal to 2. This means # notInService which indicates that we're ready to go. snmpget -c public Router_Source .1.3.6.1.4.1.9.9.16.1.1.1.16.333 # Set ciscoPingEntryStatus = 1 to tell it to activate. snmpset -c public Router_Source .1.3.6.1.4.1.9.9.16.1.1.1.16.333 integer 1 echo echo "##### Let's look at the results. #####" snmpwalk -c public Router_Source .1.3.6.1.4.1.9.9.16.1.1.1 echo echo "##### Now that we've gotten the results, let's destroy the row #####" snmpset -c public Router_Source .1.3.6.1.4.1.9.9.16.1.1.1.16.333 integer 6