Ping組是Cisco Management分支(.1.3.6.1.4.1.9.9.16)下的Cisco專有MIB的一部分。 Ping組可用於設定、執行和檢索來自管理站的遠端裝置之間的網際網路控制消息協定(ICMP)活動。
本文件沒有特定需求。
本文件所述內容不限於特定軟體和硬體版本。
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路正在作用,請確保您已瞭解任何指令可能造成的影響。
如需文件慣例的詳細資訊,請參閱思科技術提示慣例。
可以使用示例指令碼在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