SNMP - Simple Network Management Protocol

What is SNMP?

SNMP stands for Simple Network Management Protocol. It is used to monitor, manage, and control network devices such as routers, switches, servers, printers, and more from a centralized management system.

Why is SNMP useful?

  • Allows centralized monitoring of network health and performance

  • Helps detect and troubleshoot network issues quickly

  • Supports automated alerts for failures or unusual activity

  • Enables remote configuration and management of devices

How it works

  • Manager sends a request – A central SNMP manager queries a device (called an agent)

  • Agent responds – The device replies with requested data (e.g., uptime, interface stats)

  • Traps and notifications – Devices can proactively send alerts (called traps) to the manager when events occur

  • Data analysis – The SNMP manager collects and analyzes this data for visualization and reporting

Where is SNMP used?

  • Enterprise networks – Monitor routers, switches, and servers

  • Data centers – Manage large-scale infrastructure

  • ISPs and telecoms – Track performance, uptime, and device health

  • IT departments – Enable proactive maintenance and real-time alerting

Which OSI layer does this protocol belong to?

  • Application Layer (Layer 7)

  • Provides network management services directly to applications

  • Defines message types like GET, SET, and TRAP

  • Operates over UDP (typically ports 161 and 162), but its logic resides in Layer 7

  • In this section, you are going to learn

  • Terminology

  • Version Info

SNMP Version

SNMP Number

Year

Core Idea / Contribution

SNMPv1

RFC 1157

1990

The original version of SNMP; introduced basic network management operations like GET, SET, and TRAP.

SNMPv2c

RFC 1901, RFC 1908

1996

Community-based SNMPv2; improved error handling and added operations like GETBULK.

SNMPv3

RFC 34103418, RFC 3584, RFC 3826

2002-2004

Introduced security features: authentication, encryption, and access control. Modular architecture for extensibility.

SNMP Security Extensions

RFC 3826, RFC 55905591, RFC 5953

2004-2010

Added AES encryption and support for secure transport protocols like TLS and DTLS.

SNMP Context EngineID Discovery

RFC 5343

2008

Enabled discovery of SNMPv3 context EngineIDs for better multi-agent management.

SNMP GetRequest Test Case

  • To verify that the SNMP manager can succesfully retrieve data from the SNMP agent using an SNMP GET request for a known OID (sysName.0)

  • Step-1: Install SNMP tools and agent on the device.

    test:~$sudo apt update
    test:~$sudo apt install snmp snmpd -y
    
  • Step-2: Configure the SNMP agent.

    test:~$sudo nano /etc/snmp/snmpd.conf
    agentAddress udp:161,udp:[::]:161  #Add or ensure the following line is present, Save and exit the file.
    
  • Step-3: Restart and enable the SNMP service.

    test:~$sudo systemctl restart snmpd
    test:~$sudo systemctl enable snmpd
    
  • Step-4: Send an SNMP GET request to retrieve the system name (sysName.0)

    test:~$snmpget -v2c -c public localhost 1.3.6.1.2.1.1.5.0
    iso.3.6.1.2.1.1.5.0 = STRING: "ubuntu"
    
  • Step-5: Capture the SNMP traffic using Wireshark during the request.

  • Expected result:

    • The SNMP agent responds with the correct value for the queried OID.

    • Wireshark captures:

      • An SNMP get-request packet from the manager to the agent.

      • An SNMP get-response packet from the agent containing the system name.

  • Step-6: Wireshark Capture.

    Download wireshark capture

SNMP SetRequest Test Case

  • To verify that the SNMP manager can succesfully update the value of a specific OID on the SNMP agent using an SNMP SET request, and confirm the change using a GET request.

  • Step-1: Configure SNMP agent for write access.Open the SNMP configuration file

    test:~$sudo nano /etc/snmp/snmpd.conf
    rwcommunity private  #Add the following line to allow write access. Save and exit the file.
    
  • Step-3: Restart and enable the SNMP service.

    test:~$sudo systemctl restart snmpd
    
  • Step-4: Perform SNMP SET Request.

    test:~$snmpset -v2c -c private localhost 1.3.6.1.2.1.1.5.0 s "NewsystemName"
    iso.3.6.1.2.1.1.5.0 = STRING: "NewsystemName"
    
  • Step-5: Verify the change with SNMP GET Request

    test:~$snmpget -v2c -c public localhost 1.3.6.1.2.1.1.5.0
    iso.3.6.1.2.1.1.5.0 = STRING: "NewsystemName"
    
  • Step-6: Capture and Analyze Packets in Wireshark.

  • Expected result:

    • SNMP SET request should succesfully update the system name to “NewsystemName”.

    • SNMP GET request should retrun the updated value.

  • Step-6: Wireshark Capture

    Download wireshark capture

SNMP WALK Request Test Case

  • To verify that the SNMP WALK operation retrieves a sequence of OIDs and their corresponding values from the SNMP agent, starting from a specified base OID. Also, confirm that the SNMP communication is correctly captured using wireshark.

  • Step-1: Run SNMP WALK command.

    test:~$snmpwalk -v2c -c public localhost 1.3.6.1.2.1.1
    iso.3.6.1.2.1.1.1.0 = STRING: "Linux kiran 6.11.0-26-generic #26~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Apr 17 19:20:47 UTC 2 x86_64"
    iso.3.6.1.2.1.1.2.0 = OID: iso.3.6.1.4.1.8072.3.2.10
    iso.3.6.1.2.1.1.3.0 = Timeticks: (15606841) 1 day, 19:21:08.41
    iso.3.6.1.2.1.1.4.0 = STRING: "Me <me@example.org>"
    iso.3.6.1.2.1.1.5.0 = STRING: "kiran"
    iso.3.6.1.2.1.1.6.0 = STRING: "Sitting on the Dock of the Bay"
    iso.3.6.1.2.1.1.7.0 = INTEGER: 72
    iso.3.6.1.2.1.1.8.0 = Timeticks: (0) 0:00:00.00
    iso.3.6.1.2.1.1.9.1.2.1 = OID: iso.3.6.1.6.3.10.3.1.1
    iso.3.6.1.2.1.1.9.1.2.2 = OID: iso.3.6.1.6.3.11.3.1.1
    iso.3.6.1.2.1.1.9.1.2.3 = OID: iso.3.6.1.6.3.15.2.1.1
    iso.3.6.1.2.1.1.9.1.2.4 = OID: iso.3.6.1.6.3.1
    iso.3.6.1.2.1.1.9.1.2.5 = OID: iso.3.6.1.6.3.16.2.2.1
    iso.3.6.1.2.1.1.9.1.2.6 = OID: iso.3.6.1.2.1.49
    iso.3.6.1.2.1.1.9.1.2.7 = OID: iso.3.6.1.2.1.50
    iso.3.6.1.2.1.1.9.1.2.8 = OID: iso.3.6.1.2.1.4
    iso.3.6.1.2.1.1.9.1.2.9 = OID: iso.3.6.1.6.3.13.3.1.3
    iso.3.6.1.2.1.1.9.1.2.10 = OID: iso.3.6.1.2.1.92
    iso.3.6.1.2.1.1.9.1.3.1 = STRING: "The SNMP Management Architecture MIB."
    iso.3.6.1.2.1.1.9.1.3.2 = STRING: "The MIB for Message Processing and Dispatching."
    iso.3.6.1.2.1.1.9.1.3.3 = STRING: "The management information definitions for the SNMP User-based Security Model."
    iso.3.6.1.2.1.1.9.1.3.4 = STRING: "The MIB module for SNMPv2 entities"
    iso.3.6.1.2.1.1.9.1.3.5 = STRING: "View-based Access Control Model for SNMP."
    iso.3.6.1.2.1.1.9.1.3.6 = STRING: "The MIB module for managing TCP implementations"
    iso.3.6.1.2.1.1.9.1.3.7 = STRING: "The MIB module for managing UDP implementations"
    iso.3.6.1.2.1.1.9.1.3.8 = STRING: "The MIB module for managing IP and ICMP implementations"
    iso.3.6.1.2.1.1.9.1.3.9 = STRING: "The MIB modules for managing SNMP Notification, plus filtering."
    iso.3.6.1.2.1.1.9.1.3.10 = STRING: "The MIB module for logging SNMP Notifications."
    iso.3.6.1.2.1.1.9.1.4.1 = Timeticks: (0) 0:00:00.00
    iso.3.6.1.2.1.1.9.1.4.2 = Timeticks: (0) 0:00:00.00
    iso.3.6.1.2.1.1.9.1.4.3 = Timeticks: (0) 0:00:00.00
    iso.3.6.1.2.1.1.9.1.4.4 = Timeticks: (0) 0:00:00.00
    iso.3.6.1.2.1.1.9.1.4.5 = Timeticks: (0) 0:00:00.00
    iso.3.6.1.2.1.1.9.1.4.6 = Timeticks: (0) 0:00:00.00
    iso.3.6.1.2.1.1.9.1.4.7 = Timeticks: (0) 0:00:00.00
    iso.3.6.1.2.1.1.9.1.4.8 = Timeticks: (0) 0:00:00.00
    iso.3.6.1.2.1.1.9.1.4.9 = Timeticks: (0) 0:00:00.00
    iso.3.6.1.2.1.1.9.1.4.10 = Timeticks: (0) 0:00:00.00
    
  • Step-2: Capture and Analyze in wireshark

  • Expected result:

    • A sequence of OIDs and their values should be returned, starting from the base OID and traversing through the MIB hierarchy in lexicographical order.

  • Step-3: Wireshark capture.

    Download wireshark capture

