How to enable SNMP on a Linksys/Cisco SLM2008 switch


In this post I will show you how to enable SNMP on a Linksys/Cisco SLM2008. All credits go out for Romain Boissat who made this post:https://chroot-me.in/blog/index.php/blog/35.

First off all you need the download the script from https://chroot-me.in/blog/media/enable_snmp.pl and need to have a Linux box with Perl installed.

The first time I ran the script on Debian 6 I got the following error:

image

On Debian 6 you have to install the package libwww-perl to get the script working:

apt-get install libwww-perl

After you installed the libwww-perl module you can rerun the script:

quote from https://chroot-me.in/blog/index.php/blog/35:

$ ./enable_snmp.pl <SWITCH IP>
Obtaining data from Switch: <SWITCH IP>
Administrator Username: [ admin ]: <USER>
Administrator Password: [ admin ]: <PASSWORD>
Current Body Checksum: <SOME HEXADECIMAL VALUE>
Current Header Check Byte: <SOME HEXADECIMAL VALUE>
SNMP is currently: DISABLED - WILL ENABLE
Both community strings are limited to 15 characters.
New read-only community string: [ public ]: <STRING RO>
New read-write community string: [ private ]: <STRING RW>
New Body Checksum: <SOME HEXADECIMAL VALUE>
New Header Check Byte: <SOME HEXADECIMAL VALUE>
End - SNMP Should be enabled.

When the above steps ends with an error. You can use the offline method. Just make a backup of your config in the GUI of the SLM2008. Thank copy the .cfg file to a linux box in my case this was Debian. Start the enable_snmp.pl script. Point to the .cfg file. The enable_snmp.pl will generate a new .cfg file.

image

The next step is to restore the changed config to the SLM2008 switch. Open the GUI and upgrade the configuration with the new “snmpenabled” config via Admin – Save configuration – Upgrade:

image

With snmpwalk you can verify if the new SNMP setup is working:

snmpwalk -c public 192.168.123.253 -v 2c

You can use Cacti to graph the switchports. In the screenshot below you see a running vMotion of a small VM:

image

 

Source: https://chroot-me.in/blog/index.php/blog/35
Advertisement