Skip to main content
CCNA 200-301 intermediate Free with email

What Is SNMP? How It Works, Versions, Ports and Cisco Setup

Reviewed 2026-11-18

Direct answer
SNMP (Simple Network Management Protocol) lets a monitoring server poll routers, switches and firewalls and receive their alerts over UDP 161 and 162. Versions 1 and 2c log in with a clear-text community string, and v3 adds user authentication and encryption. This free PDF covers the Cisco setup and how to fix failed polls.

What Is SNMP and What Is It Used For?

SNMP stands for Simple Network Management Protocol. It’s an application-layer protocol, so it sits at Layer 7 of the OSI model. A manager (usually called the NMS, for network management system) sends requests to an agent, which is the software running on a router, switch, firewall or printer. The agent answers with a value or an error.

In practice, a monitoring tool asks every device the same few questions every few minutes. Is this interface up? How busy is the CPU? How many bytes crossed port Gi0/1?

The device can also speak first. When a link drops or someone fails a login, it sends the manager an alert on its own.

Three facts explain most SNMP behaviour:

  • Polling always starts at the manager. The device never decides to be polled.
  • SNMP is stateless. Each request stands alone, and the device doesn’t know why you asked.
  • The agent doesn’t log what was polled unless you turn debugging on.

That last point matters when something breaks. The troubleshooting section below shows four ways to catch a bad poller without guessing.

SNMP Components: Manager, Agent, MIB and OID

SNMP has four parts. Learn these and every diagram makes sense.

PartWhat it isExample
Manager (NMS)The monitoring server, script or tool that sends requestsA polling server at 192.0.2.50
AgentThe SNMP software on the device that answersA Cisco router or switch
MIBThe tree of objects the agent can report, like a directoryThe system and interfaces groups
OIDThe numeric address of one object in that tree1.3.6.1.2.1.1.3.0

What Is an OID in SNMP?

An OID (object identifier) is the numeric path to one value in the MIB tree. The example 1.3.6.1.2.1.1.3.0 is the device’s uptime, called sysUpTime.0 in the standard system group (RFC 3418). The trailing .0 means a single value rather than a table row.

The MIB is the translator. It maps names like sysUpTime to those numbers, so tools show you names while the packets carry numbers.

SNMP Ports: UDP 161 vs 162

SNMP uses UDP, not TCP. Port 161 carries the manager’s requests to the device and the device’s replies back. Port 162 carries the device’s alerts to the manager. All three versions use the same two ports.

PortTransportDirectionCarries
161UDPManager to device (replies come back)Get, GetNext, GetBulk and Set requests, plus the responses
162UDPDevice to managerTraps and informs

SNMP over TCP exists but is rare. The secure transports, SNMP over TLS and DTLS, use ports 10161 and 10162 (Wikipedia, SNMP).

For a firewall rule, allow UDP 161 from the poller to the device and UDP 162 from the device to the manager. Don’t open 161 to the whole network. Need the full list of well-known ports? The common ports and protocols cheat sheet has them in one table.

SNMP ports diagram: UDP 161 for polling, UDP 162 for traps and informs between manager and device
SNMP uses UDP 161 for polling and UDP 162 for traps and informs, and every version shares the same two ports.

SNMP Message Types: Get, GetNext, GetBulk, Set, Trap and Inform

SNMP has seven message types you’ll meet in a capture or a textbook. Five go from the manager to the device or back as a pair, and two are alerts.

MessageDirectionWhat it doesReply
GetRequestManager to deviceReads one specific OIDResponse
GetNextRequestManager to deviceReads the next OID in order, used to walk tablesResponse
GetBulkRequest (v2c, v3)Manager to deviceReads many rows in one requestResponse
SetRequestManager to deviceWrites a value, so it needs write accessResponse
ResponseDevice to managerReturns the values or an errorNone
TrapDevice to managerSends an alertNone
Inform (v2c, v3)Device to managerSends an alert and asks for confirmationManager confirms

GetNext can cost the device a lot of CPU on big tables, because it asks for one row at a time. GetBulk fixes that. RFC 3416 says its purpose is “to request the transfer of a potentially large amount of data”, which is why monitoring tools prefer it for table walks.

SNMP Trap vs Inform: What’s the Difference?

A trap is an unsolicited alert. The device sends it to UDP 162 and never learns whether it arrived. RFC 3416 states that there’s no confirmation for this delivery method.