SNMP GetBulk Request Test Case

  • To verify that the SNMP GETBULK operation retrieves multiple OIDs and their corresponding values in a single request from the SNMP agent.

  • Step-1: Run SNMP GETBULK command.

    test:~$snmpbulkget -v2c -c public public -Cn0 -Cr10 localhost 1.3.6.1.2.1.1
    iso.3.6.1.2.1.1.1.0 = STRING: "Linux kiran 6.11.0-26-generic #26~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Apr 17 19:20:47 UTC 2 x86_64"
    iso.3.6.1.2.1.1.2.0 = OID: iso.3.6.1.4.1.8072.3.2.10
    iso.3.6.1.2.1.1.3.0 = Timeticks: (15715777) 1 day, 19:39:17.77
    iso.3.6.1.2.1.1.4.0 = STRING: "Me <me@example.org>"
    iso.3.6.1.2.1.1.5.0 = STRING: "kiran"
    iso.3.6.1.2.1.1.6.0 = STRING: "Sitting on the Dock of the Bay"
    iso.3.6.1.2.1.1.7.0 = INTEGER: 72
    iso.3.6.1.2.1.1.8.0 = Timeticks: (0) 0:00:00.00
    iso.3.6.1.2.1.1.9.1.2.1 = OID: iso.3.6.1.6.3.10.3.1.1
    iso.3.6.1.2.1.1.9.1.2.2 = OID: iso.3.6.1.6.3.11.3.1.1
    
  • Step-2: Capture and Analyze in wireshark

  • Expected result:

    • The response should contain multiple OIDs and their values in a single response, as specified by the max-repetitions parameter.

  • Step-3: Wireshark capture.

    Download wireshark capture

SNMP Community String Validation Test Case

  • To verify that the SNMP agent requests with valid community strings and rejects those with valid those with invalid community strings.

  • Step-1: Send SNMP GET request with valid community string.

    test:~$snmpget -v2c -c public localhost 1.3.6.1.2.1.1.5.0
    iso.3.6.1.2.1.1.5.0 = STRING: "ubuntu"
    
  • Step-2: Send SNMP GET request with invalid community string.

    test:~$snmpget -v2c -c wrong localhost 1.3.6.1.2.1.1.5.0
    Timeout: No Response from localhost.
    
  • Step-2: Capture and Analyze in wireshark

  • Expected result:

    • For Valid Community string, SNMP GET request should succeed.

    • For invalid Community string, SNMP GET request should be sent, but no response should be received from the agent.

  • Step-3: Wireshark capture.

    Download wireshark capture

SNMP Verison Compatibility Test Case

  • To verify that the SNMP agent supports and correctly responds to SNMP GET requests using different SNMP protocol versions:v1, v2c, v3.

  • Step-1: Run SNMPv1 GET Request command.

    test:~$snmpget -v1 -c public localhost 1.3.6.1.2.1.1.5.0
    iso.3.6.1.2.1.1.5.0 = STRING: "kiran"
    
  • Step-2: Run SNMPv2c GET Request command.

    test:~$snmpget -v2c -c public localhost 1.3.6.1.2.1.1.5.0
    iso.3.6.1.2.1.1.5.0 = STRING: "kiran"
    
  • Step-3: Configure SNMPv3 User: Edit the SNMP configuration

    test:~$sudo nano /etc/snmp/snmpd.conf
    # Add the following lines
    createUser myuser SHA myauthpass AES myprivpass
    rouser myuser authPriv
    
  • Step-4: Save and exit the file and restart SNMP service.

    test:~$sudo systemctl restart snmpd
    
  • Step-5: Run SNMPv3 GET Request Command.

    test:~$snmpget -v3 -u myuser -l authPriv -a SHA -A myauthpass -x AES -X myprivpass localhost 1.3.6.1.2.1.1.5.0
    iso.3.6.1.2.1.1.5.0 = STRING: "kiran"
    
  • Step-6: Capture and Analyze in wireshark

  • Expected result:

    • SNMPv1 get request and response should be visible.

    • SNMPv2c get request and response should be visible.

    • SNMPv3 get request and response should be visible but encrypted.

  • Step-7: Wireshark Capture

SNMP Response Time Test Case

  • To measure the response time of the SNMP agent for different SNMP operations (GET,WALK,GETBULK) and ensure that the agent responds within acceptable time limits.

  • Step-1: Measure SNMP GET Response Time.

    test:~$time snmpget -v2c -c public localhost 1.3.6.1.2.1.1.5.0
    iso.3.6.1.2.1.1.5.0 = STRING: "kiran"
    
    real   0m0.014s
    user   0m0.006s
    sys    0m0.007s
    
  • Step-2: Measure SNMP WALK Response Time.

    test:~$time snmpwalk -v2c -c public localhost 1.3.6.1.2.1.1
    iso.3.6.1.2.1.1.1.0 = STRING: "Linux kiran 6.11.0-26-generic #26~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Apr 17 19:20:47 UTC 2 x86_64"
    iso.3.6.1.2.1.1.2.0 = OID: iso.3.6.1.4.1.8072.3.2.10
    iso.3.6.1.2.1.1.3.0 = Timeticks: (16036207) 1 day, 20:32:42.07
    iso.3.6.1.2.1.1.4.0 = STRING: "Me <me@example.org>"
    iso.3.6.1.2.1.1.5.0 = STRING: "kiran"
    iso.3.6.1.2.1.1.6.0 = STRING: "Sitting on the Dock of the Bay"
    iso.3.6.1.2.1.1.7.0 = INTEGER: 72
    iso.3.6.1.2.1.1.8.0 = Timeticks: (0) 0:00:00.00
    iso.3.6.1.2.1.1.9.1.2.1 = OID: iso.3.6.1.6.3.10.3.1.1
    iso.3.6.1.2.1.1.9.1.2.2 = OID: iso.3.6.1.6.3.11.3.1.1
    iso.3.6.1.2.1.1.9.1.2.3 = OID: iso.3.6.1.6.3.15.2.1.1
    iso.3.6.1.2.1.1.9.1.2.4 = OID: iso.3.6.1.6.3.1
    iso.3.6.1.2.1.1.9.1.2.5 = OID: iso.3.6.1.6.3.16.2.2.1
    iso.3.6.1.2.1.1.9.1.2.6 = OID: iso.3.6.1.2.1.49
    iso.3.6.1.2.1.1.9.1.2.7 = OID: iso.3.6.1.2.1.50
    iso.3.6.1.2.1.1.9.1.2.8 = OID: iso.3.6.1.2.1.4
    iso.3.6.1.2.1.1.9.1.2.9 = OID: iso.3.6.1.6.3.13.3.1.3
    iso.3.6.1.2.1.1.9.1.2.10 = OID: iso.3.6.1.2.1.92
    iso.3.6.1.2.1.1.9.1.3.1 = STRING: "The SNMP Management Architecture MIB."
    iso.3.6.1.2.1.1.9.1.3.2 = STRING: "The MIB for Message Processing and Dispatching."
    iso.3.6.1.2.1.1.9.1.3.3 = STRING: "The management information definitions for the SNMP User-based Security Model."
    iso.3.6.1.2.1.1.9.1.3.4 = STRING: "The MIB module for SNMPv2 entities"
    iso.3.6.1.2.1.1.9.1.3.5 = STRING: "View-based Access Control Model for SNMP."
    iso.3.6.1.2.1.1.9.1.3.6 = STRING: "The MIB module for managing TCP implementations"
    iso.3.6.1.2.1.1.9.1.3.7 = STRING: "The MIB module for managing UDP implementations"
    iso.3.6.1.2.1.1.9.1.3.8 = STRING: "The MIB module for managing IP and ICMP implementations"
    iso.3.6.1.2.1.1.9.1.3.9 = STRING: "The MIB modules for managing SNMP Notification, plus filtering."
    iso.3.6.1.2.1.1.9.1.3.10 = STRING: "The MIB module for logging SNMP Notifications."
    iso.3.6.1.2.1.1.9.1.4.1 = Timeticks: (0) 0:00:00.00
    iso.3.6.1.2.1.1.9.1.4.2 = Timeticks: (0) 0:00:00.00
    iso.3.6.1.2.1.1.9.1.4.3 = Timeticks: (0) 0:00:00.00
    iso.3.6.1.2.1.1.9.1.4.4 = Timeticks: (0) 0:00:00.00
    iso.3.6.1.2.1.1.9.1.4.5 = Timeticks: (0) 0:00:00.00
    iso.3.6.1.2.1.1.9.1.4.6 = Timeticks: (0) 0:00:00.00
    iso.3.6.1.2.1.1.9.1.4.7 = Timeticks: (0) 0:00:00.00
    iso.3.6.1.2.1.1.9.1.4.8 = Timeticks: (0) 0:00:00.00
    iso.3.6.1.2.1.1.9.1.4.9 = Timeticks: (0) 0:00:00.00
    iso.3.6.1.2.1.1.9.1.4.10 = Timeticks: (0) 0:00:00.00
    
    real 0m0.016s
    user 0m0.006s
    sys  0m0.007s
    
  • Step-3: Measure SNMP GETBULK Response Time.

    test:~$time snmpbulkget -v2c -c public -Cn0 -Cr10 localhost 1.3.6.1.2.1.1
    iso.3.6.1.2.1.1.1.0 = STRING: "Linux kiran 6.11.0-26-generic #26~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Apr 17 19:20:47 UTC 2 x86_64"
    iso.3.6.1.2.1.1.2.0 = OID: iso.3.6.1.4.1.8072.3.2.10
    iso.3.6.1.2.1.1.3.0 = Timeticks: (16037504) 1 day, 20:32:55.04
    iso.3.6.1.2.1.1.4.0 = STRING: "Me <me@example.org>"
    iso.3.6.1.2.1.1.5.0 = STRING: "kiran"
    iso.3.6.1.2.1.1.6.0 = STRING: "Sitting on the Dock of the Bay"
    iso.3.6.1.2.1.1.7.0 = INTEGER: 72
    iso.3.6.1.2.1.1.8.0 = Timeticks: (0) 0:00:00.00
    iso.3.6.1.2.1.1.9.1.2.1 = OID: iso.3.6.1.6.3.10.3.1.1
    iso.3.6.1.2.1.1.9.1.2.2 = OID: iso.3.6.1.6.3.11.3.1.1
    
    real 0m0.016s
    user 0m0.006s
    sys  0m0.010s
    
  • Step-4: Capture and Analyze in wireshark

  • Expected result:

    • Each SNMP Operation should complete within acceptable limits (typically < 50ms in a LAN environment)

  • Step-5: Wireshark Capture

    Download wireshark capture

