Cisco IOS
Reference: https://www.cisco.com/c/en/us/support/docs/ip/simple-network-management-protocol-snmp/7282-12.html
The procedure below is the same for both routers, Cisco IOS software-based XL Catalyst Switches, RSMs and multilayer switch feature card (MSFC). This means you can complete the same procedure in order to enable SNMP on an RSM.
- Telnet/SSH to the router
- Enter the enable password at the prompt in order to enter the enable mode
- Display the running configuration and look for the SNMP information
- Router#show running-config
- Note: If no SNMP information is present, continue with these steps. If any SNMP commands are listed, you can modify or disable them.
- Go into the configuration mode
- Use this command in order to enable the Read-only (RO) community string
- Router(config)#snmp-server community public RO
- Note: replace public with your desired community string
- Router(config)#snmp-server community private RW
- Note: replace public with your desired community string
- Router(config)#snmp-server community public RO
- Exit out of the configuration mode and return to the main prompt
- Router(config)#exit
- Write the modified configuration to nonvolatile RAM (NVRAM) to save the settings
- Router#write memory
configure terminal
!
snmp-server community public RO
!
snmp-server community private RW
!
exit
!
write memory
Catalyst OS
On Catalyst switches that run the catalyst Operating System (OS), SNMP is enabled by default with the community strings set to:
- Read-Only: Public
- Read-Write: Private
- Read-Write-all: Secret
With these community strings and the IP address of your switch’s management interface, anyone is able to reconfigure the device. It is very important to change the community strings on the Catalyst switch immediately after you set the device on the network.
- Telnet/SSH to the Catalyst Switch
- Enter the enable password at the prompt in order to enter the enable mode
- In order to enable Read-only (RO) community string, use this command
- Cat5500> (enable) set snmp community read-only XXXX
- Note: replace XXXX with your desired community string
- Cat5500> (enable) set snmp community read-only XXXX
- In order to enable Read-write (RW) community string, use this command
- Cat5500> (enable) set snmp community read-write YYYY
- Note: replace XXXX with your desired community string
- Cat5500> (enable) set snmp community read-write YYYY
- Verify that the new community strings are added
- Cat5500> (enable) show snmp
set snmp community read-only XXXX
!
set snmp community read-write YYYY