Search

How to configure Cisco Router/Switch for SNMP through IOS CLI

Following lab explains how to configure Cisco Router/Switch for SNMP through IOS CLI.

First, we need to create a Standard Access Control List to identify the SNMP Manager. Here the IP Address of SNMP Manager is 192.168.10.100.

Following Cisco IOS CLI commands can be used to configure a Cisco Router / Swicth for SNMP.

OmniSecuR1#configure terminal
OmniSecuR1(config)#access-list 20 permit 192.168.10.100 0.0.0.0
OmniSecuR1(config)#exit
OmniSecuR1#

After creating the Standard Access Control List, you can configure the Cisco Router / Switch as shown below for SNMP access. Here the community is "OmniSecuCommunity" and Access List is 20, which we created in previous step. "ro" is used to specify this is a "Read-Only" SNMP access.

OmniSecuR1#configure terminal
OmniSecuR1(config)#snmp-server community OmniSecuCommunity ro 20
OmniSecuR1(config)#exit
OmniSecuR1# 

You may also want to Configure SNMP Traps in Cisco Routers / Switches. SNMP Trap messages are problem indicators sent from SNMP Agent to SNMP Manager. Use the following steps to configure your Cisco Router / Switch for SNMP Traps.

OmniSecuR1#configure terminal
OmniSecuR1(config)#snmp-server enable traps
OmniSecuR1(config)#snmp-server host 192.168.10.100 OmniSecuCommunity
OmniSecuR1(config)#exit
OmniSecuR1#

Related Tutorials