Configuring SNMP
Problem
You want to set up basic SNMP services on a router.
Solution
To enable read-only SNMP services, use the following configuration command:
Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router(config)#snmp-server communityORAROroRouter(config)#endRouter#
To enable read-write SNMP services, use the following command:
Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router(config)#snmp-server communityORARWrwRouter(config)#endRouter#
Warning
It is extremely risky to enable read-write SNMP services without the appropriate security controls. Please read the following discussion section before implementing this recipe.
Starting with IOS Version 12.0(3)T, Cisco introduced a new system for configuring SNMP services by using the snmp-server group and snmp-server user configuration commands. Use the following commands to enable read-only SNMP services with this new method:
Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router(config)#snmp-server groupCOOKROv1Router(config)#snmp-server userTESTRO1 COOKROv1Router(config)#snmp-server groupBOOKROv2cRouter(config)#snmp-server userTESTRO2 BOOKROv2cRouter(config)#end
Discussion
SNMP services are disabled by default on all Cisco routers. The examples highlighted in the solutions section show only how to configure the router to allow inbound SNMP services so that it will respond to SNMP Get and Set ...