Application Layer · Computer Networks

SVGVector Architecture Diagram (SVG)
COMPUTER NETWORKS · Module 5 · Application Layer★ High PriorityIT Sem 6 · Code 100602SNMPMNEMONICSNMP = Manager asks (Get/Set) on UDP 161, Agent shouts (Trap) on UDP 162.Remember SMI + MIB + SNMP: names, database, protocol.Core BreakdownOverviewSNMP (Simple Network Management Protocol) monitors and controls devices: routers, switches, servers.Application-layer protocol that uses UDP, so it stays light and simple.RolesNMS / manager: the management station that polls devices and shows the status.Agent: software on each device that keeps its data in a MIB and answers the manager.SMIStructure of Management Information: rules to name objects, define their types and encode values.It uses ASN.1 / BER, so every object gets a unique name (OID) and a type.MIBManagement Information Base: a tree-shaped database of managed objects in each agent.Standard branch mib-2 = 1.3.6.1.2.1. Example: sysName = 1.3.6.1.2.1.1.5.PDUsGetRequest, GetNextRequest (walk the tree), SetRequest (change a value) from manager to agent.Response from agent to manager; Trap sent by the agent on its own; v2 adds GetBulk and Inform.PortsAgent listens on UDP 161 for requests; manager listens on UDP 162 for Traps.UDP means no connection set-up, but also no guarantee of delivery.Polling/TrapPolling: manager asks regularly, which costs traffic but gives a steady view.Trap: agent reports an event at once (link down), so alarms are fast and cheap.Versionsv1: community string in clear text. v2c: adds GetBulk and Inform, same weak security.v3: authentication, privacy (encryption) and access control through USM and VACM.Diagram: SNMP ArchitectureNMS / Manager(management station)Agent + MIB(router, switch)Get / GetNext / Set UDP 161Response / Trap UDP 162MIB tree (OID = path of numbers)iso(1).org(3).dod(6)internet(1).mgmt(2)mib-2(1) = 1.3.6.1.2.1SMI: rules to nameand type objects.MIB: the databaseof managed objects.Example OID:1.3.6.1.2.1.1.5= sysNamePDUs: GetRequest · GetNextRequest · SetRequest · ResponseTrap: agent-initiated alarm (UDP 162), no request neededv1 community string (clear) · v2c GetBulk, Informv3 = authentication + encryption (USM)⚠️ Exam Traps & Viva Favorites① Which ports does SNMP use?UDP 161: agent receives Get / Set.UDP 162: manager receives Traps.Not TCP, so delivery is not guaranteed.② SMI vs MIB vs SNMP?SMI = rules for naming and typing objects.MIB = the database of those objects.SNMP = the protocol that moves them.③ What does v3 fix?v1 and v2c send a community string in cleartext. v3 adds authentication, encryptionand access control (USM, VACM).Tip: 161 requests · 162 trapsMaster Revision Table(learn it row by row!)ComponentRolePortDirectionPitfallManager (NMS)Polls devices, shows statusUDP 162 (traps)Request to agentSingle point of controlAgentHolds the MIB, answersUDP 161Response to managerNeeds a correct communitySMINaming and typing rulesn/an/aNot a databaseMIBTree of managed objectsn/an/aNot a protocolTrapUnsolicited alarmUDP 162Agent to managerUnreliable (UDP)SNMPv3Secure managementUDP 161/162Both waysHeavier set-upQUICK FACTSPorts: UDP 161 (agent) · UDP 162 (manager traps)PDUs: GetRequest · GetNextRequest · SetRequest · Response · Trap · GetBulk · InformOID: mib-2 = 1.3.6.1.2.1 · Versions: v1 · v2c · v3 (secure)VERIFIED★ Golden rule: Manager polls on 161, agent traps on 162; SMI names, MIB stores.

Simple Network Management Protocol (SNMP)


1. Role and Concept of Network Management

In enterprise networks containing thousands of routers, switches, servers, and access points, network administrators cannot log into each machine individually to check CPU load, interface traffic, or hardware temperature.