SNMP Authentication and Security Test Case(SNMPv3)

  • To verify that SNMPv3 security features, authentication and encryption are functioning correctly. This includes validating successful communication with correct credentials and rejection of requests with incorrect credentials.

  • Step-1: Configure SNMPv3 User: Edit the SNMP configuration

    test:~$sudo nano /etc/snmp/snmpd.conf
    # Add the following lines
    createUser myuser SHA myauthpass AES myprivpass
    rouser myuser authPriv
    
  • Step-2: Save and exit the file and restart SNMP service.

    test:~$sudo systemctl restart snmpd
    
  • Step-3: Send SNMPv3 GET Request with Correct Credentials.

    test:~$snmpget -v3 -u myuser -l authPriv -a SHA -A myauthpass -x AES -X myprivpass localhost 1.3.6.1.2.1.1.5.0
    iso.3.6.1.2.1.1.5.0 = STRING: "kiran"
    
  • Step-4: Send SNMPv3 GET Request with incorrect Credentials.

    test:~$snmpget -v3 -u myuser -l authPriv -a SHA -A myauthpass -x AES -X myprivpass12 localhost 1.3.6.1.2.1.1.5.0
    Timeout: No Response from localhost.
    
  • Step-4: Capture and Analyze in wireshark

  • Expected result:

    • Correct Credentials request and response should succeed.

    • Incorrect credentials request and response should not succeed.

  • Step-5: Wireshark Capture

    Download wireshark capture

SNMP Invalid Request Test Case

  • To verify that the SNMP agent correctly handles invalid or malformed SNMP requests (e.g., requests with non-existent OIDs), and responds with appropriate error messages without crashing or becoming unresponsive.

  • Step-1: Send SNMP GET Request with invalid OID.

    test:~$snmpget -v2c -c public localhost 1.3.6.1.2.1.1.10.0
    iso.3.6.1.2.1.1.10.0 = No Such Object available on this agent at this OID
    
  • Step-2: Capture and Analyze in wireshark

  • Expected result:

    • The SNMP agent should not crash or become unresponsive.

    • It should return a valid SNMP error response indicating the OID is invalid.

  • Step-3: Wireshark Capture

    Download wireshark capture

MIB Object Value Change Verification

  • To verify that changes made to a MIB object using an SNMP SET request are correctly reflected in subsequent SNMP GET responses.

  • Step-1: Perform SNMP SET Request.

    test:~$snmpset -v2c -c private localhost 1.3.6.1.2.1.1.5.0 s "vysh"
    iso.3.6.1.2.1.1.5.0 = STRING: "vysh"
    
  • Step-2: Verify the change with SNMP GET Request

    test:~$snmpget -v2c -c public localhost 1.3.6.1.2.1.1.5.0
    iso.3.6.1.2.1.1.5.0 = STRING: "vysh"
    
  • Step-3: Capture and Analyze Packets in Wireshark.

  • Expected result:

    • SNMP SET request should succesfully update the system name to “vysh”.

    • SNMP GET request should retrun the updated value.

  • Step-4: Wireshark Capture

    Download wireshark capture

SNMP Trap Test Case

  • To verify that SNMP traps are succesfully send from the SNMP agent abd received by the SNMP manager, including confirmation via logs and packet capture. SNMP traps are asynchronous notifications used to alert the manager about events such as errors or status changes.

  • Step-1: Configure SNMP Trap Daemon

    test:~$sudo nano /etc/snmp/snmptrapd.conf
    #Add the following line, save and exit
    authCommunity log,execute,net public
    
  • Step-2: Start SNMP Trap Daemon and run this in one terminal to listen for incoming traps.

    test:~$sudo snmptrapd -f -Lo
    
  • Step-3: Send SNMP Trap from Agent.

    test:~$snmptrap -v 2c -c public localhost '' .1.3.6.1.6.3.1.1.5.1 .1.3.6.1.2.1.1.0 s "Hello SNMP Trap"
    
  • Step-4: Expected ouput:

    test:~$sudo snmptrapd -f -Lo
    NET-SNMP version 5.9.4.pre2 AgentX subagent connected
    NET-SNMP version 5.9.4.pre2
    2025-07-25 10:22:02 localhost [UDP: [127.0.0.1]:42201->[127.0.0.1]:162]:
    .iso.3.6.1.2.1.1.3.0 = Timeticks: (144729284) 16 days, 18:01:32.84  .iso.3.6.1.6.3.1.1.4.1.0 = OID: .iso.3.6.1.6.3.1.1.5.1  .iso.3.6.1.2.1.1.0 = STRING: "Hello SNMP Trap"
    
  • Step-5: Verify Trap Reception.

    • Check the ouput of snmptrapd for the received trap.

    • Confirm that the trap includes:
      • Uptime, Trap OID, Custom message.

  • Step-6: Capture and Analyze Packets in Wireshark.

  • Expected result:

    • SNMP manager (snmptrapd) should log received vtrap with all expected fields.

  • Step-7: Wireshark Capture

    Download wireshark capture

  • Setup

GetRequest Packet

S.No

Protocol Packets

Description

Size(bytes)

1

GetRequest

This packet is used by the network management system to request the value of a specific variable from a managed device.

363

Version

SNMP version (e.g., SNMPv1, SNMPv2c, SNMPv3).

1

Community

Community string for authentication.

255

PDU Type

Indicates the type of PDU (Protocol Data Unit), here it is GetRequest.

1

Request ID

Unique identifier for the request.

4

Error Status

Indicates the error status (usually zero for GetRequest).

1

Error Index

Indicates the error index (usually zero for GetRequest).

1

Variable Bindings

A list of OIDs to retrieve values for.

variable(~50 Bytes)

GetNextRequest Packet

S.No

Protocol Packets

Description

Size(bytes)

2

GetNextRequest

This packet is used to retrieve the next variable in the sequence from a managed device. It is useful for walking through a list of variables.

363

Version

SNMP version.

1

Community

