SNMP Get Cisco Related information

Source: Internet
Author: User
Tags snmp snmpwalk

# 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 a list of ports and their descriptions

Snmpwalk-v 2c-c pub_pcon9-ct 192.168.232.25 1.3.6.1.2.1.2.2.1.2

# Get Port MAC Address

Snmpwalk-v 2c-c pub_pcon9-ct 192.168.232.25 1.3.6.1.2.1.2.2.1.6

# Gets the IP address corresponding to the index

Snmpwalk-v 2c-c pub_pcon9-ct 192.168.232.25 1.3.6.1.2.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.2.1.8

# Get Port-in-traffic (Bytes)

Snmpwalk-v 2c-c pub_pcon9-ct 192.168.232.25 1.3.6.1.2.1.2.2.1.10

# Get Port Outbound traffic (Bytes)

Snmpwalk-v 2c-c pub_pcon9-ct 192.168.232.25 1.3.6.1.2.1.2.2.1.16

# Get CPU load for the last 5 seconds (percent 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 last 1 minutes (percent 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 last 5 minutes (percent 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 current usage of memory (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

# gets 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.2.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

# Here is an example of a MAC address to get the host connected to the 2nd port (integer:2) of the switch

################################### Step 1 ##############################

Snmpwalk-v 2c-c pub_pcon9-ct 192.168.232.25 1.3.6.1.2.1.17.4.3.1 | Grep-w "Integer:2"

return 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 results returned in step 1 above and execute the following command

Snmpwalk-v 2c-c pub_pcon9-ct 192.168.232.25 1.3.6.1.2.1.17.4.3.1 | grep "0.7.233.63.136.173" | grep "mib-2.17.4.3.1.1"

return Result:

snmpv2-smi::mib-2.17.4.3.1.1.0.7.233.63.136.173 = hex-string:00 E9 3F AD

E9 3F AD Address of the host network connected to the 2nd port of the switch

################################### Step 3 ##############################

Snmpwalk-v 2c-c pub_pcon9-ct 192.168.232.25 1.3.6.1.2.1.17.1.4.1.2 | Grep-w "snmpv2-smi::mib-2.17.1.4.1.2.2" Here the Red 2 is step 1 of the Integer:2

return 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


This article is from the "Let Me Men Grow Together" blog, please be sure to keep this source http://wujingfeng.blog.51cto.com/5725921/1619700

SNMP Get Cisco Related information

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.