An inform carries the same kind of alert, but the manager confirms it. If the confirmation doesn’t arrive, the device sends the alert again. Informs need v2c or v3, because v1 has traps only. The trade-off, as Cisco’s IOS SNMP documentation puts it, is reliability against extra traffic: every retry uses bandwidth.

SNMP Versions: v1 vs v2c vs v3

The three versions differ in one thing above all: how they check who you are.

VersionLoginEncryptionWorth knowing
v1Community string, sent in clear textNoneThe original. Traps only, no informs
v2cCommunity string, sent in clear textNoneAdds GetBulk and informs, and performs better than v1
v3Username plus an authentication protocolOptionalAdds replay protection, plus groups and views for access control

SNMPv3 has three security levels, defined in RFC 3411:

  1. noAuthNoPriv: no authentication and no privacy. It’s a username and nothing else.
  2. authNoPriv: authentication, but the data isn’t encrypted.
  3. authPriv: authentication and encryption. This is the level to aim for.

So which one should you run? Cisco’s SNMP security guide says to prefer v3 with authPriv, and to avoid noAuthNoPriv, authNoPriv, MD5 and DES where stronger options exist. If a device only speaks v2c, keep it behind an ACL and a view. The next sections show both.

v2c is simpler to set up. v3 is safer, but it takes more configuration and more places to make a typo.

SNMP versions compared: v1 and v2c use a clear-text community string, v3 adds authPriv and anti-replay
SNMP v1 and v2c log in with a community string, v3 logs in with a user and keys, and Cisco advises v3 with authPriv.

Go deeper

The exam asks you to describe SNMP.

Build and break it yourself in the CCNA Lab Workbook: SNMP, DHCP, DNS and NTP on a multi-VLAN topology.

See the CCNA Lab Workbook →

SNMP Community Strings: Authentication vs Authorization

A community string is the shared, password-like text that v1 and v2c use to authenticate a request. It travels in clear text, so anyone who captures the packet can read it.

SNMP keeps two questions apart, and mixing them up causes most troubleshooting detours:

Questionv1 and v2cv3
Who are you? (authentication)Community stringUsername plus keys
What can you reach? (authorization)ACL, view and RO or RWViews and groups

A request can pass authentication and still fail authorization. You send the right string from the wrong IP address. Or you ask for an OID your view hides. Or you try a Set with a read-only string.

In each case the string is fine and the request still dies.

Cisco’s guide adds four habits worth copying:

  • Avoid well-known strings like “public” and “private”. Use long, hard-to-guess ones.
  • Use a separate string for traps, so a leaked trap string can’t be used to poll the device.
  • Avoid read-write communities unless you need one, and tie it to a single management station.
  • Remove community strings you don’t use.

How to Configure SNMP on a Cisco Device

These examples use Cisco IOS syntax. 192.0.2.50 is a documentation address, so swap in your poller’s real IP. Build them on a lab router first. The CCNA Lab Workbook has a scenario that runs SNMP, NTP, DHCP and DNS across several VLANs, which makes a safe place to practise.

How Do You Configure SNMPv2c With an ACL?

snmp-server community MONITOR RO 10
access-list 10 permit 192.0.2.50
snmp-server enable traps snmp authentication

RO means read-only. The 10 at the end binds the community to ACL 10, so only 192.0.2.50 can use it. The last line turns on authentication-failure traps, which stay silent until you add a trap destination (shown below). Replace MONITOR with a long random string before you use this anywhere real.

How Do You Limit What a Community Can See With an SNMP View?

snmp-server view BASIC iso included
snmp-server view BASIC ifTable excluded
snmp-server community MONITOR view BASIC RO 10

A view is a filter on the MIB tree. iso included opens the whole tree, and ifTable excluded hides the interface table. The view keyword goes before RO in the community line. Cisco’s own example follows the same order: snmp-server community C1sc03xample view myview RO 11.

Views stop a poller from walking expensive tables, and they shrink what a stolen string can reveal. Most monitoring tools do read interface counters, so exclude only what you don’t poll.

Cisco SNMP configuration in three steps: snmp-server view, access-list 10 and snmp-server community with RO
Three lines lock SNMP v2c to one view and one poller: snmp-server view, access-list 10 and snmp-server community.

How Do You Configure SNMPv3 With authPriv?

snmp-server group MONITORS v3 priv read BASIC access 10
snmp-server user poller MONITORS v3 auth sha AUTH-PASSPHRASE priv aes 128 PRIV-PASSPHRASE

