How to Configure SNMP (Simple Network Management Protocol)
NOTES:
By default, the protocol that the SNMP agent and SNMP manager/server will communicate with is UDP.
The SNMP agent is listening to the default SNMP port number 161. The SNMP manager is listening to 162.
Management Information Base (MIB) - a hierarchical database in a managed device containing variables specific to that device,
which can be provided to or configured from an SNMP manager.
Object Identifier (OID) - a component of a MIB containing a collection of variables,
which can be queried by or configured from an SNMP manager.
Configuring SNMP
Step 1. Create access-list specifying authorized SNMP servers.
Example:
Device# conf t
Device(config# ip access-list standard SNMP-ACL
Device(config# permit 10.1.1.1
Device(config# deny any log
Step 2. Define community strings (i.e. passwords) that will allow SNMP servers defined in the SNMP-ACL access list RO/RW access to the agent.
Example:
Device# conf t
Device(config)# snmp-server community READ-ONLY ro SNMP-ACL
Step 3. Configure agent to know where to send all SNMP traps/informs.
Example:
Device# conf t
Device(config)# snmp-server host 10.1.1.1 version 2c READ-ONLY
Device(config)# snmp-server enable traps
Device(config)# end
Device# wr
Monitoring SNMP Status
show snmp
show snmp sessions
show snmp host
show snmp mib
show snmp stats oid
References:
- Configuring Simple Network Management Protocol
- SNMP OID
- Cisco CCNA Packet Tracer Ultimate labs: SNMP CCNA Lab. Answers!
- SNMP Operation (CCNA Complete Video Course Sample)
- Configure general SNMP parameters
- snmpwalk Examples & Commands for Windows and Linux
- SNMP Object Navigator
- SNMP: Frequently Asked Questions About MIBs