Community string for authentication.

255

PDU Type

Indicates the type of PDU, here it is GetNextRequest.

1

Request ID

Unique identifier for the request.

4

Error Status

Indicates the error status (usually zero for GetNextRequest)

1

Error Index

Indicates the error index (usually zero for GetNextRequest)

1

Variable Bindings

A lsit of current OIDs for which the next OIDs are requested.

variable(~50 Bytes)

GetBulkRequest Packet

S.No

Protocol Packets

Description

Size(bytes)

3

GetBulkRequest

Retrieve large amounts of data efficiently, such as table rows.

363

Version

SNMP version.

1

Community

Community string for authentication.

255

PDU Type

Indicates the type of PDU, here it is GetBulkRequest.

1

Request ID

Unique identifier for the request.

4

Non-repeaters

Number of non-repeater variables.

1

Max-repetitions

Maximum number of repetitions for repeating variables.

1

Variable Bindings

List of OIDs

variable(~50 Bytes)

SetRequest Packet

S.No

Protocol Packets

Description

Size(bytes)

4

SetRequest

Set the value of a variable(OID)on an snmp agent.

363

Version

SNMP version

1

Community

Community string for authentication.

255

PDU Type

Indicates the type of PDU, here it is SetRequest.

1

Request ID

Unique identifier for the request

4

Error Status

Indicates the error status (usually zero for SetRequest).

1

Error Index

Indicates the error index (usually zero for SetRequest).

1

Variable Bindings

List of OID-value pairs to set on the SNMP agent.

variable(~50 Bytes)

GetResponse Packet

S.No

Protocol Packets

Description

Size(bytes)

5

GetResponse

Respond to Get, Getnext, Getbulk, or Set requests.

363

Version

SNMP version

1

Community

Community string for authentication.

255

PDU Type

Indicates the type of PDU, here it is Response.

1

Request ID

Unique identifier for the request.

4

Error Status

Indicates the error status (zero for successful response).

1

Error Index

Indicates the error index (zero for successful response).

1

Variable Bindings

The actual OID-value pairs(or error indications).

variable(~50 Bytes)

Trap Packet(SNMPv1)

S.No

Protocol Packets

Description

Size(bytes)

6

Trap Packet(SNMPv1)

Asynchronous notification from agent to manager about an event.

387

Version

SNMP version

1

Community

Community string for authentication.

255

PDU Type

Indicates the type of PDU, here it is trap.

1

Enterprise

OID of the enterprise generating the trap.

~20

Agent Address

IP address of the agent.

4

Generic Trap Type

Type of trap (e.g., coldStart, warmStart).

1

Specific Trap Code

Specific code for the trap.

1

Timestamp

Time when the trap was generated.

4

Variable Bindings

Optional additional info

variable(~50 Bytes)

InformRequest Packet

S.No

Protocol Packets

Description

Size(bytes)

7

InformRequest Packet

Like a trap , but requires acknowledgement.

363

Version

SNMP version

1

Community

Community string for authentication.

255

PDU Type

Indicates the type of PDU, here it is InformRequest.

1

Request ID

Unique identifier for the request.

4

Error Status

Indicates the error status (usually zero for InformRequest).

1

Error Index

Indicates the error index (usually zero for InformRequest).

1

Variable Bindings

OID-value pairs describing the event.

variable(~50 Bytes)

SNMPv2-Trap Packet

S.No

Protocol Packets

Description

Size(bytes)

8

SNMPv2-Trap Packet

Asynchronous notification from agent to manager about an event.

363

Version

SNMP version

1

Community

Community string for authentication.

255

PDU Type

Indicates the type of PDU, here it is SNMPv2-Trap

1

Request ID

Unique identifier for the request.

4

Error Status

Indicates the error status (usually zero for SNMPv2-Trap).

1

Error Index

Indicates the error index (usually zero for SNMPv2-Trap).

1

Variable Bindings

Optional additional info

variable(~50 Bytes)

S.no

Use Case

Description

1

Network Device Monitoring

SNMP is used to monitor routers, switches, firewalls, and other devices for performance metrics like CPU, memory, and interface status.

2

Fault Detection and Alerts

SNMP traps and informs are used to notify administrators of faults or failures in real time (e.g., link down, high CPU).

3

Bandwidth Usage Tracking

SNMP collects interface statistics to analyze bandwidth usage and detect congestion or overutilization.

4

Configuration Management

SNMP SET operations allow remote configuration of network devices, such as enabling/disabling interfaces.

5

Inventory Management

SNMP can retrieve hardware and software details from devices, helping maintain an up-to-date asset inventory.

6

Environmental Monitoring

SNMP is used in data centers to monitor temperature, humidity, and power supply status via sensors.

7

Security Monitoring

SNMP can track login attempts, configuration changes, and other security-related events on network devices.

8

Service Level Monitoring

SNMP helps ensure that network services meet SLAs by tracking uptime, latency, and packet loss.

9

Automated Network Mapping

SNMP data is used by network management tools to automatically discover and map network topology.

10

Integration with NMS Tools

SNMP integrates with tools like Nagios, Zabbix, SolarWinds, and PRTG for centralized monitoring and alerting.

S.no

Feature

Description

1

Simple Protocol

SNMP uses a lightweight protocol structure, making it easy to implement and efficient for network communication.

2

Standardized Communication

SNMP provides a standardized way to monitor and manage devices from different vendors.

3

Agent-Manager Model

SNMP operates on a client-server model where agents (on devices) report to a central manager.

4

MIB (Management Information Base)

SNMP uses MIBs to define the structure of the data it can access and manage on devices.

5

Polling and Traps

Supports both polling (manager requests data) and traps (agent sends alerts) for flexible monitoring.

6

Scalability

SNMP can manage networks ranging from small LANs to large enterprise environments.

7

Cross-Platform Support

Works across a wide range of devices including routers, switches, servers, printers, and sensors.

8

Security (SNMPv3)

SNMPv3 adds authentication, encryption, and access control for secure communication.

9

Extensibility

New MIBs can be added to support emerging technologies and custom device features.

10

Low Overhead

SNMP messages are small and efficient, minimizing the impact on network performance.

Simple Protocol - Testcases

#

Test Case

Description

Expected Result

1

Send SNMP GET request

Retrieve value from agent

Response received

2

Send SNMP SET request

Modify value on agent

Value updated

3

Send SNMP GETNEXT request

Retrieve next OID

Next value returned

4

Send SNMP GETBULK request

Retrieve multiple OIDs

Bulk values returned

5

Use SNMPv1

Basic version

Request successful

6

Use SNMPv2c

Community-based version

Request successful

7

Use SNMPv3

Secure version

Request successful

8

Use SNMP with default port

Port 161

Communication successful

9

Use SNMP with custom port

Non-standard port

Communication successful

10

Use SNMP with UDP

Default transport

Request successful

11

Use SNMP with TCP

Alternative transport

Request successful

12

Use SNMP with IPv4

Standard IP

Request successful

13

Use SNMP with IPv6

Modern IP

Request successful

14

Use SNMP with valid community string

Correct string

Access granted

15

Use SNMP with invalid community string

Wrong string

Access denied

16

Use SNMP with read-only community

Attempt SET

Access denied

17

Use SNMP with read-write community

Attempt SET

Value updated

18

Use SNMP with MIB-II

Standard MIB

Data retrieved

19

Use SNMP with custom MIB

Vendor-specific

Data retrieved

20

Use SNMP with no MIB loaded

Raw OIDs

Data retrieved

21

Use SNMP with SNMPwalk

Walk OID tree

Data retrieved

22

Use SNMP with SNMPget

Single OID

Value retrieved

23

Use SNMP with SNMPset

Modify OID

Value updated

24

Use SNMP with SNMPtrap

Send trap to manager

Trap received

25

Use SNMP with SNMPinform

Confirmed trap

Acknowledgment received

26

Use SNMP with minimal configuration

Basic setup

Communication successful

27

Use SNMP with CLI tool

e.g., snmpget

Output displayed

28

Use SNMP with GUI tool

e.g., SNMPc

Data visualized

29

Use SNMP with Python script

pysnmp

Script runs successfully

30

Use SNMP with Perl script

Net::SNMP

Script runs successfully

31

Use SNMP with C application

Net-SNMP library

Communication successful

32

Use SNMP with Java application

SNMP4J

Communication successful

33

Use SNMP with SNMP agent simulator

Simulated device

Data retrieved

34

Use SNMP with real network device

Switch/router

Data retrieved

35

Use SNMP with firewall enabled

Port 161 open

Communication successful

36

Use SNMP with firewall blocked

Port 161 closed

Communication fails

37

Use SNMP with SNMPv3 auth only

No privacy

Authenticated access

38

