Configure SNMPv3 on CentOS

When you intend to monitor your devices using SNMP it’s best to use SNMP version 3 as it offers authentication and encryption. Both SNMP versions 1 and 2 only use the community-string as the password and all traffic is clear text. Configuring SNMPv3 on CentOS is pretty easy, in this lesson, I’ll show you how to do it.

First, install the required SNMP utilities.

# yum install net-snmp net-snmp-utils net-snmp-libs

Make sure that the SNMP daemon is not running, or you will be unable to add a new user:

# service snmpd stop
Stopping snmpd:                                            [  OK  ]

Now we will create a new SNMPv3 user called “SNMPV3USER”. I will use MD5 for authentication and AES encryption, “AUTH-PASS” will be the password for authentication, and “ENCRYPT-PASS” will be used for encryption:

# net-snmp-create-v3-user -ro -A AUTH-PASS -X ENCRYPT-PASS -a MD5 -x AES SNMPV3USER 

Now we can start the SNMP daemon:

# service snmpd start
Starting snmpd:                                            [  OK  ]

Make sure the SNMP daemon starts whenever you reboot your machine. You can do this with the chkconfig command:

# chkconfig snmpd on
# chkconfig | grep snmpd
snmpd          	0:off	1:off	2:on	3:on	4:on	5:on	6:off

This ensures that it runs at runlevel 3,4, and 5. You are now ready to monitor your CentOS machine, just to be sure, we can use snmpwalk to test if everything is reachable and working:

Unlock This Lesson for Free - No Payment Required!

If you like to keep on reading, register now!

  • Learn CCNA, CCNP and CCIE R&S. Explained As Simple As Possible.
  • Get Instant Access to this Full Lesson, Completely for Free!
  • Unlock More to Read. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)
1677 Sign Ups in the last 30 days