SNMP: Network Management
A network manager needs to see thousands of devices at once — their CPU, memory, interface errors, even configuration changes — without logging into each one. SNMP (Simple Network Management Protocol) is the language of that visibility: agents on devices expose standardised variables, and managers poll them or receive unsolicited alerts. This lesson maps the roles, the object model (MIB/OID), the versions and their security, and the IOS commands that enable monitoring.
- Describe the SNMP manager, agent, and MIB roles and where each sits.
- Explain how OIDs identify individual management variables.
- State the ports: UDP 161 for polling and UDP 162 for traps.
- Compare v1/v2c (community strings) with v3 (authentication and privacy).
- Distinguish polls/get from traps/informs, and when a manager uses each.
- Configure snmp-server community, snmp-server host, and traps on IOS.
Manager, agent, and the MIB
SNMP is a client–server protocol with two distinct roles. The device being managed runs an SNMP agent — a software service that answers queries about the device’s state. The network management system (NMS) runs the SNMP manager — the software that asks the questions, collects the answers, and draws the dashboards. One manager typically controls many agents.
- Agent — runs on the managed device (router, switch, server). Listens for queries (UDP 161) and sends traps (UDP 162 from the agent toward the manager).
- Manager — runs on the NMS. Fires
getrequests at agents, receives their responses, and accepts traps. - MIB — the shared dictionary. Both sides must agree on the MIB definitions or the numbers relayed over the wire would be meaningless.
The exam will hand you a scenario (“an NMS in a server farm needs to monitor 200 switches”) and ask which nodes are agents and which is the manager. The switches/routers/servers are agents; the NMS is the manager. MIB is not a physical database file you configure — it is the logical tree of managed objects.
OIDs: naming every variable
Every MIB object is addressed by an OID — a dotted hierarchy of numbers that reads like a filesystem path. The top of the tree is managed by the IANA: .1.3.6.1 is the branch for the Internet's management subtree, and the standard MIB lives at .1.3.6.1.2.1 (MIB-II).
| OID | Name | What it reports |
|---|---|---|
| .1.3.6.1.2.1.1.3 | sysUpTime | How long the device has been running. |
| .1.3.6.1.2.1.1.5 | sysName | The device hostname. |
| .1.3.6.1.2.1.2.2.1.10 | ifInOctets | Bytes received on an interface. |
| .1.3.6.1.2.1.1.1 | sysDescr | Full device description and IOS version. |
1 is ISO, 3 is identified organisations,
6 is the US Department of Defence (the "Internet" branch), 1 is the
Internet, 2 is management, and 1 is the MIB-II group. Everything after
that identifies the individual object. You do not need to memorise long OIDs for the exam, but you
must recognise that an OID is a hierarchical numeric identifier for a MIB object
and that vendors also register private branches under .1.3.6.1.4.1 (Cisco is
.1.3.6.1.4.1.9) for their own extensions.
A get for an OID returns the value of that object. A get-next walks to the
following object — the mechanism managers use to walk an entire table by repeating
get-next one object at a time. This is why an NMS can discover a whole interface table without needing a
separate request type for “give me everything”.
Ports and message types
SNMP uses two well-known UDP ports, and getting them backwards is a favourite trick question:
- UDP 161 — where the agent listens. Managers send
getrequests here and agents answer from here. - UDP 162 — where the manager listens for unsolicited traps (and informs) that agents push.
The messages you must know by name:
| Message | Direction | Purpose |
|---|---|---|
| get | Manager → Agent | Retrieve the value of one OID. |
| get-next | Manager → Agent | Retrieve the next OID in the tree; used to walk tables. |
| get-bulk (v2/v3) | Manager → Agent | Fetch many values in one request; efficient table loading. |
| set | Manager → Agent | Change a writable variable (e.g. write a community, enable/disable an interface). |
| trap | Agent → Manager | Unsolicited alert about an event; the manager does not acknowledge it. |
| inform | Agent → Manager | Like a trap, but the manager acknowledges receipt (delivery guarantee). |
Polling vs traps
The manager has two strategies for learning about the network, and the exam expects you to weigh them against each other:
- Polling (get). The manager asks each agent at a fixed interval. It is reliable (you explicitly ask and the agent answers), gives the manager a uniform picture on a schedule, and works well for trend data — but it scales badly: 1,000 agents polled every minute is a lot of traffic, and critically, an alert is only noticed at the next poll.
- Traps (agent-initiated). The agent decides something is worth reporting (link down, high CPU, configuration change) and pushes a message to the manager immediately. It scales because devices only talk when something happens, and it gives near-real-time alerting. The costs: the manager never knows the device is silent because “nothing happened”, and (for plain traps) there is no delivery guarantee — a lost trap is gone forever.
Production monitoring typically uses both together: polls keep the baseline and
verify agent liveness, while traps deliver the urgent, event-driven alerting that
polling would miss until it was too late. The snmp-server enable traps command decides
which classes of events the agent may push.
v1, v2c, v3 — and the security difference
The three versions the exam cares about differ mostly in how they authenticate. The first two are functionally similar and both insecure by default; v3 is the security rewrite.
| Version | Security | Community string | Notes |
|---|---|---|---|
| v1 | None | Plaintext | Legacy. Sends everything, including any set, in cleartext. |
| v2c | None | Plaintext | Most common legacy version; adds get-bulk and inform. The "c" marks the community-based access model. |
| v3 | AuthN/AuthP (USM) | Replaced by user accounts | Adds message integrity, authentication (MD5/SHA), optional privacy (AES/DES encryption), and model views. The modern secure choice. |
Access control is also granular in v3: a view limits which MIB branches an account may read or write. You can give a monitoring account read-only access to interface statistics and a change account read-write to just the few settable variables that deserve it — an exam-recognised security practice that no amount of community strings can reproduce.
Configuring SNMP on IOS
Read-only and read-write community strings, plus a trap destination. The exam-safe baseline for a lab with an NMS at 192.168.1.100:
R1(config)# snmp-server community MyReadOnly RO R1(config)# snmp-server community MyReadWrite RW R1(config)# snmp-server location DataCenter Rack 4 R1(config)# snmp-server contact netadmin@example.com
To push traps to the management station, give the agent a destination and enable at least one trap class:
R1(config)# snmp-server host 192.168.1.100 version 2c MyReadOnly R1(config)# snmp-server enable traps snmp linkdown linkup
The snmp-server host line names the trap receiver, the SNMP version to use for traps,
and the community string that the trap will carry. Traps stay off until you enable at least one class,
so linkdown/linkup here immediately produce useful notifications for the lab.
RO (read-only) as the default, reserve RW for accounts
that genuinely need it, use long random strings instead of public/private,
filter UDP 161/162 at the edge, and prefer v3 with authentication and encryption for anything
leaving the management VLAN.
The vocabulary you need
Every term below appears in the lesson text above. Select one to read its definition, then use the quiz at the end to check what stuck.
Review
Check what you have learned with these review questions.
Sources & references
- Cisco. CCNA (200-301) Exam Topics. cisco.com.
- IETF. Request for Comments (RFCs). rfc-editor.org.
- IANA. Internet Assigned Numbers Authority registries. iana.org.
Target exams: CCNA 200-301 v1.1 · CyberOps Associate 200-201. Last content verification: 2026-10-11.