The Simple Network Management Protocol (SNMP) (RFC 1157 / 3411) provides a standardized framework for remotely monitoring network health, collecting telemetry, and configuring managed devices from a central console.

MermaidDiagram
Rendering diagram…

2. Core Architectural Components

SNMP network management is built on three interdependent standards:

MermaidDiagram
Rendering diagram…
  1. SMI (Structure of Management Information): Defines the mathematical rules and data types (using ASN.1) used to name and structure managed objects.
  2. MIB (Management Information Base): A structured, hierarchical tree database stored on the managed device. Every manageable parameter is assigned a globally unique Object Identifier (OID) (e.g., 1.3.6.1.2.1.1.1.0 represents sysDescr).
  3. SNMP Protocol: The application messaging protocol that carries queries and commands between the Manager and Agents.

3. SNMP Operations (PDUs) and Ports

SVGVector Architecture Diagram (SVG)
OPERATION (PDU) DIRECTION PURPOSE GetRequest Manager to Agent Queries the value of one or more specific OIDs GetNextRequest Manager to Agent Discovers next MIB entry sequentially (MIB Walk) GetBulkRequest Manager to Agent Retrieves large tabular arrays in a single packet SetRequest Manager to Agent Modifies or configures an agent parameter Response Agent to Manager Returns requested values or error status Trap Agent to Manager Unsolicited alert of an urgent event InformRequest Manager to Manager Acknowledged manager-to-manager event notification

Transport Ports (UDP):

  • UDP Port 161: Used by the SNMP Agent on managed devices to receive Get and Set requests from the NMS Manager.
  • UDP Port 162: Used by the NMS Manager to listen for incoming, unsolicited Trap alerts and Inform messages from agents.

4. SNMP Versions Comparison

Feature SNMPv1 (1988) SNMPv2c (1993) SNMPv3 (2002 - RFC 3411)
Security Model Cleartext Community Strings (public/private) Cleartext Community Strings USM (User-Based Security Model)
Authentication None (Plaintext password) None Cryptographic (HMAC-MD5, SHA-1, SHA-256)
Confidentiality None (Cleartext over UDP) None AES-128 / AES-256 Encryption
Message Integrity None None Cryptographic digest check
Bulk Data Fetch No (GetNext in loops) Yes (GetBulkRequest) Yes
64-bit Counters No (32-bit overflows in 5s on 10G) Yes (Counter64) Yes
Industry Status Deprecated / Insecure Widely deployed (Read-Only) Current Enterprise Standard

Frequently Asked Questions

QWhy does SNMP use UDP instead of TCP?

In a heavily congested or failing network, establishing a full TCP connection might fail or exacerbate packet delays. UDP has zero connection overhead, ensuring simple management queries and emergency traps can squeeze through even on degraded, flapping links.

QWhat is an SNMP Trap and which port does it use?

An SNMP Trap is an unsolicited notification initiated by an Agent to immediately alert the NMS of an anomalous event (e.g., physical link failure, system reboot, power supply failure). Traps are received on UDP Port 162.

QWhat is an OID in the Management Information Base (MIB)?

An Object Identifier (OID) is a dot-separated sequence of integers identifying a specific managed resource within the globally standardized MIB hierarchical tree (e.g., 1.3.6.1.2.1.2.2.1.10 for interface inbound octets).

QWhy is SNMPv3 essential over SNMPv1/v2c?

SNMPv1 and v2c send community string passwords and data in unencrypted plaintext, allowing attackers to hijack network devices via unauthorized SetRequest commands. SNMPv3 adds cryptographic user authentication (SHA) and AES payload encryption.

QWhich UDP ports does SNMP use and for what?

UDP 161 is used by agents to receive Get/Set requests from the manager. UDP 162 is used by the manager to receive unsolicited Trap and Inform messages from agents.

Budget AppAndroid App

Pocketly on Android

Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.

← All Computer Networks modules