SNMP acquires CISCO related information
# get Port Index
Snmpwalk-v 2c-c Pub_PCon9-CT 192.168.232.25 1.3.6.1.2.1.2.2.1.1
# get the port list and its description
Snmpwalk-v 2c-c Pub_PCon9-CT 192.168.232.25 1.3.6.1.2.1.2.2.1.2
# get the port Mac address
Snmpwalk-v 2c-c Pub_PCon9-CT 192.168.232.25 1.3.6.1.2.1.2.2.1.6
# obtain the Index corresponding to IP address
Snmpwalk-v 2c-c Pub_PCon9-CT 192.168.232.25 1.3.6.1.1.4.20.1.2
# get the Up/Down of the port
Snmpwalk-v 2c-c Pub_PCon9-CT 192.168.232.25 1.3.6.1.2.1.2.1.8
# obtain port inbound traffic (Bytes)
Snmpwalk-v 2c-c Pub_PCon9-CT 192.168.232.25 1.3.6.1.1.2.2.2.1.10
# get port outbound traffic (Bytes)
Snmpwalk-v 2c-c Pub_PCon9-CT 192.168.232.25 1.3.6.1.1.2.2.2.1.16
# get the CPU load of the past 5 seconds (percentage of cpu busy)
Snmpwalk-v 2c-c Pub_PCon9-CT 192.168.232.25 1.3.6.1.4.1.9.2.1.56.0
# get CPU load for the past 1 minute (percentage of cpu busy)
Snmpwalk-v 2c-c Pub_PCon9-CT 192.168.232.25 1.3.6.1.4.1.9.2.1.57.0
# get CPU load for the past 5 minutes (percentage of cpu busy)
Snmpwalk-v 2c-c Pub_PCon9-CT 192.168.232.25 1.3.6.1.4.1.9.2.1.58.0
# get the current memory usage (bytes)
Snmpwalk-v 2c-c Pub_PCon9-CT 192.168.232.25 1.3.6.1.4.1.9.9.48.1.1.1.5
# get how much memory is currently idle (bytes)
Snmpwalk-v 2c-c Pub_PCon9-CT 192.168.232.25 1.3.6.1.4.1.9.9.48.1.1.1.6
# get device serial number
Snmpwalk-v 2c-c Pub_PCon9-CT 192.168.232.25 1.3.6.1.1.1.47.1.1.1.1.11.1
Or
Snmpwalk-v 2c-c Pub_PCon9-CT 192.168.232.25 1.3.6.1.4.1.9.3.6.3.0
# get device name
Snmpwalk-v 2c-c Pub_PCon9-CT 192.168.232.25 1.3.6.1.2.1.1.5.0
# the following is an example of obtaining the MAC address of the host connected to the second port of the switch (INTEGER: 2)
# # step 1 # #
Snmpwalk-v 2c-c Pub_PCon9-CT 192.168.232.25 1.3.6.1.1.17.4.3.1 | grep-w "INTEGER: 2"
Return the result:
SNMPv2-SMI::mib-2.17.4.3.1.2.0.7.233.63.136.173 = INTEGER: 2
# # step 2 # #
# get the bold word "0.7.233.63.136.173" from the return result of step 1 above, and execute the following command
Snmpwalk-v 2c-c Pub_PCon9-CT 192.168.232.25 1.3.6.1.1.17.4.3.1 | grep "0.7.233.63.136.173" | grep "mib-2.17.4.3.1.1"
Return the result:
SNMPv2-SMI::mib-2.17.4.3.1.1.0.7.233.63.136.173 = Hex-STRING: 00 07 E9 3F 88 AD
00 07 E9 3F 88 AD is the address of the host network card connected to the second port of the switch
# # step 3 # #
Snmpwalk-v 2c-c Pub_PCon9-CT 192.168.232.25 1.3.6.1.1.17.1.4.1.2 | grep-w "SNMPv2-SMI::mib-2.17.1.4.1.2.2" where the red 2 is INTEGER: 2 of step 1
Return the result:
SNMPv2-SMI::mib-2.17.1.4.1.2.2 = INTEGER: 2
The INTEGER: 2 obtained in step 3 is the corresponding IfIndex.
Snmpwalk-v 2c-c Pub_PCon9-CT 192.168.232.41 1.3.6.1.2.1.17.4.3.1.1
Snmpwalk-v 2c-c Pub_PCon9-CT 192.168.232.41 1.3.6.1.2.1.17.4.3.1.2
Snmpwalk-v 2c-c Pub_PCon9-CT 192.168.232.41 1.3.6.1.2.1.17.1.4.1.2