SNMP
SNMP
Simple Network Management Protocol (SNMP) is an Internet Standard protocol for collecting
and organizing information about managed devices on IP networks and for modifying that
information to change device behavior. Devices that typically support SNMP include cable
modems, routers, network switches, servers, workstations, printers, and more.[1]
Three significant versions of SNMP have been developed and RFC(s) 3411–3418
deployed. SNMPv1 is the original version of the protocol.
More recent versions, SNMPv2c and SNMPv3, feature
Secure SNMP
improvements in performance, flexibility and security.
Communication protocol
SNMP is a component of the Internet Protocol Suite as
OSI layer Application
defined by the Internet Engineering Task Force (IETF). It
consists of a set of standards for network management, Port(s) 10161, 10162
including an application layer protocol, a database schema, (Trap)
and a set of data objects.[2]
RFC(s) 6353
1 of 19 2/6/25, 19:18
Simple Network Management Protocol - Wikipedia https://en.m.wikipedia.org/wiki/Simple_Network_Managem...
In typical uses of SNMP, one or more administrative computers called managers have the task of
monitoring or managing a group of hosts or devices on a computer network. Each managed
system executes a software component called an agent that reports information via SNMP to the
manager.
• Managed devices
A managed device is a network node that implements an SNMP interface that allows
unidirectional (read-only) or bidirectional (read and write) access to node-specific information.
Managed devices exchange node-specific information with the NMSs. Sometimes called network
elements, the managed devices can be any type of device, including, but not limited to, routers,
access servers, switches, cable modems, bridges, hubs, IP telephones, IP video cameras,
computer hosts, and printers.
A network management station executes applications that monitor and control managed devices.
NMSs provide the bulk of the processing and memory resources required for network
management. One or more NMSs may exist on any managed network.
2 of 19 2/6/25, 19:18
Simple Network Management Protocol - Wikipedia https://en.m.wikipedia.org/wiki/Simple_Network_Managem...
SNMP agents expose management data on the managed systems as variables. The protocol
also permits active management tasks, such as configuration changes, through remote
modification of these variables. The variables accessible via SNMP are organized in hierarchies.
SNMP itself does not define which variables a managed system should offer. Rather, SNMP uses
an extensible design that allows applications to define their own hierarchies. These hierarchies
are described as a management information base (MIB). MIBs describe the structure of the
management data of a device subsystem; they use a hierarchical namespace containing object
identifiers (OID). Each OID identifies a variable that can be read or set via SNMP. MIBs use the
notation defined by Structure of Management Information Version 2.0 (SMIv2, RFC 2578 (http
s://datatracker.ietf.org/doc/html/rfc2578) ), a subset of ASN.1.
Protocol details
SNMP operates in the application layer of the Internet protocol suite. All SNMP messages are
transported via User Datagram Protocol (UDP). The SNMP agent receives requests on UDP port
161. The manager may send requests from any available source port to port 161 in the agent.
The agent response is sent back to the source port on the manager. The manager receives
notifications (Traps and InformRequests) on port 162. The agent may generate notifications from
any available port. When used with Transport Layer Security or Datagram Transport Layer
Security, requests are received on port 10161 and notifications are sent to port 10162.[3]
SNMPv1 specifies five core protocol data units (PDUs). Two other PDUs, GetBulkRequest and
InformRequest were added in SNMPv2 and the Report PDU was added in SNMPv3. All SNMP
PDUs are constructed as follows:
IP header UDP header version community PDU-type request-id error-status error-index variable bindings
The seven SNMP PDU types as identified by the PDU-type field are as follows:
GetRequest
A manager-to-agent request to retrieve the value of a variable or list of variables. Desired
variables are specified in variable bindings (the value field is not used). Retrieval of the
specified variable values is to be done as an atomic operation by the agent. A Response with
current values is returned.
SetRequest
A manager-to-agent request to change the value of a variable or list of variables. Variable
bindings are specified in the body of the request. Changes to all specified variables are to be
3 of 19 2/6/25, 19:18
Simple Network Management Protocol - Wikipedia https://en.m.wikipedia.org/wiki/Simple_Network_Managem...
made as an atomic operation by the agent. A Response with (current) new values for the
variables is returned.
GetNextRequest
A manager-to-agent request to discover available variables and their values. Returns a
Response with variable binding for the lexicographically next variable in the MIB. The entire
MIB of an agent can be walked by iterative application of GetNextRequest starting at OID 0.
Rows of a table can be read by specifying column OIDs in the variable bindings of the request.
GetBulkRequest
A manager-to-agent request for multiple iterations of GetNextRequest. An optimized version of
GetNextRequest. Returns a Response with multiple variable bindings walked from the variable
binding or bindings in the request. PDU specific non-repeaters and max-repetitions fields are
used to control response behavior. GetBulkRequest was introduced in SNMPv2.
Response
Returns variable bindings and acknowledgement from agent to manager for GetRequest,
SetRequest, GetNextRequest, GetBulkRequest and InformRequest. Error reporting is provided by
error-status and error-index fields. Although it was used as a response to both gets and sets,
this PDU was called GetResponse in SNMPv1.
Trap
Asynchronous notification from agent to manager. While in other SNMP communication, the
manager actively requests information from the agent, these are PDUs that are sent from the
agent to the manager without being explicitly requested. SNMP Traps enable an agent to notify
the management station of significant events by way of an unsolicited SNMP message. Trap
PDUs include current sysUpTime value, an OID identifying the type of trap and optional variable
bindings. Destination addressing for traps is determined in an application-specific manner
typically through trap configuration variables in the MIB. The format of the trap message was
changed in SNMPv2 and the PDU was renamed SNMPv2-Trap.
InformRequest
Acknowledged asynchronous notification. This PDU was introduced in SNMPv2 and was
originally defined as manager to manager communication.[4] Later implementations have
loosened the original definition to allow agent to manager communications.[5][6][7] Manager-to-
manager notifications were already possible in SNMPv1 using a Trap, but as SNMP commonly
runs over UDP where delivery is not assured and dropped packets are not reported, delivery of
a Trap was not guaranteed. InformRequest fixes this as an acknowledgement is returned on
receipt.[6]
4 of 19 2/6/25, 19:18
Simple Network Management Protocol - Wikipedia https://en.m.wikipedia.org/wiki/Simple_Network_Managem...
SNMPv1 and SNMPv2c use communities to establish trust between managers and agents. Most
agents support three community names, one each for read-only, read-write and trap. These three
community strings control different types of activities. The read-only community applies to get
requests. The read-write community string applies to set requests. The trap community string
applies to receipt of traps. SNMPv3 also uses community strings, but allows for secure
authentication and communication between SNMP manager and agent.[9]
Protocol versions
In practice, SNMP implementations often support multiple versions: typically SNMPv1, SNMPv2c,
and SNMPv3.[10][11]
Version 1
SNMP version 1 (SNMPv1) is the initial implementation of the SNMP protocol. The design of
SNMPv1 was done in the 1980s by a group of collaborators who viewed the officially sponsored
OSI/IETF/NSF (National Science Foundation) effort (HEMS/CMIS/CMIP) as both
unimplementable in the computing platforms of the time as well as potentially unworkable.
SNMP was approved based on a belief that it was an interim protocol needed for taking steps
towards large-scale deployment of the Internet and its commercialization.
The first Request for Comments (RFCs) for SNMP, now known as SNMPv1, appeared in 1988:
5 of 19 2/6/25, 19:18
Simple Network Management Protocol - Wikipedia https://en.m.wikipedia.org/wiki/Simple_Network_Managem...
SNMPv1 is widely used and is the de facto network management protocol in the Internet
community.[12]
SNMPv1 may be carried by transport layer protocols such as User Datagram Protocol (UDP), OSI
Connectionless-mode Network Service (CLNS), AppleTalk Datagram Delivery Protocol (DDP), and
Novell Internetwork Packet Exchange (IPX).
Version 1 has been criticized for its poor security.[13] The specification does, in fact, allow room
for custom authentication to be used, but widely used implementations "support only a trivial
authentication service that identifies all SNMP messages as authentic SNMP messages."[14] The
security of the messages, therefore, becomes dependent on the security of the channels over
which the messages are sent. For example, an organization may consider their internal network
to be sufficiently secure that no encryption is necessary for its SNMP messages. In such cases,
the community name, which is transmitted in cleartext, tends to be viewed as a de facto
password, in spite of the original specification.
Version 2
6 of 19 2/6/25, 19:18
Simple Network Management Protocol - Wikipedia https://en.m.wikipedia.org/wiki/Simple_Network_Managem...
reached the Proposed Standard level of maturity, but was deemed obsolete by later versions.[15]
64-bit counters
SNMP version 2 introduces the option for 64-bit data counters. Version 1 was designed only with
32-bit counters, which can store integer values from zero to 4.29 billion (precisely
4 294 967 295). A 32-bit version 1 counter cannot store the maximum speed of a 10 gigabit or
larger interface, expressed in bits per second. Similarly, a 32-bit counter tracking statistics for a
10 gigabit or larger interface can roll over back to zero again in less than one minute, which may
be a shorter time interval than a counter is polled to read its current state. This would result in
lost or invalid data due to the undetected value rollover, and corruption of trend-tracking data.
The 64-bit version 2 counter can store values from zero to 18.4 quintillion (precisely
18,446,744,073,709,551,615) and so is currently unlikely to experience a counter rollover between
polling events. For example, 1.6 terabit Ethernet is predicted to become available by 2025. A 64-
bit counter incrementing at a rate of 1.6 trillion bits per second would be able to retain
information for such an interface without rolling over for 133 days.
SNMPv2c is incompatible with SNMPv1 in two key areas: message formats and protocol
operations. SNMPv2c messages use different header and protocol data unit (PDU) formats than
SNMPv1 messages. SNMPv2c also uses two protocol operations that are not specified in
7 of 19 2/6/25, 19:18
Simple Network Management Protocol - Wikipedia https://en.m.wikipedia.org/wiki/Simple_Network_Managem...
Proxy agents
An SNMPv2 agent can act as a proxy agent on behalf of SNMPv1-managed devices. When an
SNMPv2 NMS issues a command intended for an SNMPv1 agent it sends it to the SNMPv2 proxy
agent instead. The proxy agent forwards Get , GetNext , and Set messages to the SNMPv1
agent unchanged. GetBulk messages are converted by the proxy agent to GetNext messages
and then are forwarded to the SNMPv1 agent. Additionally, the proxy agent receives and maps
SNMPv1 trap messages to SNMPv2 trap messages and then forwards them to the NMS.
Version 3
Although SNMPv3 makes no changes to the protocol aside from the addition of cryptographic
security, it looks very different due to new textual conventions, concepts, and terminology.[1] The
most visible change was to define a secure version of SNMP, by adding security and remote
configuration enhancements to SNMP.[18] The security aspect is addressed by offering both
strong authentication and data encryption for privacy. For the administration aspect, SNMPv3
focuses on two parts, namely notification originators and proxy forwarders. The changes also
facilitate remote configuration and administration of the SNMP entities, as well as addressing
issues related to the large-scale deployment, accounting, and fault management.
• Identification of SNMP entities to facilitate communication only between known SNMP entities
– Each SNMP entity has an identifier called the SNMPEngineID, and SNMP communication is
possible only if an SNMP entity knows the identity of its peer. Traps and Notifications are
exceptions to this rule.
8 of 19 2/6/25, 19:18
Simple Network Management Protocol - Wikipedia https://en.m.wikipedia.org/wiki/Simple_Network_Managem...
• Support for security models – A security model may define the security policy within an
administrative domain or an intranet. SNMPv3 contains the specifications for a user-based
security model (USM).
• Definition of security goals where the goals of message authentication service include
protection against the following:
◦ Modification of Information – Protection against some unauthorized SNMP entity altering
in-transit messages generated by an authorized principal.
• Specification for USM – USM consists of the general definition of the following
communication mechanisms available:
◦ Communication without authentication and privacy (NoAuthNoPriv).
• Definition of different authentication and privacy protocols – MD5, SHA and HMAC-SHA-2[19]
authentication protocols and the CBC_DES and CFB_AES_128 privacy protocols are supported
in the USM.
• Definition of a discovery procedure – To find the SNMPEngineID of an SNMP entity for a given
transport address and transport endpoint address.
• Definition of the SNMP framework MIB – To facilitate remote configuration and administration
of the SNMP entity.
• Definition of the USM MIBs – To facilitate remote configuration and administration of the
security module.
• Definition of the view-based access control model (VACM) MIBs – To facilitate remote
configuration and administration of the access control module.
9 of 19 2/6/25, 19:18
Simple Network Management Protocol - Wikipedia https://en.m.wikipedia.org/wiki/Simple_Network_Managem...
Security was one of the biggest weaknesses of SNMP until v3. Authentication in SNMP Versions
1 and 2 amounts to nothing more than a password (community string) sent in clear text between
a manager and agent.[1] Each SNMPv3 message contains security parameters that are encoded
as an octet string. The meaning of these security parameters depends on the security model
being used.[20] The security approach in v3 targets:[21]
• Integrity – Message integrity to ensure that a packet has not been tampered while in transit
including an optional packet replay protection mechanism.
v3 also defines the USM and VACM, which were later followed by a transport security model
(TSM) that provided support for SNMPv3 over SSH and SNMPv3 over TLS and DTLS.
• USM (User-based Security Model) provides authentication and privacy (encryption) functions
and operates at the message level.
• VACM (View-based Access Control Model) determines whether a given principal is allowed
access to a particular MIB object to perform specific functions and operates at the PDU level.
• TSM (Transport Security Model) provides a method for authenticating and encrypting
messages over external security channels. Two transports, SSH and TLS/DTLS, have been
defined that make use of the TSM specification.
As of 2004 the IETF recognizes Simple Network Management Protocol version 3 as defined by
RFC 3411 (https://datatracker.ietf.org/doc/html/rfc3411) –RFC 3418 (https://datatracker.ietf.
org/doc/html/rfc3418) [22] (also known as STD0062) as the current standard version of SNMP.
The IETF has designated SNMPv3 a full Internet standard,[23] the highest maturity level for an
RFC. It considers earlier versions to be obsolete (designating them variously Historic or
Obsolete).[15]
Implementation issues
SNMP's powerful write capabilities, which would allow the configuration of network devices, are
not being fully utilized by many vendors, partly because of a lack of security in SNMP versions
before SNMPv3, and partly because many devices simply are not capable of being configured via
individual MIB object changes.
Some SNMP values (especially tabular values) require specific knowledge of table indexing
10 of 19 2/6/25, 19:18
Simple Network Management Protocol - Wikipedia https://en.m.wikipedia.org/wiki/Simple_Network_Managem...
schemes, and these index values are not necessarily consistent across platforms. This can
cause correlation issues when fetching information from multiple devices that may not employ
the same table indexing scheme (for example fetching disk utilization metrics, where a specific
disk identifier is different across platforms.)[24]
Some major equipment vendors tend to over-extend their proprietary command line interface
(CLI) centric configuration and control systems.[25]
In February 2002 the Carnegie Mellon Software Engineering Institute (CM-SEI) Computer
Emergency Response Team Coordination Center (CERT-CC) issued an Advisory on SNMPv1,[26]
after the Oulu University Secure Programming Group conducted a thorough analysis of SNMP
message handling. Most SNMP implementations, regardless of which version of the protocol
they support, use the same program code for decoding protocol data units (PDU) and problems
were identified in this code. Other problems were found with decoding SNMP trap messages
received by the SNMP management station or requests received by the SNMP agent on the
network device. Many vendors had to issue patches for their SNMP implementations.[8]: 1875
Security implications
Because SNMP is designed to allow administrators to monitor and configure network devices
remotely it can also be used to penetrate a network. A significant number of software tools can
scan the entire network using SNMP, therefore mistakes in the configuration of the read-write
mode can make a network susceptible to attacks.[27]: 52
In 2001, Cisco released information that indicated that, even in read-only mode, the SNMP
implementation of Cisco IOS is vulnerable to certain denial of service attacks. These security
issues can be fixed through an IOS upgrade.[28]
If SNMP is not used in a network it should be disabled in network devices. When configuring
SNMP read-only mode, close attention should be paid to the configuration of the access control
and from which IP addresses SNMP messages are accepted. If the SNMP servers are identified
by their IP, SNMP is only allowed to respond to these IPs and SNMP messages from other IP
addresses would be denied. However, IP address spoofing remains a security concern.[27]: 54
11 of 19 2/6/25, 19:18
Simple Network Management Protocol - Wikipedia https://en.m.wikipedia.org/wiki/Simple_Network_Managem...
Authentication
SNMP is available in different versions, and each version has its own security issues. SNMP v1
sends passwords in plaintext over the network. Therefore, passwords can be read with packet
sniffing. SNMP v2 allows password hashing with MD5, but this has to be configured. Virtually all
network management software support SNMP v1, but not necessarily SNMP v2 or v3. SNMP v2
was specifically developed to provide data security, that is authentication, privacy and
authorization, but only SNMP version 2c gained the endorsement of the Internet Engineering
Task Force (IETF), while versions 2u and 2* failed to gain IETF approval due to security issues.
SNMP v3 uses MD5, Secure Hash Algorithm (SHA) and keyed algorithms to offer protection
against unauthorized data modification and spoofing attacks. If a higher level of security is
needed the Data Encryption Standard (DES) can be optionally used in the cipher block chaining
mode. SNMP v3 is implemented on Cisco IOS since release 12.0(3)T.[27]: 52
SNMPv3 may be subject to brute force and dictionary attacks for guessing the authentication
keys, or encryption keys, if these keys are generated from short (weak) passwords or passwords
that can be found in a dictionary. SNMPv3 allows both providing random uniformly distributed
cryptographic keys and generating cryptographic keys from a password supplied by the user. The
risk of guessing authentication strings from hash values transmitted over the network depends
on the cryptographic hash function used and the length of the hash value. SNMPv3 uses the
HMAC-SHA-2 authentication protocol for the User-based Security Model (USM).[29] SNMP does
not use a more secure challenge-handshake authentication protocol. SNMPv3 (like other SNMP
protocol versions) is a stateless protocol, and it has been designed with a minimal amount of
interactions between the agent and the manager. Thus introducing a challenge-response
handshake for each command would impose a burden on the agent (and possibly on the network
itself) that the protocol designers deemed excessive and unacceptable.
The security deficiencies of all SNMP versions can be mitigated by IPsec authentication and
confidentiality mechanisms. SNMP also may be carried securely over Datagram Transport Layer
Security (DTLS).[10]
Many SNMP implementations include a type of automatic discovery where a new network
component, such as a switch or router, is discovered and polled automatically. In SNMPv1 and
SNMPv2c this is done through a community string that is transmitted in clear-text to other
devices.[10] Clear-text passwords are a significant security risk. Once the community string is
known outside the organization it could become the target for an attack. To alert administrators
of other attempts to glean community strings, SNMP can be configured to pass community-
12 of 19 2/6/25, 19:18
Simple Network Management Protocol - Wikipedia https://en.m.wikipedia.org/wiki/Simple_Network_Managem...
name authentication failure traps.[27]: 54 If SNMPv2 is used, the issue can be avoided by enabling
password encryption on the SNMP agents of network devices.
The common default configuration for community strings are "public" for read-only access and
"private" for read-write.[8]: 1874 Because of the well-known defaults, SNMP topped the list of the
SANS Institute's Common Default Configuration Issues and was number ten on the SANS Top 10
Most Critical Internet Security Threats for the year 2000.[30] System and network administrators
frequently do not change these configurations.[8]: 1874
Whether it runs over TCP or UDP, SNMPv1 and v2 are vulnerable to IP spoofing attacks. With
spoofing, attackers may bypass device access lists in agents that are implemented to restrict
SNMP access. SNMPv3 security mechanisms such as USM or TSM can prevent spoofing
attacks.
See also
References
1. Douglas R. Mauro & Kevin J. Schmidt. (2001). Essential SNMP (1st ed.). Sebastopol, CA:
O'Reilly & Associates.
13 of 19 2/6/25, 19:18
Simple Network Management Protocol - Wikipedia https://en.m.wikipedia.org/wiki/Simple_Network_Managem...
5. D. Levi; P. Meyer; B. Stewart (April 1999). "RFC 2573 – SNMP Applications" (https://tools.ie
tf.org/html/rfc2573#section-3.3) . Internet Engineering Task Force.
doi:10.17487/RFC2573 (https://doi.org/10.17487%2FRFC2573) .
8. Harold F. Tipton; Micki Krause (2007). Information Security Management Handbook, Sixth
Edition. CRC Press. ISBN 9780849374951.
9. Douglas Mauro; Kevin Schmidt (2005). Information Security Management Handbook, Sixth
EditioEssential SNMP: Help for System and Network Administrators. O'Reilly Media, Inc.
pp. 21–22. ISBN 9780596552770.
10. Stuart Jacobs (2015). Engineering Information Security: The Application of Systems
Engineering Concepts to Achieve Information Assurance. John Wiley & Sons. p. 367.
ISBN 9781119104797.
14 of 19 2/6/25, 19:18
Simple Network Management Protocol - Wikipedia https://en.m.wikipedia.org/wiki/Simple_Network_Managem...
12. Wiley, John (2015-12-01). Engineering Information Security: The Application of Systems
Engineering Concepts to Achieve Information Assurance (https://books.google.com/book
s?id=6i1cCwAAQBAJ&q=snmpv1+is+obsolete&pg=PA366) . John Wiley & Sons. p. 366.
ISBN 9781119104711. Retrieved 2017-09-14.
20. David Zeltserman (1999). A Practical Guide to SNMPv3 and Network Management. Upper
Saddle River, NJ: Prentice Hall PTR.
15 of 19 2/6/25, 19:18
Simple Network Management Protocol - Wikipedia https://en.m.wikipedia.org/wiki/Simple_Network_Managem...
27. Andrew G. Mason; Mark J. Newcomb (2001). Cisco Secure Internet Security Solutions. Cisco
Press. ISBN 9781587050169.
28. Andrew G. Mason; Mark J. Newcomb (2001). Cisco Secure Internet Security Solutions (http
s://archive.org/details/ciscosecureinter00maso) . Cisco Press. pp. 52 (https://archive.or
g/details/ciscosecureinter00maso/page/n51) . ISBN 9781587050169.
29. HMAC-SHA-2 Authentication Protocols in the User-based Security Model (USM) for SNMPv3.
RFC 7630 (https://tools.ietf.org/html/rfc7630) .
Further reading
• Douglas Mauro; Kevin Schmidt (2005). Essential SNMP (Second ed.). O'Reilly Media.
ISBN 978-0596008406.
• William Stallings (1999). SNMP, SNMPv2, SNMPv3, and RMON 1 and 2 (https://archive.org/det
ails/snmpsnmpv2snmpv30000stal/page/619) . Addison Wesley Longman, Inc.
ISBN 978-0201485349.
• Marshall T. Rose (1996). The Simple Book. Prentice Hall. ISBN 0-13-451659-1.
• RFC 1155 (https://datatracker.ietf.org/doc/html/rfc1155) (STD 16) — Structure and
Identification of Management Information for the TCP/IP-based Internets
16 of 19 2/6/25, 19:18
Simple Network Management Protocol - Wikipedia https://en.m.wikipedia.org/wiki/Simple_Network_Managem...
17 of 19 2/6/25, 19:18
Simple Network Management Protocol - Wikipedia https://en.m.wikipedia.org/wiki/Simple_Network_Managem...
External links
18 of 19 2/6/25, 19:18
Simple Network Management Protocol - Wikipedia https://en.m.wikipedia.org/wiki/Simple_Network_Managem...
19 of 19 2/6/25, 19:18