4.4 Explain how SNMP is used in network operations
CCNA 200-301 v1.1 · 4.0 IP Services
SNMP lets a management station (NMS) read counters and settings from network devices and receive alerts from them. Every device runs an agent that exposes a MIB, a tree of objects such as interface counters and CPU load. For the CCNA you explain gets, sets, traps and informs, the versions, and why SNMPv3 is the one to use.
What you must know
- Describe the manager, agent and MIB, and what an OID is.
- Explain Get, GetNext, GetBulk, Set, Trap and Inform.
- Compare SNMPv1, v2c and v3, including community strings and security levels.
- Name the ports: UDP 161 for polling, UDP 162 for traps.
Manager, agent and MIB
The NMS polls agents with Get requests on UDP 161, for example every 5 minutes for interface counters, and graphs the results. Each value is an OID in the MIB tree (1.3.6.1.2.1.2.2.1.10 is an interface's input octets). Agents also send traps on UDP 162 when something happens, such as a link going down, without waiting to be asked. An inform is a trap that the NMS acknowledges, so it is resent if lost.
The NMS reads counters with gets (1); the switch reports events with traps as they happen (2).
Versions and security
| Version | Authentication | Encryption | Notes |
|---|---|---|---|
| v1 | Community string, clear text | No | Obsolete |
| v2c | Community string, clear text | No | Adds GetBulk and informs; still common |
| v3 | Username with SHA (authNoPriv) | AES (authPriv) | The secure choice |
snmp-server group NMS-GROUP v3 priv
snmp-server user nms NMS-GROUP v3 auth sha Auth-Pass1 priv aes 128 Priv-Pass1
snmp-server host 10.0.50.10 version 3 priv nms
snmp-server enable trapsWith v2c, a read-only community allows gets; a read-write community also allows sets, so anyone who sniffs it can change the configuration. Restrict SNMP with an ACL either way.
Commands
show snmp | Packets in and out, errors, and whether traps are enabled. |
show snmp user | SNMPv3 users and their security settings. |
show snmp host | Where traps and informs are sent. |
Exam traps
- Polling uses UDP 161; traps and informs go to UDP 162 on the NMS.
- Only SNMPv3 encrypts (authPriv).
- A trap is not acknowledged; an inform is.
- A read-write community lets anyone who knows it change the device.
Check yourself
- Which SNMP message does a device send unasked when an interface goes down?
- A trap (or an inform, if the NMS must acknowledge it).
- Which version and security level give authentication and encryption?
- SNMPv3 with authPriv.
- What is a MIB?
- The structured set of objects (OIDs) an agent exposes.
More topics in 4.0 IP Services
- 4.1 Configure and verify NAT for inside hosts using static mappings and address pools
- 4.2 Configure and verify NTP clients and servers
- 4.6 Configure and verify DHCP client and relay
- 4.7 Explain QoS per-hop behavior: classification, marking, queuing, congestion handling, policing, shaping
- 4.8 Configure and verify remote device access with SSH
- 4.9 Describe what TFTP and FTP do on a network