Configure Simple Network Management Protocol (SNMP) Community Strings on a Router
|
|
|
|
Introduction
This document explains how to configure Simple Network Management
Protocol (SNMP) community/authenticating strings on Cisco routers.
Back to Top
Overview
The Simple Network Management Protocol (SNMP) is an application layer
protocol that facilitates the exchange of management information between
network devices.
SNMP enables network administrators to manage network performance, find
and solve network problems, and plan for network growth.
An SNMP community string is a text string that acts as a password. It
is used to authenticate messages that are sent between the management station,
the SNMP manager or Network management server like Cisco Works and the SNMP
agent like Router or Switch. The community string is included in every packet
that is transmitted between the SNMP manager and the SNMP agent.
Back to Top
Requirements
To perform the steps described in this document, you need to have these
items:
Back to Top
Connect to the Router
Follow these steps to connect to the router command line
interface:
-
Connect a PC to the router with a console cable.
-
Create a HyperTerminal connection to your router. For more
information, refer to
Create a
HyperTerminal Connection.
-
Log into the router with the login and password that you entered in
fields B10 and B11 of the Router Worksheet.
Username:admin
Password:
Note: If you do not know the password for your router, refer to
Reset
the Password on the Router.
-
Type enable and press Enter to
access the privileged mode. Type the enable password that you entered in field
B12 of the Router Worksheet and press
Enter.
Router>enable
Password:
Router#
Back to Top
Configure SNMP Community Strings on a Router
Enable SNMP Community Strings
Follow these steps to enable SNMP community strings on your
router:
-
Type show running-config and press
Enter to look for the SNMP information.
Router#show running-config
Building configuration...
Current configuration : 2937 bytes!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
!--- Output is suppressed for brevity.
Note: If no SNMP information is present, continue the steps. If any
SNMP commands are listed, you can modify or disable them in the section
Modify SNMP Community Strings.
-
Type configure terminal and press
Enter to enter the router configuration
mode.
Router#configure terminal
Router(config)#
-
Type snmp-server community public RO to enable the
Read-only (RO) community string where "public" is the Read-only community
string.
Router(config)#snmp-server community public RO
-
Type snmp-server community private RW to enable
the Read-write (RW) community string:
Router(config)#snmp-server community private
RW
where "private" is the Read-write community string.
-
Type exit and press
Enter.
Router(config)#exit
Router#
-
Type write memory and press
Enter.
Router#write memory
Verify SNMP Community Strings
Follow these steps to verify SNMP community strings:
-
Verify that there is TCP/IP connectivity between the Network
Management Server (NMS) server and the router. On the command prompt of your PC
which runs a NMS type, ping followed by IP address of the router configured
with SNMP community strings.
C:\>ping 192.168.10.1
Pinging 192.168.10.1 with 32 bytes of data:
Reply from192.168.10.1: bytes=32 time<10ms TTL=247
Reply from192.168.10.1: bytes=32 time=10ms TTL=247
Reply from192.168.10.1: bytes=32 time<10ms TTL=247
Reply from192.168.10.1: bytes=32 time<10ms TTL=247
Ping statistics for 192.168.10.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 10ms, Average = 2ms
-
Type show running-config and press
Enter to look for the SNMP information. In the sample output,
"public" is the read-only community string and "private" is the read-write
community string.
Router#show running-config
Building configuration...
Current configuration : 2937 bytes!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
snmp-server community public RO
snmp-server community private RW
!--- Output is suppressed for brevity.
-
Alternatively, type show snmp command in the
enable mode. If you see this message, it also indicates that SNMP has not been
enabled on the router.
Router#show snmp
%SNMP agent not enabled
Router#
Modify SNMP Community Strings
To modify the current Read-only (RO) and Read-write (RW) community
string, first you need to delete these community strings already configured in
the router.
Follow these steps to modify SNMP community strings:
-
Type show running-config and press
Enter to look for the SNMP information. In the sample output,
"public" is the read-only community string and "private" is the read-write
community string.
Router#show running-config
Building configuration...
Current configuration : 2937 bytes!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
snmp-server community public RO
snmp-server community private RW
!--- Output is suppressed for brevity.
-
Type configure terminal and press
Enter to enter the router configuration
mode.
Router#configure terminal
Router(config)#
-
Type no snmp-server community XXXX RO and press
Enter to delete the Read-only (RO) community string where
"XXXX" is the Read-only community string.
Router(config)#no snmp-server community XXXX RO
-
Type no snmp-server community YYYY RW and press
Enter to delete the Read-write (RW) community string where
"XXXX" is the Read-write community string.
Router(config)#no snmp-server community YYYY RW
-
Enter the new RO community strings. Type snmp-server
community XXXX RO and press Enter where "XXXX" is the
Read-only community string.
Router(config)#snmp-server community XXXX RO
-
Enter the new RW community strings. Type snmp-server
community YYYY RW and press Enter where "XXXX" is the Read-write
community string.
Router(config)#snmp-server community YYYY RW
-
Type exit and press
Enter.
Router(config)#exit
Router#
-
Type write memory and press
Enter.
Router#write memory
Note: To disable the SNMP Community strings follow steps 3 and 4 of the
section Modify SNMP Community Strings.
Back to Top
Next Step
You have completed the procedure to configure community strings on your
Cisco router. To make further changes to your router, refer to the
Routers Support
Page.
Back to Top
Troubleshoot the Procedure
This section provides information about common problems that you may
encounter. If this information does not solve your problem, contact the
SMB
Technical Assistance Center (SMB TAC) for assistance.
Problem
|
Cause(s) and Suggested Solution(s)
|
The router boots and displays several error messages but does
not display a prompt in HyperTerminal.
|
Press Enter to clear the output and display
the router prompt.
For further assistance, contact the
SMB
Technical Assistance Center (SMB TAC).
|
Back to Top
Related Information