Use SNMP with SNMPv3 auth + priv

Encrypted access

Secure communication

39

Use SNMP with SNMPv3 noAuthNoPriv

No security

Communication successful

40

Use SNMP with invalid OID

Nonexistent OID

Error returned

41

Use SNMP with valid OID

Existing OID

Value retrieved

42

Use SNMP with high latency

Slow network

Response delayed

43

Use SNMP with packet loss

Unreliable network

Retries triggered

44

Use SNMP with retry mechanism

Timeout occurred

Retry sent

45

Use SNMP with timeout setting

Short timeout

Request may fail

46

Use SNMP with logging enabled

Monitor traffic

Logs recorded

47

Use SNMP with SNMP proxy

Forward requests

Data retrieved

48

Use SNMP with SNMP relay

Forward traps

Trap forwarded

49

Use SNMP with SNMP manager

Central monitoring

Data collected

50

Use SNMP with SNMP agent

Device endpoint

Data served

Standardized Communication - Testcases

#

Test Case

Description

Expected Result

1

Query Cisco router

Use SNMP GET

Standard OID values returned

2

Query Juniper switch

Use SNMP GET

Standard OID values returned

3

Query HP printer

Use SNMP GET

Standard OID values returned

4

Query Dell server

Use SNMP GET

Standard OID values returned

5

Query Netgear firewall

Use SNMP GET

Standard OID values returned

6

Query Ubiquiti AP

Use SNMP GET

Standard OID values returned

7

Query Mikrotik router

Use SNMP GET

Standard OID values returned

8

Query Fortinet firewall

Use SNMP GET

Standard OID values returned

9

Query Windows server

Use SNMP GET

Standard OID values returned

10

Query Linux server

Use SNMP GET

Standard OID values returned

11

Query VMware ESXi host

Use SNMP GET

Standard OID values returned

12

Query Synology NAS

Use SNMP GET

Standard OID values returned

13

Query APC UPS

Use SNMP GET

Standard OID values returned

14

Query Aruba switch

Use SNMP GET

Standard OID values returned

15

Query Palo Alto firewall

Use SNMP GET

Standard OID values returned

16

Query Huawei switch

Use SNMP GET

Standard OID values returned

17

Query device using MIB-II

Use standard MIB

Data retrieved

18

Query device using IF-MIB

Interface stats

Data retrieved

19

Query device using HOST-RESOURCES-MIB

System info

Data retrieved

20

Query device using SNMPv1

Legacy support

Data retrieved

21

Query device using SNMPv2c

Community-based

Data retrieved

22

Query device using SNMPv3

Secure communication

Data retrieved

23

Use SNMP manager with multi-vendor support

Centralized monitoring

All devices queried

24

Use SNMP with Net-SNMP tools

Cross-platform

Data retrieved

25

Use SNMP with SolarWinds

Vendor-agnostic

Data retrieved

26

Use SNMP with PRTG

Multi-vendor monitoring

Data retrieved

27

Use SNMP with Zabbix

Open-source monitoring

Data retrieved

28

Use SNMP with Nagios

Plugin-based monitoring

Data retrieved

29

Use SNMP with LibreNMS

Auto-discovery

Multi-vendor support

30

Use SNMP with OpenNMS

Enterprise-grade

Multi-vendor support

31

Use SNMP with Python (pysnmp)

Scripted access

Data retrieved

32

Use SNMP with Java (SNMP4J)

Cross-platform

Data retrieved

33

Use SNMP with C (Net-SNMP)

Native access

Data retrieved

34

Use SNMP with Perl (Net::SNMP)

Legacy scripting

Data retrieved

35

Use SNMP with SNMPwalk

Traverse OID tree

Data retrieved

36

Use SNMP with SNMPget

Single OID

Data retrieved

37

Use SNMP with SNMPset

Modify value

Value updated

38

Use SNMP with SNMPtrap

Receive alert

Trap received

39

Use SNMP with SNMPinform

Confirmed trap

Acknowledgment received

40

Use SNMP with IPv4

Standard protocol

Data retrieved

41

Use SNMP with IPv6

Modern networks

Data retrieved

42

Use SNMP with UDP transport

Default protocol

Data retrieved

43

Use SNMP with TCP transport

Alternative protocol

Data retrieved

44

Use SNMP with standard OIDs

RFC-compliant

Data retrieved

45

Use SNMP with vendor-specific OIDs

Extended support

Data retrieved

46

Use SNMP with MIB browser

Visualize OIDs

Data retrieved

47

Use SNMP with SNMP proxy

Forward requests

Data retrieved

48

Use SNMP with SNMP relay

Forward traps

Trap forwarded

49

Use SNMP with centralized NMS

Unified monitoring

All devices visible

50

Use SNMP with device auto-discovery

Multi-vendor scan

Devices identified

Agent-Manager Model - Testcases

#

Test Case

Description

Expected Result

1

Start SNMP agent on device

Agent service enabled

Agent listens on port 161

2

Start SNMP manager

Manager service enabled

Ready to send/receive SNMP messages

3

Agent responds to SNMP GET

Manager queries OID

Agent returns value

4

Agent responds to SNMP SET

Manager modifies OID

Agent updates value

5

Agent sends SNMP trap

Event triggered

Manager receives trap

6

Agent sends SNMP inform

Confirmed trap

Manager acknowledges

7

Manager polls agent periodically

Scheduled GETs

Data collected

8

Manager performs SNMP walk

Traverse MIB tree

Agent responds with values

9

Manager receives trap from multiple agents

Multi-device monitoring

All traps logged

10

Agent supports SNMPv1

Legacy protocol

Manager communicates successfully

11

Agent supports SNMPv2c

Community-based

Manager communicates successfully

12

Agent supports SNMPv3

Secure protocol

Manager communicates securely

13

Agent with read-only access

Manager attempts SET

Access denied

14

Agent with read-write access

Manager performs SET

Value updated

15

Agent with invalid community string

Manager attempts GET

Access denied

16

Agent with valid community string

Manager attempts GET

Access granted

17

Agent with authentication failure

SNMPv3 auth fails

Access denied

18

Agent with encryption enabled

SNMPv3 priv mode

Secure communication

19

Agent with encryption disabled

SNMPv3 noPriv

Communication successful

20

Agent with MIB-II support

Standard OIDs

Manager retrieves data

21

Agent with custom MIB

Vendor-specific OIDs

Manager retrieves data

22

Agent with high CPU load

Performance stress

Manager still receives data

23

Agent with network delay

Latency present

Manager receives delayed response

24

Agent with packet loss

Unreliable network

Manager retries request

25

Agent with firewall blocking SNMP

Port 161 closed

Manager cannot connect

26

Agent with firewall open

Port 161 open

Manager connects successfully

27

Agent with SNMP proxy

Forwarded requests

Manager receives data

28

Agent with SNMP relay

Trap forwarding

Manager receives trap

29

Agent with logging enabled

Monitor SNMP activity

Logs recorded

30

Agent with SNMP monitoring tool

e.g., SNMPc

Data visualized

31

Agent on router

Network device

Manager retrieves interface stats

32

Agent on switch

Layer 2 device

Manager retrieves port status

33

Agent on server

Host system

Manager retrieves CPU/memory usage

34

Agent on printer

Peripheral device

Manager retrieves status

35

Agent on UPS

Power device

Manager retrieves battery status

36

Agent on NAS

Storage device

Manager retrieves disk usage

37

Agent on firewall

Security device

Manager retrieves rule stats

38

Agent on virtual machine

VM guest

Manager retrieves system info

39

Agent on container

Docker/LXC

Manager retrieves metrics

40

Agent on IoT device

Embedded system

Manager retrieves sensor data

41

Agent on mobile device

Smartphone/tablet

Manager retrieves SNMP data

42

Agent on Windows

SNMP service enabled

Manager retrieves system info

43

Agent on Linux

SNMP daemon running

Manager retrieves system info

44

Agent on macOS

SNMP enabled

Manager retrieves system info

45

Agent with SNMPv3 user config

Auth/priv set

Manager authenticates

46

Agent with SNMPv3 user mismatch

Wrong credentials

Access denied

47

Agent with trap destination config

Manager IP set

Traps sent to correct manager

48

Agent with multiple managers

Redundant monitoring

Traps sent to all managers

49

Agent with SNMP polling threshold

CPU > 90%

Trap sent to manager

50

Agent with SNMP event log

Event triggered

Manager logs event

MIB (Management Information Base) - Testcases

#

Test Case

Description

Expected Result

1

Load standard MIB-II

Use default MIB

MIB loaded successfully

2

Load custom vendor MIB

Proprietary device

MIB loaded successfully

3

Load multiple MIBs

Combine standard and custom

All MIBs loaded

4

Load MIB with dependencies

