RFC 1157: SNMP: Monitoring network devices uniformly
Summary
In May 1990, Case, Fedor, Schoffstall and Davin of SNMP Research, Performance Systems International and MIT described version 1 of the Simple Network Management Protocol in RFC 1157. SNMP allows a management station to query and set values in devices and to receive event notifications, and it quickly became the standard for monitoring routers, switches and servers. Its authentication consisted of a community name transmitted in plain text, which is why RFC 1157 is now considered historic and SNMPv3 has taken its place.
Few commands, many values
SNMPv1 knows only five message types: GetRequest and GetNextRequest for reading, SetRequest for writing, GetResponse as the reply and Trap for unsolicited notifications. The values live in a Management Information Base and are addressed through hierarchical object identifiers. GetNext can walk an entire table without knowing its entries in advance.
Agents listen on UDP port 161, and traps go to port 162. The predefined traps report typical events such as cold and warm start, an interface going down and coming back, or a failed authentication.
A password anyone can read
RFC 1157 controls access through communities: every message carries a community name, and the agent decides on the basis of this name whether and what it allows. The text itself admits that some implementations will offer only a trivial authentication service that treats every message as authentic.
Because the community name sits unencrypted in the packet and values such as public and private were widespread, SNMP became a well-known weakness. In December 2002, SNMPv3 brought an architecture with user-based authentication and encryption in RFC 3411 to 3418.
Ideas
- Five message types suffice for reading, writing and reporting.
- Object identifiers address values in a hierarchical MIB.
- GetNext walks tables without knowing their entries.
- Agents listen on UDP 161, traps go to UDP 162.
- Communities separate access rights by a name.
- The community name travels unencrypted in the packet.
Insights
- A simple shared data model made multi-vendor monitoring possible in the first place; simplicity in protection was the price.
- Management protocols with write access are particularly delicate, because an attacker can change configurations with SetRequest.
Facts
- RFC 1157 appeared in May 1990 and replaces RFC 1098 from April 1989.
- The status of RFC 1157 is now Historic.
- SNMP uses UDP port 161 for requests and 162 for traps.
- SNMPv3 is described as Internet Standard in RFC 3411 to 3418 from December 2002.
References
- RFC 1157: Simple Network Management Protocol (SNMP)
- RFC 3411: An Architecture for Describing SNMP Management Frameworks (2002)
- RFC 3414: User-based Security Model (USM) for SNMPv3 (2002)
Remarks
- Tools such as MRTG, Cacti or LibreNMS still read interface counters via SNMP today, often still in version 2c with a community string.
Recommendations
- Switch off SNMPv1 and v2c where devices support SNMPv3 with authentication and encryption.
- Change default communities such as public and private immediately and disable write access.
- Make SNMP reachable only from a dedicated management network.
Read the RFC at the RFC Editor
Found a mistake or have something to add? Get in touch.
Links to the original source and the Web Archive open in a new tab.