Enable Cisco switch SNMP for Monitoring

Enable Cisco switch SNMP for Monitoring

SNMP protocol is used for monitoring and management of devices using the network, and most of the network-based devices (such as routers, switches, firewall, SAN, servers, and some of the currently existing modems in the market) have a service for SNMP providing.

Even operating systems such as VMware ES Xi, Linux, Windows, Mac, Xen, and BSD has the SNMP installation compatibility, and we can easily use the SNMP service for the system monitoring.

In this tutorial, I want to explain how to activate SNMP on the Cisco switch for adding it into the monitoring.

First of all, we need to connect to the Cisco switch, which has a few methods:


Method #1: connect with a console cable

First, connect an end of the console cable to the laptop and the other end to the console port on the blue switch.

If you are running Windows OS, use this tutorial below:

Using Putty for Cisco switch and router connection

If you are running Linux, you can do it using the screen command.

screen /dev/ttyUSB0 115200

(Note that it might be ttyUSB1 sometimes.)

Method #2: connect via SSH or Telnet

In Linux, you just have to open a terminal and write one of the following commands.

ssh [email protected]
*Note that you have to use your own IP address instead of 192.168.1.1, and your own username instead of mmparivn, which you defined installing the switch.


After logging in, write enable, to enter enable environment:

enable

Enable environment is to make changes to Cisco switch, firewall or router, for example, to enable/disable a service, settings of the interfaces, VLANs, IP match-up, we have to enter enable environment.

Now to activate SNMP service, we enter the configuration environment:

conf t

SNMP service activation

For a monitoring system, having a read-only community is sufficient.

If we want to liken community to something, it is just like a token or a password that can detect allowance or denial, when an SNMP request delivers to the device.

The name of the community can be anything (including at least 20 characters), and I have named the community “virgoolCiscoCommunityReadOnly” here.

snmp-server community public virgoolCiscoCommunityReadOnly v2c


Read this for more information on Community string and SNMP versions:

What is an SNMP Community String?

Our work is done and only saving the changes are left to do which in config environment is as follows:

do write

And if you want to do it within the enable environment, you have to write as follows:

write

The SNMP Cisco switch is now activated and we can add it into a monitoring system.

要查看或添加评论,请登录

社区洞察

其他会员也浏览了