The group sets the security level (priv means authPriv), the view the group can read and the ACL. The user sits inside that group with SHA authentication and AES encryption. Use long passphrases and keep them different from each other. AES 128 is the baseline, and some platforms also offer AES 192 and 256, so check what yours supports.

How Do You Send SNMP Traps to Your Monitoring Server?

snmp-server host 192.0.2.50 version 2c TRAP-COMMUNITY
snmp-server enable traps snmp authentication

Two commands do two jobs. snmp-server enable traps picks which events the device reports. snmp-server host picks who receives them.

Cisco’s IOS documentation notes that if you don’t enter a host line, no notifications are sent, so the first command alone does nothing. Use a different string for traps than for polling.

How Do You Check SNMP on a Cisco Device?

These commands only read state, so they’re safe to run on a live device.

CommandWhat it shows
show snmpPacket counters, including Get-request and Get-next counts, “Unknown community name” and “Bad SNMP version errors”
show running-config | section snmpEverything SNMP in the running config
show snmp viewThe views you defined
show snmp hostWhere traps and informs go
show snmp group and show snmp userv3 groups and users
show access-listsThe ACL that guards each community, with match counts

A quick test: run show snmp, wait a minute, run it again. If “Unknown community name” climbs, something is polling with the wrong string. The Cisco commands cheat sheet lists the other show commands you’ll want next to these.

Why Does SNMP Authentication Fail and How Do You Fix It?

Most SNMP failures happen after authentication, not during it. The string is right, and something else blocks the request.

v1 and v2c failures, in the order to check:

  1. Wrong community string
  2. Right string, wrong source address (the ACL blocks it)
  3. Right string, but the OID sits outside the view
  4. Version mismatch (the poller speaks v1 and the device expects v2c, or the reverse)
  5. A read-only string used for a Set

v3 failures:

  1. Wrong username
  2. Wrong authentication protocol or password
  3. Wrong privacy password
  4. Engine ID mismatch
  5. Time window failure (the clocks differ too much)
  6. User not bound to a group or a view

The fix order follows from the list. Run show snmp first. If the counter for an unknown community climbs, correct the string on the poller. If the string is right, check the ACL, then the view, then the version, then whether the request was a Set.

How Do You Find the Device Polling With the Wrong Community String?

Four methods, safest first:

  1. Read the counters. show snmp tells you failures exist, but not who caused them.
  2. Check the log. Many IOS releases log an authentication failure with the polling host’s address, as a %SNMP-3-AUTHFAIL message. The wording varies by release, so look in your log buffer rather than waiting for an exact line.
  3. Log the ACL denials. Add access-list 10 deny any log as the last line of the community’s ACL. Cisco’s guide recommends this, and the log shows the source of every denied packet.
  4. Capture the traffic. Mirror the port facing the poller with a SPAN session and filter for UDP 161 in Wireshark. You get the source, the OIDs and the message types with zero CPU cost on the device. For v1 and v2c you’ll also see the community string. For v3 with authPriv, the payload is encrypted.
SNMP troubleshooting steps: show snmp, access-list deny any log and a UDP 161 capture filter
To troubleshoot an SNMP authentication failure, confirm it with show snmp, log denied sources with an ACL, and capture UDP 161 last.

The network troubleshooting commands cheat sheet covers the wider routine for when SNMP isn’t the only thing misbehaving.

Is debug snmp packets Safe to Run?

Debugging doesn’t crash a device by default. Under heavy polling, though, it can overload the CPU and the logging. Treat it as the last resort and keep it short:

no logging console
terminal monitor
debug snmp packets
! wait for one or two poll cycles, then stop:
undebug all

Four rules go with it:

  • Use SSH, not the console.
  • Turn off console logging first, so the console isn’t flooded.
  • Run terminal monitor so your SSH session actually shows the debug lines.
  • Capture one or two poll cycles, then stop.

The output format varies by IOS release, so try it on a lab device before you rely on it. Don’t count on it to print the community string.

SNMP High CPU on a Cisco Device: Causes and Fixes

SNMP can push a device’s CPU up without anything being misconfigured. Four causes show up most:

  • Poll intervals that are too short
  • Large table walks, such as ifTable, entPhysical and cbQos
  • Several monitoring systems polling the same device
  • GetNext used where GetBulk would do

The fixes match the causes:

  • Poll less often.
  • Use views to keep pollers out of the big tables.
  • Restrict the pollers with an ACL, so only the systems you know can ask.
  • Switch the poller to GetBulk where it supports it.

Moving to v3 is a security fix, not a CPU fix. It adds authentication and encryption work, so don’t expect it to lower the load.

SNMP Security Best Practices

Cisco’s guide and the practical habits above add up to a short checklist:

  • Prefer v3 with authPriv. Avoid noAuthNoPriv and authNoPriv.
  • Bind every community to an ACL that names the poller.
  • Use views to limit what each community can read.
  • Use a separate string for traps, and never use “public” or “private”.
  • Don’t enable read-write access unless you have a specific need, and then dedicate it to one management station.
  • Watch for authentication-failure traps (snmp-server enable traps snmp authentication).
  • Remove community strings and users you no longer use.

SNMP controls monitoring access. For who can log in to the device itself, see TACACS+ vs RADIUS.

SNMP vs Syslog vs NetFlow: Which One Answers What?

The three protocols look similar in a monitoring design, but each answers a different question.

ProtocolPortsQuestion it answersDirection
SNMPUDP 161 and 162What is the CPU doing right now?Manager polls, device alerts
SyslogUDP 514What happened, and when?Device streams text logs to a server
NetFlowConfigurableWho talked to whom, and how much?Device exports flow records

Most networks run all three. SNMP is a monitoring tool far more than a configuration tool. NETCONF and YANG cover the configuration side that SNMP never handled well.

How Do You Test SNMP From Linux With snmpwalk and snmpget?

The Net-SNMP tools let you poll a device from any Linux box. Use them to prove the string, the ACL and the view work before you point a monitoring tool at the device.

snmpget -v2c -c MONITOR 192.0.2.1 sysUpTime.0
snmpwalk -v2c -c MONITOR 192.0.2.1 system
snmpget -v3 -l authPriv -u poller -a SHA -A AUTH-PASSPHRASE -x AES -X PRIV-PASSPHRASE 192.0.2.1 sysUpTime.0

Here 192.0.2.1 is the device. snmpget reads one OID, and snmpwalk walks a whole branch. In the v3 line, -l sets the security level, -u the user, -a and -A the authentication protocol and passphrase, and -x and -X the privacy protocol and passphrase (Net-SNMP tutorial).

Is SNMP on the CCNA 200-301 Exam?

Yes. In the v1.1 blueprint it’s objective 4.4, “Explain the function of SNMP in network operations” (Cisco v1.1 exam topics). In the v2.0 blueprint it moves to objective 5.4, “Describe the function of SNMP in network operations” (Cisco v2.0 exam topics).

Both versions word it as a question about what SNMP does, not how to configure it. So expect questions on the manager and agent roles, the ports, traps versus informs, and why v3 beats v2c. The configuration in this page goes beyond the exam, and it’s what you’ll use at work.

The CCNA Lab Workbook walks through SNMP in its network services chapter, on a live topology. For exam practice, try the free CCNA 200-301 study guide and the CCNA practice test.

SNMP Cheat Sheet: Commands at a Glance

! Configure (v2c, read-only, locked to one poller)
snmp-server view BASIC iso included
access-list 10 permit 192.0.2.50
snmp-server community MONITOR view BASIC RO 10
snmp-server enable traps snmp authentication
snmp-server host 192.0.2.50 version 2c TRAP-COMMUNITY

! Check
show snmp
show running-config | section snmp
show snmp view
show snmp host
show access-lists

! Troubleshoot (last resort, keep it short)
no logging console
terminal monitor
debug snmp packets
undebug all

What’s Inside the Free SNMP PDF?

The free PDF is a six-page reference for Cisco devices. It covers:

  • Pages 1 and 2: what SNMP is, the manager, agent, MIB and OID, the ports, the three versions and the message types
  • Pages 2 and 3: authentication versus authorization, and why requests fail
  • Pages 3 and 4: the Cisco v2c configuration, ACLs and views, and the show commands
  • Pages 4 and 5: debugging, packet capture and the causes of high CPU
  • Page 6: a troubleshooting decision tree, security habits and a one-page command sheet
Free SNMP PDF next to the CCNA Workbook, which builds SNMP into a multi-VLAN DHCP, DNS and NTP scenario
The free SNMP PDF explains v2c configuration and authentication failures, and the CCNA Workbook builds SNMP into a multi-VLAN scenario.

