How to enable SNMP on your operating system

how to enable snmp on your operating system

The Simple Network Management Protocol (SNMP), that has accompanied IT professionals for decades, is available on a large number of devices and solutions. This is great because it’s one of the most basic technologies for monitoring and other network management tasks. Although SNMP won’t fix the internet for you, you won’t come across SNMP if you are a system administrator and responsible for IT infrastructure.

There are several things to consider when configuring SNMP for monitoring. The first and most important step is: Enable SNMP! How to do this depends on your specific piece of hardware (read the friendly manual if you need help). How enabling SNMP works on computers and servers with Windows, Linux, and macOS operating systems is something we’ll show you in this article.

Enabling SNMP on Windows

Installing and configuring the SNMP service on the different Windows client and server versions mostly works the same way. On Windows versions older than Windows 8 and Windows Server 2012, it is already installed. For Windows 8, Windows 10, Windows Server 2012, Windows Server 2016, and Windows Server 2019 you will have to install the SNMP service first. (Yes, that’s correct. Although you might have read contrary statements on some boards, SNMP is still available on Windows Server 2012, 2016 and even 2019!)

If you use Windows 10 Version 1809 or later, scroll down to the next paragraph.

What you have to do is to open the Control Panel on your Windows machine. Open the Programs and Features section where you can Turn Windows features on or off.

On Windows workstations select Simple Network Management Protocol (SNMP) and install it.

On Windows Server you’ll have to click Next in the Add Roles and Features Wizard until you reach the Features sections where you can install the SNMP Service.

After installing the SNMP service, configure it appropriately. So, run services.msc as administrator and navigate to the properties of the SNMP service. Choose Automatic as startup type to have the service always running, even after turning your computer off and on again.

For monitoring purposes, you should also check all services on the Agent tab to have all SNMP values available.

Don’t forget to adjust security parameters like the community string and the IP/host filter list to your security compliances! For example, add the community name public with READ ONLY rights and accept SNMP packets from at least the address of your monitoring server.

That’s it! You have successfully configured SNMP on your Windows machine.

Enabling SNMP on Linux

Now look at how you can enable SNMP on Linux. We describe the setup process for UbuntuDebianCentOS and OpenSuse.

In the first step you need to install the SNMP deamon

You will now find the SNMP configuration in /etc/snmp/snmpd.config. Make a backup of the original configuration file and open snmpd.config with an editor. Now set the community string.

public is the default community string that most SNMP devices listen to. Of course you can also choose a string individually. The only important thing is that the string is also the same on the devices to be queried.

If you are using OpenSuse, the snmpd service may not be activated and started by default. In this case, activate the snmpd service so it will start on system boot with the command: systemctl enable snmpd. Then start the service with the command systemctl start snmpd.

For other Linux distributions you might have to adjust the steps mentioned above slightly.

Enabling SNMP on macOS

Current macOS versions include SNMP by default. You can use the basic setup assistant to appropriately configure SNMP on your Mac:

  • Open a new terminal and use this command:
  • sudo snmpconf -g basic_setup

Configure read-only community access for SNMP v1/v2c by answering the setup questions and start the SNMP daemon:

  • sudo launchctl load -w /System/Library/LaunchDaemons/org.net-snmp.snmpd.plist

Best practice is to add your SNMP daemon to automatic startup to manage the macOS machine via SNMP in a comfortable way.

What’s Next?

Enabling SNMP on your operating system wasn’t so hard, was it? Configuring access from other servers to useful system parameters via SNMP might be harder. We will cover this topic in the next articles about SNMP on our blog. Stay tuned!

[“source=paessler”]