5.2.2.6 Lab - Configuring SNMP
5.2.2.6 Lab - Configuring SNMP
Topology
Addressing Table
Objectives
Part 1: Build the Network and Configure Basic Device Settings
Part 2: Configure an SNMPv2 Manager and Agent
Part 3: Configure an SNMPv3 Manager and Agent
Background / Scenario
Simple Network Management Protocol (SNMP) is a network management protocol and an IETF standard
which can be used to both monitor and control clients on the network. SNMP can be used to get and set
variables related to the status and configuration of network hosts like routers and switches, as well as network
client computers. The SNMP manager can poll SNMP agents for data, or data can be automatically sent to
the SNMP manager by configuring traps on the SNMP agents.
In this lab, you will download, install, and configure SNMP management software on PC-A. You will also
configure a Cisco router and Cisco switch as SNMP agents. After capturing SNMP notification messages from
the SNMP agent, you will convert the MIB/Object ID codes to learn the details of the messages using the
Cisco SNMP Object Navigator.
Note: The routers used with CCNA hands-on labs are Cisco 1941 Integrated Services Routers (ISRs) with
Cisco IOS Release 15.4(3) (universalk9 image). The switches used are Cisco Catalyst 2960s with Cisco IOS
Release 15.0(2) (lanbasek9 image). Other routers, switches and Cisco IOS versions can be used. Depending
on the model and Cisco IOS version, the commands available and output produced might vary from what is
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 1 of 12
Lab – Configuring SNMP
shown in the labs. Refer to the Router Interface Summary Table at the end of the lab for the correct interface
identifiers.
Note: Make sure that the routers and switches have been erased and have no startup configurations. If you
are unsure, contact your instructor.
Note: The snmp-server commands in this lab will cause the Cisco 2960 switch to issue a warning message
when saving the configuration file to NVRAM. To avoid this warning message verify that the switch is using
the lanbase-routing template. The IOS template is controlled by the Switch Database Manager (SDM).
When changing the preferred template, the new template will be used after reboot even if the configuration is
not saved.
S1# show sdm prefer
Use the following commands to assign the lanbase-routing template as the default SDM template.
S1# configure terminal
S1(config)# sdm prefer lanbase-routing
S1(config)# end
S1# reload
Required Resources
2 Routers (Cisco 1941 with Cisco IOS, Release 15.4(3) universal image or comparable)
1 Switch (Cisco 2960 with Cisco IOS Release 15.0(2) lanbasek9 image or comparable)
1 PC (Windows with terminal emulation program, such as Tera Term, SNMP manager, such as SNMP
MIB Browser by ManageEngine, and Wireshark)
Console cables to configure the Cisco IOS devices via the console ports
Ethernet and serial cables as shown in the topology
SNMP Management Software (SNMP MIB Browser by ManageEngine)
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 2 of 12
Lab – Configuring SNMP
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 3 of 12
Lab – Configuring SNMP
the SNMP manager location and contact commands provide descriptive contact information. Line 4 specifies
the IP address of the host that will receive SNMP notifications, the SNMP version, and the community string.
Line 5 enables all default SNMP traps, and lines 6 and 7 create the named access list, to control which hosts
are permitted to get SNMP information from the switch.
S1(config)# snmp-server community ciscolab ro SNMP_ACL
S1(config)# snmp-server location Company_HQ
S1(config)# snmp-server contact [email protected]
S1(config)# snmp-server host 192.168.1.3 version 2c ciscolab
S1(config)# snmp-server enable traps
S1(config)# ip access-list standard SNMP_ACL
S1(config-std-nacl)# permit 192.168.1.3
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 4 of 12
Lab – Configuring SNMP
d. Click Start after you have verified the settings. The TrapList field displays 162:ciscolab.
e. To generate SNMP messages, configure and enable SVI on S1. Use the IP address 192.168.1.2 /24 for
VLAN 1 and disable and enable the interface.
f. Enter the show snmp command to verify the SNMP messages were sent.
S1# show snmp
Chassis: FCQ1628Y5MG
Contact: [email protected]
Location: Company_HQ
0 SNMP packets input
0 Bad SNMP version errors
0 Unknown community name
0 Illegal operation for community name supplied
0 Encoding errors
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 5 of 12
Lab – Configuring SNMP
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 6 of 12
Lab – Configuring SNMP
it includes the iso tree from the MIB. In line 5, an SNMP group is configured with the name ADMIN, is set to
SNMPv3 with authentication and encryption required, and only allows access limit to hosts permitted in the
PERMIT-ADMIN ACL. Line 5 defines a user named USER1 with the group ADMIN. Authentication is set to
use SHA with the password cisco12345 and encryption is set for AES 128 with cisco54321 as the configured
password.
R1(config)# ip access-list standard PERMIT-ADMIN
R1(config-std-nacl)# permit 192.168.1.0 0.0.0.255
R1(config-std-nacl)# exit
R1(config)# snmp-server view SNMP-RO iso included
R1(config)# snmp-server group ADMIN v3 priv read SNMP-RO access PERMIT-ADMIN
R1(config)# snmp-server user USER1 ADMIN v3 auth sha cisco12345 pri aes 128
cisco54321
R1(config)#
*Aug 5 02:52:50.715: Configuring snmpv3 USM user, persisting
snmpEngineBoots. Please Wait...
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 7 of 12
Lab – Configuring SNMP
d. Enter the SNMPv3 settings that were configured on R1. Click OK to continue.
e. Click Edit > Find Node. Enter ipAddrTable in the Find What field and click Close. Verify ipAddrTable is
selected in the left panel and .iso.org.dod.internet.mgmt.mib-2.ip.ipAddrTable is listed in the ObjectID
field.
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 8 of 12
Lab – Configuring SNMP
f. Click Operation > GET to get all the objects under the select MIB object, ipAddrTable in this instance.
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 9 of 12
Lab – Configuring SNMP
i. Click Edit for the Users Table. Click New and enter user information in Step 1. Click OK.
j. Click OK to accept the user information. Click OK again to exit the Wireshark Preferences window.
k. Select one of the lines. Expand the SNMP result and view the decrypted messages.
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 10 of 12
Lab – Configuring SNMP
Reflection
1. What are some of the potential benefits of monitoring a network with SNMP?
It helps to monitor and then configure hosts across the network
_______________________________________________________________________________________
2. Why is it preferable to solely use read-only access when working with SNMPv2?
Because v2 is unencrypted, so it would be a security risk to give write access
_______________________________________________________________________________________
3. What are the benefits of using SNMPv3 over SNMPv2?
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 11 of 12
Lab – Configuring SNMP
Router Model Ethernet Interface #1 Ethernet Interface #2 Serial Interface #1 Serial Interface #2
1800 Fast Ethernet 0/0 Fast Ethernet 0/1 Serial 0/0/0 (S0/0/0) Serial 0/0/1 (S0/0/1)
(F0/0) (F0/1)
1900 Gigabit Ethernet 0/0 Gigabit Ethernet 0/1 Serial 0/0/0 (S0/0/0) Serial 0/0/1 (S0/0/1)
(G0/0) (G0/1)
2801 Fast Ethernet 0/0 Fast Ethernet 0/1 Serial 0/1/0 (S0/1/0) Serial 0/1/1 (S0/1/1)
(F0/0) (F0/1)
2811 Fast Ethernet 0/0 Fast Ethernet 0/1 Serial 0/0/0 (S0/0/0) Serial 0/0/1 (S0/0/1)
(F0/0) (F0/1)
2900 Gigabit Ethernet 0/0 Gigabit Ethernet 0/1 Serial 0/0/0 (S0/0/0) Serial 0/0/1 (S0/0/1)
(G0/0) (G0/1)
Note: To find out how the router is configured, look at the interfaces to identify the type of router and how many
interfaces the router has. There is no way to effectively list all the combinations of configurations for each router
class. This table includes identifiers for the possible combinations of Ethernet and Serial interfaces in the device.
The table does not include any other type of interface, even though a specific router may contain one. An
example of this might be an ISDN BRI interface. The string in parenthesis is the legal abbreviation that can be
used in Cisco IOS commands to represent the interface.
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 12 of 12