SNMP Troubleshooting
This document provides a step-by-step guide to troubleshooting SNMP configuration issues on CE devices. It includes verification methods in cloud configuration, local SNMP daemon configuration, UCI settings, service status, and SNMP walk tests. Using the commands and examples provided, users can effectively identify and resolve most SNMP connectivity or configuration issues.
Troubleshooting Steps
- Cloud
- UCI
- Run-Time
- Testing
- Log
Cloud Configuration verification
These commands help you verify the SNMP configuration as seen by your cloud service
Access the CE Terminal
Log into the CE device and gain root access:
sudo su -
Check last config response:
Run the following command to check the last configuration. This command displays the SNMP configuration from the last configuration response received from the cloud.
cat /tmp/last_config_response.json | jq .'service.snmp'
The given one is just an example output; when this command is run, it will show something like this.
Example Response
{
"hostName": "myhost.com",
"location": "Nadiad",
"version": "v3",
"community": null,
"port": 161,
"description": "system",
"contact": "sharad.bhagwat@elemprin.com",
"enable": true,
"username": "sharad",
"authProtocol": "SHA",
"authPassword": "sharad24",
"privacyPassword": null,
"privacyProtocol": null,
"securityLevel": "auth"
}
Verify SNMP daemon configuration file:
The cat /etc/config/snmpd command is used to view the configuration for the SNMP service. It makes it easy to check whether SNMP is set up correctly and to fix any problems.
cat /etc/config/snmpd
The given one is just an example output; when this command is run, it will show something like this.
Exmaple Response
config agent
option agentaddress 'UDP:161'
config agentx
option agentxsocket '/var/run/agentx.sock'
config com2sec 'public'
option secname 'ro'
option source 'default'
config com2sec6 'public6'
option secname 'ro'
option source 'default'
option community 'public'
config com2sec6 'private6'
option secname 'rw'
option source 'localhost'
option community 'private'
config group 'public_v1'
option group 'public'
option version 'v1'
option secname 'ro'
config group 'public_v2c'
option group 'public'
option version 'v2c'
option secname 'ro'
config view 'all'
option viewname 'all'
option type 'included'
option oid '.1'
config access 'public_access'
option group 'public'
option context 'none'
option version 'any'
option level 'noauth'
option prefix 'exact'
option read 'all'
option write 'none'
option notify 'none'
config system
option sysLocation 'London'
option sysContact 'apex_connect123@gmail.com'
option sysName 'myhost.com'
option sysDescr 'system'
config exec
option name 'filedescriptors'
option prog '/bin/cat'
option args '/proc/sys/fs/file-nr'
config engineid
option engineidtype '3'
option engineidnic 'eth0'
config snmpd 'general'
option enabled '1'
config user 'sharad'
option name 'sharad'
option sec_level 'auth'
option auth_proto 'SHA'
option auth_pass 'sharad24'
option user_type 'rouser'
Q:1 What should I check in the SNMP response to confirm correct setup?
When you run: cat /tmp/last_config_response.json | jq '.service.snmp' you should carefully verify the following fields to confirm correct setup: hostName – Ensure the device hostname is correctly defined. location – Confirms the physical/logical location is set (e.g., London). version – Check that the SNMP version (v1, v2c, or v3) matches your intended configuration. community – For v1/v2c, ensure the community string (public, private) is present. For v3, this may be null. port – Verify the SNMP port (default is 161). enable – Must be true for SNMP to be active. username – For v3, confirm the username is correctly set. authProtocol / authPassword – For v3 with authentication, ensure protocol (SHA/MD5) and password are valid. privacyProtocol / privacyPassword – For v3 with privacy, confirm encryption settings (AES/DES) and password are configured. securityLevel – Verify the correct level (noAuthNoPriv, authNoPriv, or authPriv). If these values align with your intended SNMP setup, the configuration has been correctly applied from the cloud.
Q:2 What does the command cat /etc/config/snmpd verify?
The command: cat /etc/config/snmpd. displays the local SNMP daemon configuration file. It verifies: Agent settings – Confirms SNMP is listening on the correct port (UDP:161). Community strings – Shows access control for v1/v2c (public, private). Groups and views – Defines which OIDs are accessible and at what permission level (read-only, read-write). Access rules – Specifies authentication level (noauth, auth, priv) and permissions for each group. System information – Confirms sysLocation, sysContact, sysName, and sysDescr are correctly set. User configuration (v3) – Displays SNMPv3 users, their security level, authentication protocol, and passwords. General settings – Ensures SNMP daemon is enabled (option enabled '1'). This file is critical for verifying that SNMP is correctly configured at the local daemon level, ensuring consistency with the cloud-applied configuration.
UCI Configuration Verification
This step involves checking the UCI settings for SNMP.
Show UCI SNMP configuration:
The uci show snmp command displays all SNMP-related configuration settings. It helps verify settings, check if SNMP is enabled, and view details like the community string.
uci show snmp
The given one is just an example output; when this command is run, it will show something like this.
Example Response
snmpd.@agent[0]=agent
snmpd.@agent[0].agentaddress='UDP:161'
snmpd.@agentx[0]=agentx
snmpd.@agentx[0].agentxsocket='/var/run/agentx.sock'
snmpd.public=com2sec
snmpd.public.secname='ro'
snmpd.public.source='default'
snmpd.public6=com2sec6
snmpd.public6.secname='ro'
snmpd.public6.source='default'
snmpd.public6.community='public'
snmpd.private6=com2sec6
snmpd.private6.secname='rw'
snmpd.private6.source='localhost'
snmpd.private6.community='private'
snmpd.public_v1=group
snmpd.public_v1.group='public'
snmpd.public_v1.version='v1'
snmpd.public_v1.secname='ro'
snmpd.public_v2c=group
snmpd.public_v2c.group='public'
snmpd.public_v2c.version='v2c'
snmpd.public_v2c.secname='ro'
snmpd.all=view
snmpd.all.viewname='all'
snmpd.all.type='included'
snmpd.all.oid='.1'
snmpd.public_access=access
snmpd.public_access.group='public'
snmpd.public_access.context='none'
snmpd.public_access.version='any'
snmpd.public_access.level='noauth'
snmpd.public_access.prefix='exact'
snmpd.public_access.read='all'
snmpd.public_access.write='none'
snmpd.public_access.notify='none'
snmpd.@system[0]=system
snmpd.@system[0].sysLocation='London'
snmpd.@system[0].sysContact='apex_connect123@gmail.com'
snmpd.@system[0].sysName='myhost.com'
snmpd.@system[0].sysDescr='system'
snmpd.@exec[0]=exec
snmpd.@exec[0].name='filedescriptors'
snmpd.@exec[0].prog='/bin/cat'
snmpd.@exec[0].args='/proc/sys/fs/file-nr'
snmpd.@engineid[0]=engineid
snmpd.@engineid[0].engineidtype='3'
snmpd.@engineid[0].engineidnic='eth0'
snmpd.general=snmpd
snmpd.general.enabled='1'
snmpd.sharad=user
snmpd.sharad.name='sharad'
snmpd.sharad.sec_level='auth'
snmpd.sharad.auth_proto='SHA'
snmpd.sharad.auth_pass='sharad24'
snmpd.sharad.user_type='rouser'
Q:1 Where can I get system information (Location, Contact, Hostname)?
System information is defined under the system section of the UCI SNMP configuration. Look for entries like: snmpd.@system[0].sysLocation='London', snmpd.@system[0].sysContact='apex_connect123@gmail.com', snmpd.@system[0].sysName='myhost.com', snmpd.@system[0].sysDescr='system', sysLocation → Physical or logical location of the device (e.g., London). sysContact → Contact email address for the administrator (e.g., apex_connect123@gmail.com). sysName → Hostname of the device (e.g., myhost.com). sysDescr → Description of the system (e.g., system). This section provides the basic identification and management details for the device, which are useful for SNMP monitoring tools and administrators.
Run Time Configuration Verification
The /etc/init.d/snmpd status command is used to check whether the SNMP service is currently running or not.
/etc/init.d/snmpd status
- If the snmp service is not running, start it by executing:
/etc/init.d/snmpd start
- If you need to stop the snmp service, use the following command:
/etc/init.d/snmpd stop
Testing verification
SNMP connectivity and data retrieval can be checked using the snmpwalk commands on the client machine to test.
SNMPv2c
The snmpwalk -v2c -c <community string> <ce> command fetches all SNMP information from a device using SNMP version 2c. This command checks whether the SNMP service, community string, and network connectivity are correct.
snmpwalk -v2c -c <community string> <ce>
The given one is just an example output; when this command is run, it will show something like this.
Example Command
snmpwalk -v2c -c snmp 172.20.10.3
Example Response
iso.3.6.1.2.1.1.1.0 = STRING: "system"
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: (3094) 0:00:30.94
iso.3.6.1.2.1.1.4.0 = STRING: "sharad.bhagwat@elemprin.com"
iso.3.6.1.2.1.1.5.0 = STRING: "myhost.com"
iso.3.6.1.2.1.1.6.0 = STRING: "Nadiad"
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.2.1.4
iso.3.6.1.2.1.1.9.1.2.2 = OID: iso.3.6.1.6.3.1
iso.3.6.1.2.1.1.9.1.2.3 = OID: iso.3.6.1.2.1.49
iso.3.6.1.2.1.1.9.1.2.4 = OID: iso.3.6.1.2.1.50
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.6.3.10.3.1.1
iso.3.6.1.2.1.1.9.1.2.7 = OID: iso.3.6.1.6.3.11.3.1.1
iso.3.6.1.2.1.1.9.1.2.8 = OID: iso.3.6.1.6.3.15.2.1.1
iso.3.6.1.2.1.1.9.1.2.9 = OID: iso.3.6.1.2.1.10.131
iso.3.6.1.2.1.1.9.1.3.1 = STRING: "The MIB module for managing IP and ICMP implementations"
iso.3.6.1.2.1.1.9.1.3.2 = STRING: "The MIB module for SNMPv2 entities"
iso.3.6.1.2.1.1.9.1.3.3 = STRING: "The MIB module for managing TCP implementations"
iso.3.6.1.2.1.1.9.1.3.4 = STRING: "The MIB module for managing UDP implementations"
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 SNMP Management Architecture MIB."
iso.3.6.1.2.1.1.9.1.3.7 = STRING: "The MIB for Message Processing and Dispatching."
iso.3.6.1.2.1.1.9.1.3.8 = STRING: "The management information definitions for the SNMP User-based Security Model."
iso.3.6.1.2.1.1.9.1.3.9 = STRING: "RFC 2667 TUNNEL-MIB implementation for Linux 2.2.x kernels."
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.2.1.0 = INTEGER: 9
iso.3.6.1.2.1.2.2.1.1.1 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.1.2 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.1.3 = INTEGER: 3
iso.3.6.1.2.1.2.2.1.1.4 = INTEGER: 4
iso.3.6.1.2.1.2.2.1.1.5 = INTEGER: 5
iso.3.6.1.2.1.2.2.1.1.6 = INTEGER: 6
iso.3.6.1.2.1.2.2.1.1.7 = INTEGER: 7
iso.3.6.1.2.1.2.2.1.1.8 = INTEGER: 8
iso.3.6.1.2.1.2.2.1.1.31 = INTEGER: 31
iso.3.6.1.2.1.2.2.1.2.1 = STRING: "lo"
iso.3.6.1.2.1.2.2.1.2.2 = STRING: "ip6tnl0"
iso.3.6.1.2.1.2.2.1.2.3 = STRING: "ip_vti0"
iso.3.6.1.2.1.2.2.1.2.4 = STRING: "ip6_vti0"
iso.3.6.1.2.1.2.2.1.2.5 = STRING: "eth0"
iso.3.6.1.2.1.2.2.1.2.6 = STRING: "eth1"
iso.3.6.1.2.1.2.2.1.2.7 = STRING: "eth2"
iso.3.6.1.2.1.2.2.1.2.8 = STRING: "eth3"
iso.3.6.1.2.1.2.2.1.2.31 = STRING: "vtun25"
iso.3.6.1.2.1.2.2.1.3.1 = INTEGER: 24
iso.3.6.1.2.1.2.2.1.3.2 = INTEGER: 131
iso.3.6.1.2.1.2.2.1.3.3 = INTEGER: 131
iso.3.6.1.2.1.2.2.1.3.4 = INTEGER: 131
iso.3.6.1.2.1.2.2.1.3.5 = INTEGER: 6
iso.3.6.1.2.1.2.2.1.3.6 = INTEGER: 6
iso.3.6.1.2.1.2.2.1.3.7 = INTEGER: 6
iso.3.6.1.2.1.2.2.1.3.8 = INTEGER: 6
iso.3.6.1.2.1.2.2.1.3.31 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.4.1 = INTEGER: 65536
iso.3.6.1.2.1.2.2.1.4.2 = INTEGER: 1452
iso.3.6.1.2.1.2.2.1.4.3 = INTEGER: 1480
iso.3.6.1.2.1.2.2.1.4.4 = INTEGER: 1332
iso.3.6.1.2.1.2.2.1.4.5 = INTEGER: 1450
iso.3.6.1.2.1.2.2.1.4.6 = INTEGER: 1500
iso.3.6.1.2.1.2.2.1.4.7 = INTEGER: 1500
iso.3.6.1.2.1.2.2.1.4.8 = INTEGER: 1450
iso.3.6.1.2.1.2.2.1.4.31 = INTEGER: 1500
iso.3.6.1.2.1.2.2.1.5.1 = Gauge32: 10000000
iso.3.6.1.2.1.2.2.1.5.2 = Gauge32: 0
iso.3.6.1.2.1.2.2.1.5.3 = Gauge32: 0
iso.3.6.1.2.1.2.2.1.5.4 = Gauge32: 0
iso.3.6.1.2.1.2.2.1.5.5 = Gauge32: 1000000000
iso.3.6.1.2.1.2.2.1.5.6 = Gauge32: 1000000000
iso.3.6.1.2.1.2.2.1.5.7 = Gauge32: 1000000000
iso.3.6.1.2.1.2.2.1.5.8 = Gauge32: 1000000000
iso.3.6.1.2.1.2.2.1.5.31 = Gauge32: 0
iso.3.6.1.2.1.2.2.1.6.1 = ""
iso.3.6.1.2.1.2.2.1.6.2 = ""
iso.3.6.1.2.1.2.2.1.6.3 = ""
iso.3.6.1.2.1.2.2.1.6.4 = ""
iso.3.6.1.2.1.2.2.1.6.5 = Hex-STRING: 08 00 27 DB 34 F6
iso.3.6.1.2.1.2.2.1.6.6 = Hex-STRING: 08 00 27 56 A7 5C
iso.3.6.1.2.1.2.2.1.6.7 = Hex-STRING: 08 00 27 65 F8 F9
iso.3.6.1.2.1.2.2.1.6.8 = Hex-STRING: 08 00 27 FD 1A D1
iso.3.6.1.2.1.2.2.1.6.31 = ""
iso.3.6.1.2.1.2.2.1.7.1 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.7.2 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.7.3 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.7.4 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.7.5 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.7.6 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.7.7 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.7.8 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.7.31 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.1 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.2 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.8.3 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.8.4 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.8.5 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.6 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.8.7 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.8.8 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.8.31 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.9.1 = Timeticks: (0) 0:00:00.00
iso.3.6.1.2.1.2.2.1.9.2 = Timeticks: (0) 0:00:00.00
iso.3.6.1.2.1.2.2.1.9.3 = Timeticks: (0) 0:00:00.00
iso.3.6.1.2.1.2.2.1.9.4 = Timeticks: (0) 0:00:00.00
iso.3.6.1.2.1.2.2.1.9.5 = Timeticks: (0) 0:00:00.00
iso.3.6.1.2.1.2.2.1.9.6 = Timeticks: (0) 0:00:00.00
iso.3.6.1.2.1.2.2.1.9.7 = Timeticks: (0) 0:00:00.00
iso.3.6.1.2.1.2.2.1.9.8 = Timeticks: (0) 0:00:00.00
iso.3.6.1.2.1.2.2.1.9.31 = Timeticks: (0) 0:00:00.00
iso.3.6.1.2.1.2.2.1.10.1 = Counter32: 55862
iso.3.6.1.2.1.2.2.1.10.2 = Counter32: 0
iso.3.6.1.2.1.2.2.1.10.3 = Counter32: 0
iso.3.6.1.2.1.2.2.1.10.4 = Counter32: 0
iso.3.6.1.2.1.2.2.1.10.5 = Counter32: 486650
iso.3.6.1.2.1.2.2.1.10.6 = Counter32: 0
iso.3.6.1.2.1.2.2.1.10.7 = Counter32: 0
iso.3.6.1.2.1.2.2.1.10.8 = Counter32: 0
iso.3.6.1.2.1.2.2.1.10.31 = Counter32: 0
iso.3.6.1.2.1.2.2.1.11.1 = Counter32: 569
iso.3.6.1.2.1.2.2.1.11.2 = Counter32: 0
iso.3.6.1.2.1.2.2.1.11.3 = Counter32: 0
iso.3.6.1.2.1.2.2.1.11.4 = Counter32: 0
iso.3.6.1.2.1.2.2.1.11.5 = Counter32: 1722
iso.3.6.1.2.1.2.2.1.11.6 = Counter32: 0
iso.3.6.1.2.1.2.2.1.11.7 = Counter32: 0
iso.3.6.1.2.1.2.2.1.11.8 = Counter32: 0
iso.3.6.1.2.1.2.2.1.11.31 = Counter32: 0
iso.3.6.1.2.1.2.2.1.12.1 = Counter32: 0
iso.3.6.1.2.1.2.2.1.12.2 = Counter32: 0
iso.3.6.1.2.1.2.2.1.12.3 = Counter32: 0
iso.3.6.1.2.1.2.2.1.12.4 = Counter32: 0
iso.3.6.1.2.1.2.2.1.12.5 = Counter32: 6
iso.3.6.1.2.1.2.2.1.12.6 = Counter32: 0
iso.3.6.1.2.1.2.2.1.12.7 = Counter32: 0
iso.3.6.1.2.1.2.2.1.12.8 = Counter32: 0
iso.3.6.1.2.1.2.2.1.12.31 = Counter32: 0
iso.3.6.1.2.1.2.2.1.13.1 = Counter32: 0
iso.3.6.1.2.1.2.2.1.13.2 = Counter32: 0
iso.3.6.1.2.1.2.2.1.13.3 = Counter32: 0
iso.3.6.1.2.1.2.2.1.13.4 = Counter32: 0
iso.3.6.1.2.1.2.2.1.13.5 = Counter32: 0
iso.3.6.1.2.1.2.2.1.13.6 = Counter32: 0
iso.3.6.1.2.1.2.2.1.13.7 = Counter32: 0
iso.3.6.1.2.1.2.2.1.13.8 = Counter32: 0
iso.3.6.1.2.1.2.2.1.13.31 = Counter32: 0
iso.3.6.1.2.1.2.2.1.14.1 = Counter32: 0
iso.3.6.1.2.1.2.2.1.14.2 = Counter32: 0
iso.3.6.1.2.1.2.2.1.14.3 = Counter32: 0
iso.3.6.1.2.1.2.2.1.14.4 = Counter32: 0
iso.3.6.1.2.1.2.2.1.14.5 = Counter32: 0
iso.3.6.1.2.1.2.2.1.14.6 = Counter32: 0
iso.3.6.1.2.1.2.2.1.14.7 = Counter32: 0
iso.3.6.1.2.1.2.2.1.14.8 = Counter32: 0
iso.3.6.1.2.1.2.2.1.14.31 = Counter32: 0
iso.3.6.1.2.1.2.2.1.15.1 = Counter32: 0
iso.3.6.1.2.1.2.2.1.15.2 = Counter32: 0
iso.3.6.1.2.1.2.2.1.15.3 = Counter32: 0
iso.3.6.1.2.1.2.2.1.15.4 = Counter32: 0
iso.3.6.1.2.1.2.2.1.15.5 = Counter32: 0
iso.3.6.1.2.1.2.2.1.15.6 = Counter32: 0
iso.3.6.1.2.1.2.2.1.15.7 = Counter32: 0
iso.3.6.1.2.1.2.2.1.15.8 = Counter32: 0
iso.3.6.1.2.1.2.2.1.15.31 = Counter32: 0
iso.3.6.1.2.1.2.2.1.16.1 = Counter32: 55862
iso.3.6.1.2.1.2.2.1.16.2 = Counter32: 0
iso.3.6.1.2.1.2.2.1.16.3 = Counter32: 0
iso.3.6.1.2.1.2.2.1.16.4 = Counter32: 0
iso.3.6.1.2.1.2.2.1.16.5 = Counter32: 280744
iso.3.6.1.2.1.2.2.1.16.6 = Counter32: 0
iso.3.6.1.2.1.2.2.1.16.7 = Counter32: 0
iso.3.6.1.2.1.2.2.1.16.8 = Counter32: 1388
iso.3.6.1.2.1.2.2.1.16.31 = Counter32: 424
iso.3.6.1.2.1.2.2.1.17.1 = Counter32: 569
iso.3.6.1.2.1.2.2.1.17.2 = Counter32: 0
iso.3.6.1.2.1.2.2.1.17.3 = Counter32: 0
iso.3.6.1.2.1.2.2.1.17.4 = Counter32: 0
iso.3.6.1.2.1.2.2.1.17.5 = Counter32: 1856
iso.3.6.1.2.1.2.2.1.17.6 = Counter32: 0
iso.3.6.1.2.1.2.2.1.17.7 = Counter32: 0
iso.3.6.1.2.1.2.2.1.17.8 = Counter32: 10
iso.3.6.1.2.1.2.2.1.17.31 = Counter32: 4
iso.3.6.1.2.1.2.2.1.18.1 = Counter32: 0
iso.3.6.1.2.1.2.2.1.18.2 = Counter32: 0
iso.3.6.1.2.1.2.2.1.18.3 = Counter32: 0
iso.3.6.1.2.1.2.2.1.18.4 = Counter32: 0
iso.3.6.1.2.1.2.2.1.18.5 = Counter32: 0
iso.3.6.1.2.1.2.2.1.18.6 = Counter32: 0
iso.3.6.1.2.1.2.2.1.18.7 = Counter32: 0
iso.3.6.1.2.1.2.2.1.18.8 = Counter32: 0
iso.3.6.1.2.1.2.2.1.18.31 = Counter32: 0
iso.3.6.1.2.1.2.2.1.19.1 = Counter32: 0
General snmpwalk Command for SNMPv3:
This command is used to retrieve data (OID values) from a device with SNMPv3 and to check whether security settings, authentication, and SNMP connectivity are correct.
snmpwalk -v3 -l <sec level> -u <user> -a <auth proto> -A <auth pass> -x <privacy proto> -X <privacy pass> <CE>
The given one is just an example output; when this command is run, it will show something like this.
Example Command
snmpwalk -v3 -l authPriv -u sharad -a SHA -A sharad24 -x AES -X snmp12345 172.20.10.3
SNMPv3 with noAuthNoPriv
This is used to check SNMP v3 configuration and reachability. This can be checked by running snmpwalk -v3 -l <sec level> -u <user> <CE> . In place of sec level , user and ce , the user can check by adding its details. For example snmpwalk -v3 -l noAuthNoPriv -u sharad 172.20.10.3 This command connects to the SNMP v3 agent with username sharad and fetches MIB data without any authentication or encryption.
snmpwalk -v3 -l noAuthNoPriv -u sharad 172.20.10.3
SNMPv3 with authNoPriv
This can be checked by running snmpwalk -v3 -l <sec level> -u <user> -a <autho proto> -A <auth pass> <ce>. This is used to check SNMPv3 configuration, username, password and reachability. This command is used to get Authenticated Data (like Interface, System Info) from the Target Device using SNMPv3.
snmpwalk -v3 -l authNoPriv -u sharad -a SHA -A sharad24 172.20.10.3
Q:1 How to check SNMP Connectivity?
Use snmpwalk from a client: SNMP v2c → snmpwalk -v2c -c community> CE_IP , SNMP v3 (auth+priv) → snmpwalk -v3 -l authPriv -u user ... CE_IP, SNMP v3 (no auth/priv) → snmpwalk -v3 -l noAuthNoPriv -u user CE_IP
If you get MIB data, connectivity is fine. If not, check SNMP service, firewall, or credentials.
Log Verification
The logread | grep snmpd command filters the logs of the SNMP service. This can be used to check SNMP v2c requests, errors, and authentication issues.
logread | grep snmpd
The given one is just an example output; when this command is run, it will show something like this.
Example Response
Jul 8 14:54:45 Apex-CE-London-1 hiclouds_config.sh[29901]: restarting snmpd
Q:1 How to check the logs of the server?
To check SNMP-related logs on the CE device, use the following command: logread | grep snmpd. This filters the system logs and displays only entries related to the SNMP snmpd. It helps identify: SNMP v2c requests being processed. Authentication attempts and failures. Service restarts or errors. Reviewing these logs provides insight into whether SNMP queries are reaching the device and how the daemon is responding.
Q:2 What to do if there is no output in the logs?
Debug by: Checking if SNMP service is running. Starting it if stopped. Generating SNMP traffic (snmpwalk) Running logread without filters. Verifying SNMP config. In short: Check service, config, and trigger traffic to see logs.