SNMP or Simple network Management Protocol is a networking protocol used for managing and monitoring of network-connected devices in IP networks. The devices can be routers, switches, firewalls, gateways, servers, printers etc. All SNMP messages are transported via UDP (User Datagram Protocol). The SNMP agent receives requests on port 161.
1.2 How to configure SNMP on the switch using CLI?
Telnet or ssh to the switch using Putty or the command line. If using command line use either of the following command.
ssh admin@<access_ip_address_of_the_switch>
Or
telnet <access_ip_address_of_the_switch>
When prompted for username and password use the following default credentials:
Username: admin
Password: admin
Put in the following commands to enable SNMP on the switch:
Switch>enable
Switch#configure terminal
Switch(config)#security-manage snmp enable
Switch(config)#snmp community <community_name(userdefined)> {ro | rw}
Switch(config)#exit
(ro stands for read only and rw stands for read write)
Checking SNMP information, use the below command
Switch#show snmp system information
This will be the output.
1.3 How to configure SNMP using the GUI?
In any browser type in the IP address of the switch and enter the default credentials as shown above (if user and password not set).
Go to System -> SNMP Community, and give a community name and choose Read and Write Purview and click on Apply.
Here in the above picture, we have configured an SNMP community named ‘sw6012’ with read-write purview.
Finally go to Tools and save the configuration done.
2 Testing SNMP using Linux SNMP Management server
On the Linux server put in the following commands to install SNMP management server:
sudo apt-get update
sudo apt-get install snmp snmp-mibs-downloader
Make sure the server and the switch are in the same subnet.
To test if SNMP is working or not put in the following command:
snmpwalk -v2c -c <community_string> <ip_address_of_the_switch>
If the
output at the end is similar to the following, then SNMP is working on the
device