Monitoring SNMP
To monitor the status of SNMP operations on your network, enter Privileged Exec mode. You can then establish a baseline and use the show commands to view statistics.
Establishing a Baseline
SNMP statistics are stored in system counters. The only way to reset the system counters is to reboot the system. You can, however, establish a baseline for SNMP statistics by setting a group of reference counters to zero.
baseline snmp
- Use to establish a baseline for SNMP statistics.
- The system implements the baseline by reading and storing the statistics at the time the baseline is set and then subtracting this baseline whenever baseline-relative statistics are retrieved.
- To display statistics relative to the current baseline, use the delta keyword with SNMP show commands.
- SNMP operations (such as Get and Set) continue to use and report statistics from the system counters.
- See Viewing SNMP Status later in this chapter for a sample display when you enter the show snmp command. If you establish a baseline and then enter show snmp, the statistics now have zero or low values.
- Example
host1#baseline snmphost1#show snmpContact: Joe AdministratorLocation: Network Lab, Bldg 3 Floor 12 SNMP packets input0 Bad SNMP version errors0 Unknown community name0 Illegal operation for community name supplied0 Encoding errors0 Number of requested variables0 Number of altered variables1 Get-request PDUs1 Get-next PDUs0 Set-request PDUs0 Unknown security models0 Unavailable contexts2 SNMP packets out0 Too big errors (Maximum packet size 1500)1 No such name errors0 Bad values errors0 General errors2 Get-response PDUs0 SNMP trap PDUs0 Invalid Message Report PDUs0 Unknown PDU Handler Report PDUs0 Unknown Context Report PDUs0 Unsupported Security Level Report PDUs0 Not in time Window Report PDUs0 Unknown Username Report PDUs0 Unknown Engine ID Report PDUs0 Wrong Digest Report PDUs0 Decryption Error Report PDUsViewing SNMP Status
To view SNMP status on your network, use the following show commands.
show snmp
- Use to display all the information on SNMP status.
- To display statistics relative to the current baseline, use the delta keyword.
- Field descriptions
- Contact - router's contact person
- Location - router's location
- SNMP packets input - total number of SNMP packets received by the router
- Bad SNMP version errors - number of SNMP PDUs with a bad version number
- Unknown community name - number of SNMP PDUs that had an unrecognized community name
- Illegal operation for community name supplied - number of access violations based on the configured privilege level for community strings
- Encoding errors - number of ASN.I encoding and decoding errors
- Number of requested variables - number of variable bindings processed by the SNMP agent
- Number of altered variables - number of variable bindings processed successfully in SNMP set commands
- Get-request PDUs - number of get-exact SNMP PDUs processed
- Get-next PDUs - number of get-next SNMP PDUs processed
- Set-request PDUs - number of set SNMP PDUs processed
- Unknown security models - number of SNMP PDUs with unrecognized security
- Unavailable contexts - number of SNMP proxy requests to unknown entities
- Too big errors - number of processed PDUs that resulted in SNMP PDUs too large to encode
- No such name errors - number of requests that resulted in noSuchName errors. If interfaces configured on modules that do not support 64-bit counters are accessed, the system returns a noSuchName message.
- Bad values errors - number of requests that resulted in badValues errors
- General errors - number of general errors
- Get-response PDUs - number of requests that resulted in getResponse PDUs
- SNMP trap PDUs - number of SNMP trap PDUs generated by this agent
- Invalid Message Report PDUs - number of packets received by the SNMP engine that were dropped because there were invalid or inconsistent components in the SNMP message
- Unknown PDU Handler Report PDUs - number of packets received by the SNMP engine that were dropped because the PDU in the packet could not be passed to an application responsible for handling the pduType; for example, no SNMP application had registered for the proper combination of the contextEngineID and pduType
- Unknown Context Report PDUs - number of packets received by the SNMP engine that were dropped because the context contained in the message was unknown
- Unsupported Security Level Report PDUs - number of packets received by the SNMP engine that were dropped because they requested a security level that was unknown to the SNMP engine or otherwise unavailable
- Not in time Window Report PDUs - number of packets received by the SNMP engine that were dropped because they appeared outside of the authoritative SNMP engine window
- Unknown Username Report PDUs - number of packets received by the SNMP engine that were dropped because they referenced a user that was not known to the SNMP engine
- Unknown Engine ID Report PDUs - number of packets received by the SNMP engine that were dropped because they referenced an snmpEngineID that was not known to the SNMP engine
- Wrong Digest Report PDUs - number of packets received by the SNMP engine that were dropped because they did not contain the expected digest value
- Decryption Error Report PDUs - number of packets received by the SNMP engine that were dropped because they could not be decrypted
host1#show snmpContact: Joe AdministratorLocation: Network Lab, Bldg 3 Floor 1538 SNMP packets input0 Bad SNMP version errors0 Unknown community name0 Illegal operation for community name supplied0 Encoding errors695 Number of requested variables0 Number of altered variables26 Get-request PDUs512 Get-next PDUs0 Set-request PDUs0 Unknown security models0 Unavailable contexts538 SNMP packets out0 Too big errors (Maximum packet size 1500)10 No such name errors0 Bad values errors0 General errors538 Get-response PDUs0 SNMP trap PDUs0 Invalid Message Report PDUs0 Unknown PDU Handler Report PDUs0 Unknown Context Report PDUs0 Unsupported Security Level Report PDUs0 Not in time Window Report PDUs0 Unknown Username Report PDUs0 Unknown Engine ID Report PDUs0 Wrong Digest Report PDUs0 Decryption Error Report PDUsshow snmp access
- Group Name - name of the group
- Model - security model; for example, user-based security model (USM)
- Level - method for authentication and privacy
- none - no authentication and no privacy
- auth - authentication only
- priv - authentication and privacy
- Read - name of the view for read access
- Write - name of the view for write access
- Notify - name of the view for notification
host1#show snmp accessGroup Name Model Level Read Write Notify------------------- ----- ----- ---------- ---------- ---------admin usm priv everything everything everythingpublic usm none user none noneprivate usm auth user user usershow snmp community
- Community - name of the community and the associated virtual router
- View - name of the view
- Priv - access privilege for the view
host1#show snmp communityCommunity View Priv AccList------------------------------------------ ---- -------admin@default everything rw 0private@default user rw 0public@default user ro 0show snmp trap
- Use to display status information on configured SNMP traps and trap destinations only.
- Field descriptions
- Enabled Categories - trap categories that are enabled on the router
- SNMP authentication failure trap - enabled or disabled
- Trap Source - interface whose IP address is used as the source address for all SNMP traps
- Trap Proxy - enabled or disabled
- Global Trap Severity Level - global severity level filter; if a trap does not meet this severity level, it is discarded
- Trap PDUs sent - number of trap PDUs sent by the system
- Trap PDUs filtered - number of trap PDUs that were dropped by the system because they were filtered
- Address - IP address of the trap recipient
- Security String - name of the SNMP community
- Ver - SNMP version (v1 or v2) of the SNMP trap packet
- Port - UDP port on which the trap recipient accepts traps
- Trap Categories - types of traps that the trap recipient can receive
- TrapSeverityFilter - severity level filter for this SNMP host
- TrapPDUsSent - number of trap PDUs sent by this host
- TrapPDUsFiltered - total number of trap PDUs that were dropped by the host because they were filtered
host1#show snmp trapEnabled Categories: Snmp, Link, Bulkstats, FileXfer, Bgp, Log, CliSecurity,Ping, Ospf, AddressPool, AtmPingSNMP authentication failure trap is enabledTrap Source: fastEthernet 0/0Trap Proxy: disabledGlobal Trap Severity Level: 4 - warningTrap PDUs sent: 0Trap PDUs filtered: 53Address Security String Ver Port Trap Categories-------------- ------------------------------ --- ----- ----------------10.5.0.200 private v2c 162SnmpLinkInvEnvBstFxfBgpLogcliPingOspfTraceDvmrpDvmrpUniAdrPatmPingAddress TrapSeverityFilter TrapPDUsSent TrapPDUsFiltered--------------- ------------------ ------------ ----------------10.5.0.200 5 - notice 0 0show snmp user
- no - no authorization protocol
- md5 - HMAC-MD5-96 authorization protocol
- sha - HMAC-SHA-96 authorization protocol
host1#show snmp userUser Auth Priv Group------------------------ ---- ---- -------------------josie md5 des adminnightfly md5 no privatesteelydan no no publicshow snmp view
- included - specified object identifier (OID) trees are available in this view
- excluded - specified OID trees are not available in this view
host1#show snmp viewView Name View Type Oid Tree-------------- --------- ---------------------------everything included 1.3.6.1.user included 1.3.6.1.user excluded 1.3.6.1.4.1.2773.2.16.user excluded 1.3.6.1.4.1.4874.2.2.16.user excluded 1.3.6.1.6.3.11.user excluded 1.3.6.1.6.3.12.user excluded 1.3.6.1.6.3.13.user excluded 1.3.6.1.6.3.14.user excluded 1.3.6.1.6.3.15.user excluded 1.3.6.1.6.3.16.user excluded 1.3.6.1.6.3.18.nothing excluded 1.3.6.1.Output Filtering
You can use the output filtering feature of the show commands to include or exclude lines of output based on a text string you specify. See Chapter 2, Command Line Interface, for details.