Where does it stop? The PDF explains why SNMP fails and how to fix it, but it doesn’t walk through SNMPv3 configuration, trap destinations or snmpwalk. This page does. For hands-on practice, the CCNA Lab Workbook builds SNMP into a multi-VLAN topology you can break on purpose.

Working on other vendors? The Huawei HCNA Workbook covers SNMP v1, v2c and v3 in its network management chapter, and the MikroTik MTCNA Workbook lists SNMP in its final phase.

Frequently asked questions

What does SNMP stand for?
SNMP stands for Simple Network Management Protocol. It's an application-layer protocol that lets a monitoring server read status and counters from network devices such as routers, switches, firewalls and printers, and receive alerts from them. It runs over UDP, on ports 161 and 162.
What port does SNMP use, and is it TCP or UDP?
SNMP uses UDP. Port 161 carries the manager's requests to the device (polling) and port 162 carries the device's notifications back (traps and informs). All three versions use the same two ports. SNMP over TCP exists but is rare, and the TLS and DTLS variants use ports 10161 and 10162.
What is an SNMP trap?
An SNMP trap is an unsolicited alert that a device sends to the manager when something happens, such as a link going down or a failed login attempt. Traps go to UDP port 162 and aren't acknowledged. An inform works the same way, but the manager confirms receipt, so the device can resend it if the message is lost. Informs need SNMP v2c or v3.
What are the main components of SNMP?
SNMP has three main parts: the manager (the monitoring server that sends requests), the agent (the software on the device that answers them) and the MIB (the database of objects the agent exposes). Every object in the MIB has a numeric address called an OID, for example 1.3.6.1.2.1.1.3.0 for system uptime.
What is the difference between SNMP v2c and v3?
SNMP v2c authenticates with a community string sent in clear text and has no encryption. SNMP v3 adds user-based authentication, optional encryption and replay protection. Both support GetBulk and informs. Cisco recommends v3 with authentication and privacy wherever the device supports it. If you must use v2c, keep it behind an ACL.
What is an SNMP community string?
A community string is the shared, password-like text that SNMP v1 and v2c use to authenticate a request, such as "public" for read-only access. It travels in clear text, so anyone who captures the packet can read it. On a Cisco device you bind the string to an ACL and a view, so a leaked string can't reach every OID.
Is SNMP a security risk?
SNMP v1 and v2c are, because the community string is sent in clear text and is often left at a default. SNMP v3 with authentication and encryption (authPriv) closes that gap. To cut the risk further, allow only your monitoring server through an ACL, give pollers read-only views and don't enable read-write access unless you need it.
Is SNMP still used?
Yes. Monitoring tools still poll routers, switches, firewalls and UPS units over SNMP, and Cisco's CCNA 200-301 v2.0 blueprint still lists it as objective 5.4, "Describe the function of SNMP in network operations". Newer methods such as NETCONF add configuration and structured data, but they haven't replaced SNMP polling and traps.
Is SNMP a Layer 7 protocol?
Yes. SNMP is an application-layer protocol, so it sits at Layer 7 of the OSI model. It rides on UDP at Layer 4, which is why a firewall rule for it names UDP ports 161 and 162.
What is the difference between SNMP and syslog?
SNMP lets a manager poll counters and receive alerts, so it answers "what is the CPU doing right now?". Syslog is a one-way stream of text log messages from the device to a log server, so it answers "what happened, and when?". Syslog uses UDP port 514, SNMP uses UDP 161 and 162. Most networks run both.

Questions about this PDF

No questions yet. Ask the first one.

Ask a question

Your email address won't be published. We review every question before it appears. How we handle your data. Required fields are marked

Reviewed by

CCDE/CCIE

How to cite this resource

SMEnode Labs (2026). What Is SNMP? How It Works, Versions, Ports and Cisco Setup. SMEnode Labs. https://smenode-labs.com/free-pdf/networking/what-is-snmp/

APA

SMEnode Labs. (2026). What Is SNMP? How It Works, Versions, Ports and Cisco Setup. SMEnode Labs. https://smenode-labs.com/free-pdf/networking/what-is-snmp/

BibTeX

@misc{smenodelabs2026,
  title = {What Is SNMP? How It Works, Versions, Ports and Cisco Setup},
  author = {{SMEnode Labs}},
  year = {2026},
  url = {https://smenode-labs.com/free-pdf/networking/what-is-snmp/},
  note = {SMEnode Labs}
}