Simple Network Management Protocol (SNMP) in TCP/IP

 

🌐 Simple Network Management Protocol (SNMP) in TCP/IP

SNMP (Simple Network Management Protocol) is an application-layer protocol in the TCP/IP protocol suite used to monitor, manage, and control network devices such as routers, switches, servers, and computers.

It allows a network administrator to monitor devices from a central management station, even when the devices are manufactured by different vendors or connected through different types of networks.

1. Why do we need SNMP?

Consider a college network with several routers, switches, and servers. The network administrator needs to know:

  • Are all routers and switches working properly?

  • How many packets are being received and forwarded?

  • Is any router experiencing congestion?

  • Has a network device failed?

  • Does a device need to be reconfigured or restarted?

SNMP helps the administrator collect this information and perform certain management operations remotely.

2. Architecture of SNMP

SNMP uses two main entities: a manager and one or more agents.


Conceptual diagram: one manager communicates with multiple managed devices.

The two main entities

1. Manager

  • Runs the network management application.

  • Requests information from managed devices.

  • Displays and analyzes collected data.

  • Can request changes to supported device settings.

2. Agent

  • Runs on a managed device, such as a router or server.

  • Collects information about the device's status and performance.

  • Maintains management variables.

  • Responds to the manager's requests.

  • Can send a warning, called a trap, when an unusual event occurs.


3. How does SNMP work?

Suppose a network administrator wants to check whether a router is forwarding packets successfully.

  1. The manager sends a request. It asks the router for the number of packets received and forwarded.

  2. The agent retrieves the values. It accesses the relevant management variables maintained for the router.

  3. The agent sends a response. The manager receives the requested values.

  4. The manager analyzes the information. It can compare packet counts and investigate possible congestion or errors.

SNMP also supports changing certain management values. For example, a manager may request that an agent change a configurable parameter. An agent can independently send a trap to notify the manager about an unusual event.

4. The three components of Internet network management

An important point  is that network management uses SNMP, SMI, and MIB together. Each has a different responsibility.



SNMP — Communication and operations

Defines management messages and is used to read or change the values of management objects.

SMI — Structure of Management Information

Defines the general rules for naming objects, specifying data types, and encoding their values.

MIB — Management Information Base

Defines the collection of management objects, their names, data types, and relationships for a managed device.

An easy analogy

Computer programming

Network management

Language syntax defines rules

    SMI defines object rules

Variable declarations define variables and types

    MIB defines management objects and their types

Program statements manipulate values

    SNMP reads or changes object values

Remember: SMI defines the rules, MIB defines the objects, and SNMP communicates with those objects.



5. SNMP message types and notifications

The main operations commonly associated with SNMP include:

Operation

Purpose

GetRequest

    Request the value of an object

GetNextRequest

    Request the next object in a sequence

GetBulkRequest

    Retrieve multiple values efficiently

SetRequest

    Request a change to an object's value

Response

    Return the result of a request

Trap

    Notify the manager of an event without waiting for a request

InformRequest

    Send a notification that expects an acknowledgment

The first six include operations familiar from SNMP discussions; GetBulkRequest and InformRequest are supported in SNMPv2 and later versions. A trap generally does not require acknowledgment, while an inform does.

6. SNMP and TCP/IP

SNMP operates at the application layer of TCP/IP. In common deployments, it uses UDP at the transport layer.

Application layer — SNMP

Transport layer — UDP

Internet layer — IP

Network access layer — Ethernet, Wi-Fi, etc.

Common SNMP ports are:

  • UDP port 161: Used by an agent to receive manager requests and return responses.

  • UDP port 162: Commonly used by the manager to receive traps and notifications.

SNMP traditionally uses UDP because management messages are short and lightweight. Since UDP does not guarantee delivery, the management application may need to retry requests if responses are not received.

7. Applications of SNMP

  • Monitoring router and switch status.

  • Measuring network traffic and interface utilization.

  • Detecting device failures and unusual conditions.

  • Tracking packet errors and discarded packets.

  • Monitoring server and printer status.

  • Collecting statistics for network performance management.

Quick Summary

SNMP = Simple Network Management Protocol

  • Manager: Monitors and manages devices.

  • Agent: Runs on a managed device and provides information.

  • SMI: Defines naming, data-type, and encoding rules.

  • MIB: Defines management objects and their types.

  • SNMP: Reads and changes object values and carries management messages.

  • UDP 161: Requests and responses.

  • UDP 162: Traps and notifications.

The key idea is that SNMP enables a central management station to monitor and manage many network devices through a standard application-layer protocol.

Comments

Popular posts from this blog

Computer Networks PCCST501 Semester 5 KTU CS 2024 Scheme - Dr Binu V P

Model Question Paper Computer Networks PCCST501 KTU 2024 Scheme and Answer Key

Introduction to Computer Networks