Now that the sample network in this chapter has been configured and is operational, the switches should be configured so that management stations can gather information via the Simple Network Management Protocol (SNMP). SNMP is used to gather statistics, counters, and tables in the Management Information Base (MIB) of a device.
The SNMP framework consists of three parts:
SNMP manager
SNMP agent
MIB
The SNMP manager is a host that monitors the activities of network devices using SNMP. The SNMP manager is typically referred to as the Network Management Station (NMS). The SNMP agent is software running on the device being monitored by the SNMP manager. A MIB is a virtual storage area for network management information consisting of collections of managed objects. MIBs are written in the SNMP MIB module language as defined in RFCs 2578, 2579, and 2580. SNMP agents can be configured to allow read-only or read-write access to the device. Management stations like CiscoWorks use the read-only functions of the agent to monitor the device, and can use the read-write functions of the agent to make changes to the device configuration. SNMP uses passwords called community strings to grant access to the SNMP agent. Access to the agents can be further limited via SNMP access lists.
A detailed discussion of SNMP and network management is beyond the scope of this book. SNMP MIB information for each Cisco device can be found on Cisco.com.
You should configure SNMP on each Cisco device to be monitored by NMS. A sample SNMP configuration is shown on SW1 in Example 7-55.
SW1#config t Enter configuration commands, one per line. End with CNTL/Z. SW1(config)#access-list 10 permit 10.10.10.2 SW1(config)#snmp enable SW1(config)#snmp-server community alpha ro 10 SW1(config)#snmp-server community beta rw 10 SW1(config)#snmp-server contact John Smith (555)789-2653 SW1(config)#snmp-server location Denver Data Center SW1(config)#snmp enable traps SW1(config)#snmp trap-source lo0
After SNMP is configured on SW1, the statistics can be viewed using the show snmp command, as shown in Example 7-56.
SW1#show snmp
Chassis: SAD050814BH
Contact: John Smith (555)789-2653
Location: Denver Data Center
0 SNMP packets input
0 Bad SNMP version errors
0 Unknown community name
0 Illegal operation for community name supplied
0 Encoding errors
0 Number of requested variables
0 Number of altered variables
0 Get-request PDUs
0 Get-next PDUs
0 Set-request PDUs
0 SNMP packets output
0 Too big errors (Maximum packet size 1500)
0 No such name errors
0 Bad values errors
0 General errors
0 Response PDUs
0 Trap PDUs
SNMP logging: disabled