cisco snmp

最後更新: 2015-07-30

# Disabling the SNMP Agent

configure terminal

no snmp-server

# Enable SNMP Agent

** SNMP is enabled by default with the community strings set to:

    Read-Only: Public
    Read-Write: Private
    Read-Write-all: Secret


configure terminal

snmp-server community public RO

snmp-server community private RW


# default: ro
# acl 1~99

snmp-server community <string> <ro|rw> [access-list-number]


show running-config

Disable the current Read-write (RW) community string

no snmp-server community private RW

Displaying SNMP Status

show snmp

0 SNMP packets input
    0 Bad SNMP version errors
    0 Unknown community name
    0 Illegal operation for community name supplied
    0 Encoding errors
    0 Number of requested variables
    0 Number of altered variables
    0 Get-request PDUs
    0 Get-next PDUs
    0 Set-request PDUs
    0 Input queue packet drops (Maximum queue size 1000)
0 SNMP packets output
    0 Too big errors (Maximum packet size 1500)
    0 No such name errors
    0 Bad values errors
    0 General errors
    0 Response PDUs
    0 Trap PDUs
SNMP global trap: disabled

SNMP logging: disabled
SNMP agent enabled

Save the settings

write memory

Testing Tools

snmpget -mALL -v1 -cpublic snmp_agent_Ip_address sysName.0