Import required MIBs

All dependencies resolved

5

Load MIB with syntax error

Invalid format

Error displayed

6

Load MIB with missing OID

Incomplete definition

Warning or error

7

Load MIB with duplicate OID

Conflict detected

Error or override

8

Parse MIB with SNMP tool

Use snmptranslate

OID translated

9

Parse MIB with GUI tool

Use MIB browser

Tree displayed

10

Parse MIB with CLI tool

Use snmpwalk

OIDs resolved

11

Query OID from MIB-II

Standard system info

Value retrieved

12

Query OID from IF-MIB

Interface stats

Value retrieved

13

Query OID from HOST-RESOURCES-MIB

CPU/memory info

Value retrieved

14

Query OID from custom MIB

Vendor-specific

Value retrieved

15

Query OID with full name

Use symbolic name

Value retrieved

16

Query OID with numeric ID

Use dotted format

Value retrieved

17

Query OID with invalid name

Nonexistent symbol

Error returned

18

Query OID with invalid ID

Nonexistent OID

Error returned

19

Walk MIB tree

Traverse from root

All OIDs listed

20

Walk subtree

Start from specific OID

Subtree listed

21

Set value using MIB

Writable OID

Value updated

22

Set value on read-only OID

Attempt write

Access denied

23

Trap using MIB-defined OID

Event triggered

Trap sent

24

Inform using MIB-defined OID

Confirmed trap

Inform acknowledged

25

Use MIB with SNMPv1

Legacy support

OIDs resolved

26

Use MIB with SNMPv2c

Community-based

OIDs resolved

27

Use MIB with SNMPv3

Secure protocol

OIDs resolved

28

Use MIB with SNMP proxy

Forwarded request

OID resolved

29

Use MIB with SNMP relay

Trap forwarded

OID resolved

30

Use MIB with SNMP manager

Central monitoring

OIDs interpreted

31

Use MIB with SNMP agent

Device endpoint

OIDs served

32

Use MIB with SNMP simulator

Simulated device

OIDs served

33

Use MIB with SNMP monitoring tool

e.g., PRTG

OIDs visualized

34

Use MIB with SNMP alerting tool

e.g., Zabbix

OIDs monitored

35

Use MIB with SNMP logging

Log OID access

Logs recorded

36

Use MIB with SNMP audit

Track changes

Logs recorded

37

Use MIB with SNMP security

SNMPv3 auth/priv

OIDs accessed securely

38

Use MIB with IPv4

Standard transport

OIDs resolved

39

Use MIB with IPv6

Modern transport

OIDs resolved

40

Use MIB with UDP

Default protocol

OIDs resolved

41

Use MIB with TCP

Alternative protocol

OIDs resolved

42

Use MIB with SNMPwalk timeout

Long tree

Timeout handled

43

Use MIB with SNMPwalk retry

Packet loss

Retry successful

44

Use MIB with SNMPgetbulk

Efficient retrieval

Multiple OIDs returned

45

Use MIB with SNMPgetnext

Sequential access

Next OID returned

46

Use MIB with SNMPset validation

Type check

Value accepted or rejected

47

Use MIB with SNMP manager auto-discovery

Scan network

MIB-based OIDs retrieved

48

Use MIB with device firmware update

New MIB version

OIDs updated

49

Use MIB with device reboot

Agent restarts

MIBs reloaded

50

Use MIB with SNMPv3 user roles

Access control

OID access restricted

Polling and Traps - Testcases

#

Test Case

Description

Expected Result

1

Perform SNMP polling with GET

Manager requests OID

Value retrieved

2

Perform SNMP polling with GETNEXT

Manager requests next OID

Next value retrieved

3

Perform SNMP polling with GETBULK

Manager requests multiple OIDs

Bulk values retrieved

4

Perform SNMP polling with SNMPwalk

Traverse MIB tree

All values retrieved

5

Perform SNMP polling with timeout

Agent delay

Retry or failure

6

Perform SNMP polling with retries

Packet loss

Retry successful

7

Perform SNMP polling with invalid OID

Nonexistent OID

Error returned

8

Perform SNMP polling with read-only access

Attempt SET

Access denied

9

Perform SNMP polling with read-write access

Modify value

Value updated

10

Perform SNMP polling with SNMPv1

Legacy protocol

Polling successful

11

Perform SNMP polling with SNMPv2c

Community-based

Polling successful

12

Perform SNMP polling with SNMPv3

Secure protocol

Polling successful

13

Perform SNMP polling with high frequency

Every second

Data retrieved

14

Perform SNMP polling with low frequency

Every hour

Data retrieved

15

Perform SNMP polling with multiple agents

Multi-device monitoring

Data retrieved from all

16

Perform SNMP polling with manager tool

e.g., PRTG

Data visualized

17

Perform SNMP polling with CLI tool

e.g., snmpget

Data displayed

18

Perform SNMP polling with GUI tool

e.g., SNMPc

Data visualized

19

Configure SNMP trap on agent

Event-based alert

Trap sent to manager

20

Receive SNMP trap on manager

Trap listener active

Trap received

21

Configure SNMP inform on agent

Confirmed alert

Inform acknowledged

22

Receive SNMP inform on manager

Inform listener active

Inform received

23

Send SNMP trap with valid OID

Event triggered

Trap received

24

Send SNMP trap with invalid OID

Malformed trap

Error or ignored

25

Send SNMP trap with SNMPv1

Legacy trap

Trap received

26

Send SNMP trap with SNMPv2c

Community-based

Trap received

27

Send SNMP trap with SNMPv3

Secure trap

Trap received

28

Send SNMP trap with authentication

SNMPv3 auth

Trap verified

29

Send SNMP trap with encryption

SNMPv3 priv

Trap secured

30

Send SNMP trap with noAuthNoPriv

SNMPv3 open

Trap received

31

Send SNMP trap with firewall open

Port 162 open

Trap received

32

Send SNMP trap with firewall blocked

Port 162 closed

Trap dropped

33

Send SNMP trap with trap destination configured

Manager IP set

Trap received

34

Send SNMP trap with multiple destinations

Redundant managers

Trap received by all

35

Send SNMP trap with event threshold

CPU > 90%

Trap triggered

36

Send SNMP trap with link down

Interface failure

Trap triggered

37

Send SNMP trap with temperature alert

Overheat

Trap triggered

38

Send SNMP trap with power failure

UPS alert

Trap triggered

39

Send SNMP trap with disk full

Storage alert

Trap triggered

40

Send SNMP trap with custom MIB

Vendor-specific OID

Trap received

41

Send SNMP trap with standard MIB

RFC-compliant OID

Trap received

42

Send SNMP trap with SNMP relay

Forwarded trap

Trap received

43

Send SNMP trap with SNMP proxy

Forwarded trap

Trap received

44

Send SNMP trap with logging enabled

Monitor trap activity

Logs recorded

45

Send SNMP trap with audit logging

Compliance tracking

Logs recorded

46

Send SNMP trap with SNMP manager tool

e.g., Zabbix

Trap visualized

47

Send SNMP trap with CLI tool

e.g., snmptrap

Trap sent

48

Send SNMP trap with GUI tool

e.g., Trap Receiver

Trap visualized

49

Send SNMP trap with SNMP simulator

Simulated device

Trap sent

50

Send SNMP trap with real device

Router/switch

Trap sent and received

Scalability - Testcases

#

Test Case

Description

Expected Result

1

Query Cisco router

Network device

SNMP data retrieved

2

Query Juniper switch

Network device

SNMP data retrieved

3

Query HP printer

Peripheral device

SNMP data retrieved

4

Query Dell server

Enterprise hardware

SNMP data retrieved

5

Query Netgear firewall

Security appliance

SNMP data retrieved

6

Query Ubiquiti AP

Wireless device

SNMP data retrieved

7

Query MikroTik router

Network device

SNMP data retrieved

8

Query Fortinet firewall

Security appliance

SNMP data retrieved

9

Query Windows Server

OS-level SNMP agent

SNMP data retrieved

10

Query Linux server

SNMP daemon running

SNMP data retrieved

11

Query macOS system

SNMP enabled

SNMP data retrieved

12

Query FreeBSD system

SNMP daemon

SNMP data retrieved

13

Query Solaris system

SNMP agent

SNMP data retrieved

14

Query AIX system

IBM platform

SNMP data retrieved

15

Query Raspberry Pi

Lightweight Linux

SNMP data retrieved

16

Query Android device

Mobile OS

SNMP data retrieved (if supported)

17

Query iOS device

Mobile OS

SNMP data retrieved (if supported)

18

Query VMware ESXi host

Virtualization platform

SNMP data retrieved

19

Query Hyper-V host

Microsoft hypervisor

SNMP data retrieved

20

