Simple Network Management Protocol (SNMP) is a key feature to enable on any cisco network device so you can gather stats and other valuable data from the device. SNMP data can be sent from a failing device indicating trouble, interfaces down, environmental data and simple configuration changes. Contacting a device and pulling data can also provide key data to show health, traffic, errors and state changes of interfaces. No matter the size of the network involved, number of devices or size of the support team – SNMP should be enabled for even simple monitoring.
SNMP needs to have a community string set for read-only access and read-write access. For monitoring and health information, only enable read-only access. A unique community string and access should be configured for your Cisco device. The community string is the password polling devices will use to pull information, and the access list will restrict who can access data. A simple example is:
Cisco router / switch running IOS:
access-list 10 permit 10.1.1.1
SNMP-server community SECRET ro 10
Cisco switch running CatOS:
set SNMP community read-only SECRET
set ip permit enable SNMP
This will enable the router or switch to allow polling requests from any host on access-list 10, using the community string SECRET. Now that access is granted, a variety of information can be pulled, a common place to start is gathering interface traffic. From a monitoring station or software, you can then pull SNMP data from the device by walking the device and revealing information and SNMP OIDs to indicate health, traffic and start to monitor key systems.
An example is walking a device for interface data or using some mrtg unix utilities such as cfgmaker that comes with MRTG to then build a configuration file that gets interface traffic data from the device. If the community string is miss-configured when using cfgmaker or if the router or switch acl doesn't permit your host to connect, a working config file will not be made. Once a successful file is made, you can then use MRTG to poll the router or switch every few minutes, get that SNMP data, then generate logs and graphs showing traffic usage on a per port basis.
Specifc SNMP oid information and other examples are available at: http://www.mrtgexamples.com .