Computer Networking › Section E · The network layer: control plane › Topic E.6
Network management, SNMP, and NETCONF
A large network has thousands of routers, switches and servers, each with counters to watch and settings to get right. Network management is how operators see what is happening and change it safely, and SNMP and NETCONF are the protocols that make it possible at scale.
What network management covers
Network management means monitoring, testing, configuring and troubleshooting the devices and links of a network so that it meets its goals at sensible cost. A classic checklist, FCAPS, names five areas: fault management (detecting and fixing failures), configuration management (keeping device settings correct), accounting (tracking who uses what), performance (measuring throughput, delay and loss) and security (controlling access and spotting attacks). In practice, operators want answers to questions such as: which interface is dropping packets, which device's configuration changed last night, and is any link nearing capacity?
The management framework
Most management systems share five pieces. A managing server, usually software in a network operations centre, runs applications that collect data and issue commands, with human operators in the loop. Managed devices are the routers, switches, servers and middleboxes being managed. Each managed device holds data: configuration, such as interface addresses; operational state, such as neighbour lists; and statistics, such as packet counters. A network management agent, software on each device, talks to the managing server and acts locally. A network management protocol carries queries, commands and alerts between them. Operators work through command-line interfaces, SNMP, or NETCONF with YANG models.
SNMP and the MIB
The Simple Network Management Protocol (SNMP) is the long-standing way to read and set device data. That data is organised as a Management Information Base (MIB): a collection of named objects, such as an interface's count of bytes received, its error count or its operational status. Each object has an object identifier (OID), a path in a global naming tree written as dotted numbers; standard internet objects sit under 1.3.6.1.2.1, the mib-2 subtree. MIB modules are written in a language called SMI, and hundreds of standard modules exist, plus vendor-specific ones. SNMP messages normally travel over UDP, with agents listening on port 161 and managers receiving traps on port 162.
SNMP messages
SNMP works in two modes. In request-response mode the manager asks and the agent answers. GetRequest reads one or more objects; GetNextRequest reads the next object in the tree, which lets a manager walk a whole table; GetBulkRequest reads a large block in one go; SetRequest changes values. The agent replies with a Response. In trap mode the agent speaks first: a trap is an unsolicited notification of an event, such as a link going down, so the manager need not wait for its next poll. An InformRequest is a notification that the receiver must acknowledge. Early SNMP versions protected messages only with a shared community string; SNMPv3 added authentication and encryption.
Worked example: link utilisation from counters
A manager polls a router's 1 Gbps interface every 300 seconds, reading its 64-bit received-bytes counter. 1. Two readings are 1,200,000,000 and 4,950,000,000 bytes. 2. The difference is 3,750,000,000 bytes, or \(3.75 \times 10^9 \times 8 = 3 \times 10^{10}\) bits. 3. Average rate: \(\frac{3 \times 10^{10}}{300} = 10^8\) bit/s, which is 100 Mbps. 4. Utilisation: 100 Mbps of 1 Gbps is 10%. 5. Why 64 bits? An old 32-bit counter wraps after \(2^{32}\) bytes, which at a full 1 Gbps takes only \(\frac{2^{32} \times 8}{10^9} \approx 34\) seconds, so a 300-second poll could miss many wraps. Check: bytes were converted to bits before dividing by time.
Beyond polling: flows and telemetry
Polling every few minutes gives averages that hide short bursts and scales poorly to huge networks. Two techniques complement it. Flow export, using Cisco's NetFlow or the IETF standard IPFIX, has routers summarise traffic per flow, identified by addresses, ports and protocol, with byte and packet counts, often sampling one packet in N on fast links; it shows who is talking to whom, for capacity planning and spotting attacks. Streaming telemetry has devices push structured data every few seconds to collectors, using protocols such as gNMI and data described by YANG models, giving fresher and finer-grained visibility.
NETCONF and YANG
Configuring devices one at a time through each vendor's command line is slow and error-prone, and settings drift from what was intended. NETCONF, defined in RFC 6241, manages configuration programmatically. A manager opens a secure session, usually over SSH, and sends remote procedure calls encoded in XML. Operations include get-config to read a configuration, edit-config to change it, lock and unlock to stop others editing at the same time, validate to check a change, and commit to make a candidate configuration live. Changes are transactional: they apply to a device completely or not at all. YANG is the data-modelling language that defines the structure, types and constraints of the data NETCONF carries.
Worked example: a safe change on three routers
An operator must add the same new VLAN interface to three routers without leaving the network half-configured. 1. The management application opens NETCONF sessions to all three and sends lock on each candidate configuration, so no one else can edit. 2. It sends edit-config with the new interface, described in the vendor-neutral YANG model, to each candidate. 3. It sends validate; router 3 reports that the chosen address clashes with an existing one. 4. The application discards the candidate changes on all three and unlocks them, so nothing has changed anywhere. 5. After fixing the address it repeats steps 1 to 3, then sends commit and unlocks. Check: the clashing address never went live anywhere, and no router was left with a half-applied change.
Why it matters: configuration and outages
Many large outages begin with a configuration change rather than broken hardware. In October 2021, for example, a mistaken command during routine maintenance disconnected Facebook's backbone, and its services, including Instagram and WhatsApp, were unreachable for about six hours. Good practice therefore treats configuration like software: keep intended configurations under version control, generate them from templates, validate and review changes, roll them out gradually and keep a tested way to roll back. Structured protocols such as NETCONF, and automation tools built on them, make that discipline practical across thousands of devices.
Common mistakes to avoid
First, thinking SNMP only reads data; SetRequest can change device settings, which is why securing it matters. Second, confusing a trap, sent by the agent unprompted, with a Response to a manager's request. Third, forgetting to convert bytes to bits when turning counter readings into a rate in Mbps. Fourth, ignoring counter wrap on 32-bit counters at high speeds. Fifth, describing YANG as a protocol; it is a data-modelling language, carried by protocols such as NETCONF. Sixth, editing many devices without locks or transactions, risking a half-applied change.
Key takeaways
Network management covers fault, configuration, accounting, performance and security (FCAPS). A managing server talks through a management protocol to agents on managed devices, which hold configuration, state and statistics. SNMP, over UDP ports 161 and 162, reads and sets MIB objects named by OIDs, using Get, GetNext, GetBulk and Set requests, Responses, traps and informs; SNMPv3 adds security. Counter differences give link rates once bytes become bits. Flow export (NetFlow, IPFIX) and streaming telemetry add detail. NETCONF (RFC 6241) configures devices transactionally over SSH using XML and YANG data models.
Flashcards
Flashcard
Fault, configuration, accounting, performance, security
Test your understanding
Question 1 of 5
An interface's received-bytes counter rises by 3,600,000,000 between two polls 60 seconds apart. What was the average incoming rate?
Question 2 of 5
A router's link goes down, and it immediately tells the manager without waiting to be asked. Which SNMP message is this?
Question 3 of 5
What is YANG?
Question 4 of 5
Why does a 32-bit byte counter cause trouble on a busy 1 Gbps link polled every 5 minutes?
Question 5 of 5
An operator must change three routers so that either all get the new configuration or none do. Which NETCONF feature helps most?