Query VirtualBox VM

Guest OS SNMP

SNMP data retrieved

21

Query Docker container

SNMP agent inside container

SNMP data retrieved

22

Query Kubernetes pod

SNMP-enabled pod

SNMP data retrieved

23

Query AWS EC2 instance

Cloud VM

SNMP data retrieved

24

Query Azure VM

Cloud VM

SNMP data retrieved

25

Query Google Cloud VM

Cloud VM

SNMP data retrieved

26

Query smart TV

IoT device

SNMP data retrieved

27

Query smart thermostat

IoT device

SNMP data retrieved

28

Query smart speaker

IoT device

SNMP data retrieved

29

Query smart camera

Surveillance device

SNMP data retrieved

30

Query smart meter

Utility device

SNMP data retrieved

31

Query IP phone

VoIP device

SNMP data retrieved

32

Query NAS device

Storage system

SNMP data retrieved

33

Query UPS

Power backup system

SNMP data retrieved

34

Query industrial PLC

Automation controller

SNMP data retrieved

35

Query SCADA system

Industrial control

SNMP data retrieved

36

Query ATM

Banking terminal

SNMP data retrieved

37

Query POS terminal

Retail system

SNMP data retrieved

38

Query satellite modem

Remote comms

SNMP data retrieved

39

Query drone controller

Embedded system

SNMP data retrieved

40

Query game console

Xbox/PlayStation

SNMP data retrieved (if supported)

41

Query smart fridge

IoT appliance

SNMP data retrieved

42

Query smart watch

Wearable device

SNMP data retrieved (if supported)

43

Query e-reader

Kindle or similar

SNMP data retrieved (if supported)

44

Query smart display

Google Nest, Echo Show

SNMP data retrieved

45

Query firewall appliance

Security device

SNMP data retrieved

46

Query load balancer

Network appliance

SNMP data retrieved

47

Query printer with SNMPv1

Legacy support

SNMP data retrieved

48

Query switch with SNMPv2c

Community-based

SNMP data retrieved

49

Query server with SNMPv3

Secure protocol

SNMP data retrieved

50

Query device with custom MIB

Vendor-specific

SNMP data retrieved

Cross-Platform Support - Testcases

#

Test Case

Description

Expected Result

1

Monitor 1 device

Small network

SNMP works correctly

2

Monitor 10 devices

Small LAN

SNMP scales appropriately

3

Monitor 100 devices

Medium network

SNMP performs efficiently

4

Monitor 1,000 devices

Large enterprise

SNMP handles load

5

Monitor 10,000 devices

Very large network

SNMP remains functional

6

Poll 1 device every 5 minutes

Low frequency

Minimal load

7

Poll 100 devices every minute

Moderate frequency

Acceptable performance

8

Poll 1,000 devices every 30 seconds

High frequency

SNMP scales with load

9

Receive traps from 10 devices

Low volume

All traps received

10

Receive traps from 1,000 devices

High volume

No loss of traps

11

Use SNMPv2c for large-scale polling

Efficient protocol

Performance optimized

12

Use SNMPv3 for secure large-scale polling

Secure and scalable

Performance acceptable

13

Use SNMP GETBULK for efficiency

Bulk retrieval

Reduced network load

14

Use SNMPwalk on 100 devices

Tree traversal

All data retrieved

15

Use SNMP manager with multi-threading

Parallel polling

Improved performance

16

Use SNMP manager with load balancing

Distribute polling

Balanced resource usage

17

Use SNMP manager with polling scheduler

Staggered polling

Avoids spikes

18

Use SNMP manager with trap filtering

High trap volume

Only relevant traps processed

19

Use SNMP proxy for remote sites

Centralized management

Efficient communication

20

Use SNMP relay for trap forwarding

Large-scale alerting

Traps forwarded correctly

21

Use SNMP with cloud-based manager

Scalable infrastructure

Handles large networks

22

Use SNMP with on-premise manager

Local deployment

Handles enterprise scale

23

Use SNMP with distributed agents

Across locations

Centralized monitoring

24

Use SNMP with redundant managers

High availability

No data loss

25

Use SNMP with failover support

Manager failure

Backup takes over

26

Use SNMP with hierarchical polling

Tiered architecture

Efficient scaling

27

Use SNMP with polling groups

Device segmentation

Organized monitoring

28

Use SNMP with device auto-discovery

Dynamic networks

Devices added automatically

29

Use SNMP with dynamic MIB loading

Large MIB sets

Efficient memory usage

30

Use SNMP with event correlation

Trap analysis

Scalable alerting

31

Use SNMP with high CPU load on manager

Stress test

SNMP remains responsive

32

Use SNMP with high memory usage

Resource stress

SNMP remains stable

33

Use SNMP with high network latency

Remote sites

SNMP adapts

34

Use SNMP with packet loss

Unreliable links

Retries succeed

35

Use SNMP with multiple polling intervals

Mixed frequencies

SNMP handles scheduling

36

Use SNMP with multiple trap receivers

Redundant alerting

All traps received

37

Use SNMP with centralized logging

Large-scale logging

Logs maintained

38

Use SNMP with audit logging

Compliance at scale

Logs recorded

39

Use SNMP with SNMPv3 user roles

Access control

Scales with users

40

Use SNMP with IPv6

Modern networks

Scales with address space

41

Use SNMP with IPv4

Legacy networks

Scales with subnetting

42

Use SNMP with VLANs

Segmented networks

SNMP monitors all segments

43

Use SNMP with VPNs

Secure remote access

SNMP works across tunnels

44

Use SNMP with firewalls

Port 161/162 open

SNMP scales securely

45

Use SNMP with cloud VMs

Elastic infrastructure

SNMP adapts to changes

46

Use SNMP with containers

Microservices

SNMP monitors all instances

47

Use SNMP with mobile devices

BYOD environments

SNMP scales to endpoints

48

Use SNMP with IoT devices

High device count

SNMP remains efficient

49

Use SNMP with hybrid networks

Cloud + on-prem

Unified monitoring

50

Use SNMP with monitoring dashboards

Visualize large networks

Data displayed accurately

Security (SNMPv3) - Testcases

#

Test Case

Description

Expected Result

1

Configure SNMPv3 user

Create user with auth and priv

User created successfully

2

Use SNMPv3 with noAuthNoPriv

No security

Communication succeeds

3

Use SNMPv3 with authNoPriv

Authentication only

Communication succeeds

4

Use SNMPv3 with authPriv

Authentication + encryption

Communication succeeds

5

Use SNMPv3 with MD5 auth

Message integrity

Authenticated successfully

6

Use SNMPv3 with SHA auth

Stronger integrity

Authenticated successfully

7

Use SNMPv3 with DES encryption

Basic privacy

Encrypted communication

8

Use SNMPv3 with AES encryption

Stronger privacy

Encrypted communication

9

Use SNMPv3 with invalid username

Unknown user

Access denied

10

Use SNMPv3 with invalid auth key

Wrong password

Authentication fails

11

Use SNMPv3 with invalid priv key

Wrong encryption key

Decryption fails

12

Use SNMPv3 with correct credentials

Valid user

Access granted

13

Use SNMPv3 with user-based access control

Role-based access

Access enforced

14

Use SNMPv3 with read-only user

Attempt SET

Access denied

15

Use SNMPv3 with read-write user

Perform SET

Value updated

16

Use SNMPv3 with view-based access

Limited OID access

Access enforced

17

Use SNMPv3 with full access

All OIDs accessible

Access granted

18

Use SNMPv3 with trap authentication

Secure trap

Trap verified

19

Use SNMPv3 with inform authentication

Secure inform

Inform verified

20

Use SNMPv3 with trap encryption

Encrypted trap

Trap received securely

21

Use SNMPv3 with inform encryption

Encrypted inform

Inform received securely

22

Use SNMPv3 with firewall open

Port 161/162 open

Communication succeeds

23

Use SNMPv3 with firewall blocked

Port 161/162 closed

Communication fails

24

Use SNMPv3 with IPv4

Secure over IPv4

Communication succeeds

25

Use SNMPv3 with IPv6

Secure over IPv6

Communication succeeds

26

Use SNMPv3 with UDP

Default transport

Secure communication

27

Use SNMPv3 with TCP

Alternative transport

Secure communication

28

Use SNMPv3 with packet sniffing

Encrypted traffic

Data unreadable

29

Use SNMPv3 with replay attack

Reused packet

Rejected

30

Use SNMPv3 with brute-force attempt

Password guessing

Access denied

31

Use SNMPv3 with logging enabled

Monitor access

Logs recorded

32

Use SNMPv3 with audit logging

Compliance tracking

Logs recorded

33

Use SNMPv3 with SNMP manager

Secure polling

Data retrieved

34

