• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

CentOS / RHEL : How to determine which SNMP version is being used

by admin

Question :1. What command shows what SNMP Protocol version(s) [1, 2c, 3] I am running on my system?
2. How do change the SNMP version in use?

Answer :
There is no command to show the current running SNMP version. The snmpd daemon will not show as running in any one particular version, as it has the ability to do any of the three at any time. The configuration in the snmpd.conf file (/etc/sma/snmp/snmpd.conf) will indicate which versions allowed.

– By default the rocommunity and rwcommuntiy lines set in the snmpd.conf will allow SNMP V1 and V2 access.
– A snmpd.conf with no rocommunity and rwcommuntiy lines would only support a SNMPV3 query.
V1 and V2 requests would be ignored.
– For SNMPV3 queries to work the required options, the user,
passphrase, authentication/encryption method all have to be configured. there is no “public” like query capability with SNMPV3.

Example of an snmpd.conf file configured for v1 and v2c :

...
# rocommunity: a SNMPv1/SNMPv2c read-only access community name
#   arguments:  community [default|hostname|network/bits] [oid]
rocommunity  public
...
# rwcommunity: a SNMPv1/SNMPv2c read-write access community name
#   arguments:  community [default|hostname|network/bits] [oid]
#
# The following entry provides minimum access for successful
# SEA subagent registration.
#
rwcommunity  private localhost .1.3.6.1.4.1.42.2.15
...

Example of an snmpd.conf file configured for ONLY v3 access :

...
# SECTION: Access Control Setup
#
#   This section defines who is allowed to talk to your running
#   snmp agent.

# rwuser: a SNMPv3 read-write user
#   arguments:  user [noauth|auth|priv] [restriction_oid]

rwuser  geekuser

# rouser: a SNMPv3 read-only user
#   arguments:  user [noauth|auth|priv] [restriction_oid]

rouser  geekuser
...

where “geekuser” is the only user allowed in this example.

CentOS / RHEL 6 : Install and Configure SNMPv3

Filed Under: Linux

Some more articles you might also be interested in …

  1. How to Disable NUMA in CentOS / RHEL 6,7
  2. How to install packages using dnf in CentOS/RHEL 8
  3. Understanding System Security Services Daemon (SSSD)
  4. CentOS / RHEL 7 : How to set udev rules for ASM on multipath disks
  5. How To Configure SNMP Daemons: snmpd and snmptrapd on CentOS/RHEL 5,6 and 7
  6. Downloading a Specific Version of Package and Its Dependencies from Repository for Offline Installation Using YUM
  7. How to move /tmp on a separate disk as a separate mount point (Online)
  8. logname Command Examples in Linux
  9. How to Stop SSH Session From Getting Timed Out
  10. How to Re-Create the Yum Cache and/or Force a Fetch of the Package List of the Enabled Repositories

You May Also Like

Primary Sidebar

Recent Posts

  • JavaFX ComboBox: Set a value to the combo box
  • Nginx load balancing
  • nginx 504 gateway time-out
  • Images preview with ngx_http_image_filter_module

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright