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 router. 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 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 PDUsThere is no no version. Viewing SNMP Status
To view SNMP status on your network, use the following show commands.
show snmp
- Use to display all the information about SNMP status.
- To display statistics relative to the current baseline, use the delta keyword.
- Field descriptions
- ContactRouter's contact person
- LocationRouter's location
- SNMP packets inputTotal number of SNMP packets received by the router
- Bad SNMP version errorsNumber of SNMP PDUs with a bad version number
- Unknown community nameNumber of SNMP PDUs that had an unrecognized community name
- Illegal operation for community name suppliedNumber of access violations based on the configured privilege level for community strings
- Encoding errorsNumber of AS number version 1 encoding and decoding errors
- Number of requested variablesNumber of variable bindings processed by the SNMP agent
- Number of altered variablesNumber of variable bindings processed successfully in SNMP set commands
- Get-request PDUsNumber of get-exact SNMP PDUs processed
- Get-next PDUsNumber of get-next SNMP PDUs processed
- Set-request PDUsNumber of set SNMP PDUs processed
- Unknown security modelsNumber of SNMP PDUs with unrecognized security
- Unavailable contextsNumber of SNMP proxy requests to unknown entities
- Too big errorsNumber of processed PDUs that resulted in SNMP PDUs too large to encode
- No such name errorsNumber 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 errorsNumber of requests that resulted in badValues errors
- General errorsNumber of general errors
- Get-response PDUsNumber of requests that resulted in getResponse PDUs
- SNMP trap PDUsNumber of SNMP trap PDUs generated by this agent
- SNMP trap proxiedNumber of traps generated by this agent that are sent via trap-proxy
- Invalid Message Report PDUsNumber 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 PDUsNumber 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 PDU type; for example, no SNMP application had registered for the proper combination of the context engine ID and PDU type
- Unknown Context Report PDUsNumber of packets received by the SNMP engine that were dropped because the context contained in the message was unknown
- Unsupported Security Level Report PDUsNumber 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 PDUsNumber of packets received by the SNMP engine that were dropped because they appeared outside the authoritative SNMP engine window
- Unknown Username Report PDUsNumber 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 PDUsNumber 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 PDUsNumber of packets received by the SNMP engine that were dropped because they did not contain the expected digest value
- Decryption Error Report PDUsNumber 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 NameName of the group
- ModelSecurity model; for example, user-based security model (USM)
- LevelMethod for authentication and privacy
- ReadName of the view for read access
- WriteName of the view for write access
- NotifyName of the view for notification
- StorageSNMP storage type, volatile or nonvolatile
host1#show snmp accessGroup Name Model Level Read Write Notify------------------ ----- ----- ----------- ----------- ---------admin usm priv everything everything everythingmirror usm priv mirrorAdmin mirrorAdmin mirrorAdminpublic usm none user none noneprivate usm auth user user usershow snmp community
- CommunityName of the community and the associated virtual router
- ViewName of the view
- PrivAccess 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 group
- Use to display the list of available groups. Detailed information is available through the show snmp access command.
- Field descriptions
- readViewName of the view for read access
- writeViewName of the view for write access
- notifyViewName of the view for notification
- storageTypeSNMP storage type
host1#show snmp groupGroup Name Storage Type---------------------------------------- ---------------group1 Volatilegroup2 NonVolatileadmin Permanentmirror Permanentpublic Permanentprivate Permanentshow snmp notificationLog
- Global Age Out ValueAgeout for traps in the notification log tables
- Global Entry Limit ValueMaximum number of notifications kept in all notification log tables
host1#show snmp notificationLogGlobal Age Out Value: 1440 minutesGlobal Entry Limit Value : 500No notification log name information is availableshow snmp trap
- Enabled CategoriesTrap categories that are enabled on the router
- SNMP authentication failure trapEnabled or disabled
- Trap SourceInterface whose IP address is used as the source address for all SNMP traps
- Trap Source AddressIP address used as the source address for all SNMP traps
- Trap ProxyEnabled or disabled
- Global Trap Severity LevelGlobal severity level filter; if a trap does not meet this severity level, it is discarded
- AddressIP address of the trap recipient
- Security StringName of the SNMP community
- VerSNMP version (v1 or v2) of the SNMP trap packet
- PortUDP port on which the trap recipient accepts traps
- Trap CategoriesTypes of traps that the trap recipient can receive
- TrapSeverityFilterSeverity level filter for this SNMP host
- Ping TimeOutConfigured ping timeout in minutes
- Maximum QueueSizeMaximum number of traps to be kept in the trap queue
- Queue DrainRateMaximum number of traps per second to be sent to the host
- Queue Full discard methodMethod used to discard traps when the queue is full:
host1#show snmp trapEnabled Categories: Ping, TraceRouteSNMP authentication failure trap is disabledTrap Source: FastEthernet 0/0, Trap Source Address:10.10.5.61Trap Proxy: disabledGlobal Trap Severity Level: 6 - informationalAddress Security String Ver Port Trap Categories--------------- -------------------------------- --- ----- ----------------10.10.0.200 private v2c 162SnmpLinkInvEnvBstFxfBgpLogCliPingOspfTraceDvmrpDvmrpUniAdrPAtmPingVrrpSonetNtpAddress TrapSeverityFilter Ping Maximum Queue Queue FullTimeOut QueueSize DrainRate discrd methd--------------- ------------------ ------- --------- --------- -------------10.10.0.200 5 - notice 1 32 0 dropLastInshow snmp trap statistics
- Use to display statistics for all SNMP traps on the virtual router, as well as statistics for each SNMP host configured on the virtual router.
- Field descriptions
- Trap request(s)Number of local traps requested
- Proxy trap request(s)Number of proxy traps requested
- Trap(s) discardedTotal number of traps discarded
- No system memoryTraps discarded because there was not enough system memory
- No queue resourcesTraps discarded because there were no queue resources available
- SNMP agent disabledTraps discarded because the SNMP agent was disabled
- Global trap category disabledTraps discarded because they were filtered by the snmp enable trap command
- Global minimum severity levelTraps discarded because they did not match the severity level set with the snmp enable traps trapfilters command.
- Trap(s) outTotal number of traps sent by the virtual router
- Trap(s) proxiedTotal number of traps proxied by the virtual router
- AddressIP address of the host
- TrapsDiscarded Severity/CategorySeverity level and category of the discarded traps
- TrapsDiscrded bad encodingTraps discarded because of bad encoding
- TrapsDiscrded Queue FullTraps discarded because the queue was full
- TrapsDiscrded NoHostResponsTraps discarded because the host did not respond to pings sent to the host
- Trap PDUs sentOutNumber of trap PDUs sent by this host
host1#show snmp trap statisticsTrap request(s): 3112Proxy trap request(s): 0Trap(s) discarded: 4No system memory: 0No queue resources: 0SNMP agent disabled: 0Global trap category disabled: 4Global minimum severity level: 0Trap(s) out: 3108Trap(s) proxied: 0Address TrapsDiscarded TrapsDiscrded TrapsDiscrded TrapsDiscrdedSeverity/Category bad encoding Queue Full NoHostRespons--------------- ----------------- ------------- ------------- -------------1.1.1.1 1081 0 511 3210.10.132.137 0 0 0 0Address Trap PDUssentOut--------------- ---------1.1.1.1 53610.10.132.137 3108show snmp user
- noNo authorization protocol
- md5HMAC-MD5-96 authorization protocol
- shaHMAC-SHA-96 authorization protocol
host1#show snmp userUser Auth Priv Group------------------------ ---- ---- -------------------josie md5 des adminnightfly md5 no privatesteelydan no no publicshow snmp view
- includedSpecified object identifier (OID) trees are available in this view
- excludedSpecified OID trees are not available in this view
host1#show snmp viewView Name View Type Oid Tree-------------- --------- ---------------------------user included 1.3.6.1.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.everything included 1.3.6.1.everything excluded 1.3.6.1.4.1.4874.2.2.77.mirrorAdmin included 1.3.6.1.4.1.4874.2.2.77.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.