Use SNMPv3 with SNMP agent

Secure endpoint

Data served

35

Use SNMPv3 with SNMPwalk

Secure MIB traversal

Data retrieved

36

Use SNMPv3 with SNMPget

Secure single OID

Value retrieved

37

Use SNMPv3 with SNMPset

Secure value update

Value updated

38

Use SNMPv3 with SNMPtrap

Secure alert

Trap received

39

Use SNMPv3 with SNMPinform

Secure alert with ack

Inform received

40

Use SNMPv3 with multiple users

Multi-user access

Roles enforced

41

Use SNMPv3 with user deletion

Remove user

Access revoked

42

Use SNMPv3 with user update

Change password

New credentials required

43

Use SNMPv3 with access control list

Restrict IPs

Unauthorized IPs blocked

44

Use SNMPv3 with centralized authentication

External auth system

Access managed

45

Use SNMPv3 with device reboot

Persistent config

Security settings retained

46

Use SNMPv3 with config backup

Export settings

Security config saved

47

Use SNMPv3 with config restore

Import settings

Security config restored

48

Use SNMPv3 with monitoring tool

e.g., Zabbix, PRTG

Secure integration

49

Use SNMPv3 with CLI tool

e.g., snmpget

Secure command-line access

50

Use SNMPv3 with GUI tool

e.g., SNMPc

Secure visual access

Extensibility - Testcases

#

Test Case

Description

Expected Result

1

Load new vendor MIB

Add custom MIB file

MIB loaded successfully

2

Load updated MIB version

Replace old MIB

New definitions available

3

Load MIB with new OIDs

Add new metrics

OIDs accessible

4

Load MIB with custom traps

Define new alerts

Traps recognized

5

Load MIB with new table structure

Add tabular data

Table accessible

6

Load MIB with new scalar values

Add single-value OIDs

Scalars accessible

7

Load MIB with new syntax types

Add custom data types

Types parsed correctly

8

Load MIB with new enums

Add status codes

Values interpreted

9

Load MIB with new notifications

Add event types

Notifications received

10

Load MIB with new compliance modules

Define device capabilities

Compliance validated

11

Load MIB with new object groups

Group related OIDs

Group accessible

12

Load MIB with new textual conventions

Define custom formats

Formats parsed

13

Load MIB with new identity definitions

Add new identities

Recognized by manager

14

Load MIB with new module identity

Define new module

Module registered

15

Load MIB with new imports

Reference other MIBs

Dependencies resolved

16

Load MIB with new macros

Define reusable structures

Macros expanded

17

Load MIB with new trap destinations

Add alert targets

Traps routed correctly

18

Load MIB with new access levels

Define read/write access

Access enforced

19

Load MIB with new security models

SNMPv3 integration

Security applied

20

Load MIB with new device types

IoT/edge devices

MIB supports new hardware

21

Load MIB for smart sensors

Add temperature/humidity OIDs

Data accessible

22

Load MIB for smart meters

Add energy usage OIDs

Data accessible

23

Load MIB for smart cameras

Add video stream stats

Data accessible

24

Load MIB for smart lighting

Add brightness/power OIDs

Data accessible

25

Load MIB for industrial PLCs

Add automation metrics

Data accessible

26

Load MIB for SCADA systems

Add control system OIDs

Data accessible

27

Load MIB for cloud infrastructure

Add VM/container metrics

Data accessible

28

Load MIB for Kubernetes

Add pod/node metrics

Data accessible

29

Load MIB for 5G equipment

Add radio metrics

Data accessible

30

Load MIB for satellite modems

Add signal metrics

Data accessible

31

Load MIB for automotive systems

Add vehicle telemetry

Data accessible

32

Load MIB for medical devices

Add patient monitoring OIDs

Data accessible

33

Load MIB for smart home hubs

Add automation metrics

Data accessible

34

Load MIB for wearable devices

Add health metrics

Data accessible

35

Load MIB for AI accelerators

Add GPU/TPU metrics

Data accessible

36

Load MIB for blockchain nodes

Add consensus metrics

Data accessible

37

Load MIB for quantum computers

Add qubit status OIDs

Data accessible

38

Load MIB for drones

Add flight telemetry

Data accessible

39

Load MIB for robotics

Add actuator/sensor data

Data accessible

40

Load MIB for environmental sensors

Add air/water quality OIDs

Data accessible

41

Load MIB for energy storage systems

Add battery metrics

Data accessible

42

Load MIB for EV charging stations

Add power delivery stats

Data accessible

43

Load MIB for edge gateways

Add traffic/processing stats

Data accessible

44

Load MIB for smart grid devices

Add load balancing metrics

Data accessible

45

Load MIB for smart agriculture

Add soil/moisture metrics

Data accessible

46

Load MIB for logistics trackers

Add GPS/location OIDs

Data accessible

47

Load MIB for retail kiosks

Add transaction metrics

Data accessible

48

Load MIB for POS terminals

Add sales/device health

Data accessible

49

Load MIB for legacy systems

Add backward-compatible OIDs

Data accessible

50

Load MIB for experimental devices

Add test metrics

Data accessible

Low Overhead - Testcases

#

Test Case

Description

Expected Result

1

Send SNMP GET request

Single OID query

Minimal bandwidth used

2

Send SNMP GETNEXT request

Retrieve next OID

Small message size

3

Send SNMP GETBULK request

Retrieve multiple OIDs

Efficient data transfer

4

Send SNMP SET request

Update one value

Minimal data sent

5

Receive SNMP trap

Event notification

Lightweight alert

6

Receive SNMP inform

Confirmed alert

Small message size

7

Poll 1 device every 5 minutes

Low frequency

Negligible network impact

8

Poll 100 devices every minute

Moderate frequency

Network remains stable

9

Poll 1,000 devices every 30 seconds

High frequency

Acceptable overhead

10

Use SNMPv1

Basic protocol

Smallest message size

11

Use SNMPv2c

Community-based

Efficient communication

12

Use SNMPv3

Secure protocol

Slightly larger, still efficient

13

Use SNMP over UDP

Default transport

Low overhead

14

Use SNMP over TCP

Alternative transport

Slightly higher overhead

15

Use SNMP with IPv4

Standard IP

Low overhead

16

Use SNMP with IPv6

Modern IP

Efficient communication

17

Use SNMP with GETBULK vs multiple GETs

Compare bandwidth

GETBULK uses less

18

Use SNMP with 1-second polling

High frequency

Network remains responsive

19

Use SNMP with 60-second polling

Standard interval

Minimal impact

20

Use SNMP with 1024-second polling

Long interval

Very low overhead

21

Use SNMP with SNMPwalk

Traverse MIB

Efficient data retrieval

22

Use SNMP with SNMPset

Modify value

Small message

23

Use SNMP with SNMPtrap

Alert manager

Lightweight message

24

Use SNMP with SNMPinform

Confirmed alert

Low overhead

25

Use SNMP with CLI tool

e.g., snmpget

Minimal traffic

26

Use SNMP with GUI tool

e.g., SNMPc

Efficient polling

27

Use SNMP with Python script

pysnmp

Lightweight communication

28

Use SNMP with Java app

SNMP4J

Efficient messaging

29

Use SNMP with C app

Net-SNMP

Low-level efficiency

30

Use SNMP with Perl script

Net::SNMP

Lightweight

31

Use SNMP with SNMP manager

Central polling

Low bandwidth usage

32

Use SNMP with SNMP agent

Device endpoint

Minimal processing load

33

Use SNMP with SNMP proxy

Forwarded requests

Efficient routing

34

Use SNMP with SNMP relay

Trap forwarding

Lightweight

35

Use SNMP with high latency

Long RTT

Still efficient

36

Use SNMP with packet loss

Retries needed

Still low overhead

37

Use SNMP with low MTU

Small packet size

No fragmentation

38

Use SNMP with high MTU

Large packet support

Efficient bulk transfer

39

Use SNMP with VLANs

Segmented network

Low impact

40

Use SNMP with VPN

Encrypted tunnel

Still efficient

41

Use SNMP with mobile network

4G/5G

Minimal data usage

42

Use SNMP with satellite link

High latency

Low bandwidth usage

43

Use SNMP with IoT device

Low-power device

Lightweight communication

44

Use SNMP with smart sensor

Embedded system

Minimal data sent

45

Use SNMP with smart meter

Utility device

Low overhead

46

Use SNMP with smart camera

Surveillance device

Efficient polling

47

Use SNMP with POS terminal

Retail system

Lightweight monitoring

48

Use SNMP with ATM

Banking system

Low bandwidth usage

49

Use SNMP with SCADA system

Industrial control

Efficient communication

50

Use SNMP with cloud VM

Elastic infrastructure

Minimal network impact

  • Reference links