How to configure SNMPv2 on Cisco IOS Router

Besides syslog there is another method to store logging information to an external server. SNMP (Simple Network Management Protocol) can be used to collect statistics from network devices including Cisco routers and switches.
SNMP consists of 2 items:

  • NMS (Network Management System)
  • SNMP Agents

The NMS is the external server where you want to store logging information. The SNMP agents run on the network devices that we want to monitor. The NMS can query a SNMP agent to collect information from the network device. SNMP has multiple versions, the most popular ones being:

SNMP version 3 offers security through authentication and encryption which SNMP version 2c does not. SNMP version 2c however is still pretty common. Let me show you a simple example for SNMP version 2c:

Router(config)#snmp-server community TSHOOT ro

First we’ll have to configure a community string. Think of this as a password that the SNMP agent and NMS have to agree upon. I called mine “TSHOOT”. The ro stands for read-only. SNMP isn’t just for retrieving information; we can also use it to configure our network devices. Let’s continue…

Router(config)#snmp-server location Amsterdam
Router(config)#snmp-server contact info@networklessons.com

These two steps are not required but it’s useful to specify a location and contact. This way you’ll at least know where the device is located whenever you receive information through SNMP. The messages that the SNMP agent sends to the NMS are called SNMP traps. Of course we want to send these to an external server so I’ll configure the IP address of the SNMP server:

We're Sorry, Full Content Access is for Members Only...

If you like to keep on reading, Become a Member Now! Here is why:

  • Learn any CCNA, CCNP and CCIE R&S Topic. Explained As Simple As Possible.
  • Try for Just $1. The Best Dollar You’ve Ever Spent on Your Cisco Career!
  • Full Access to our 710 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)

466 Sign Ups in the last 30 days

satisfaction-guaranteed
100% Satisfaction Guaranteed!
You may cancel your monthly membership at any time.
No Questions Asked!

Tags:


Forum Replies

  1. Hi Rene,

    This command to specify the Cisco router as Agent and send snmp trap to the NMS server?

    snmp-server host 192.168.12.2 version 2c TSHOOT

    So the NMS server is 192.168.12.2 and the TSHOOT is community string of 192.168.12.2?

    Davis

  2. Hi Zaman,

    If you use the snmp-server enable traps command then it will enable all traps yes.

    If you don’t want to use traps, you only have to set a community. Your NMS can then reach the network device and access it.

    Rene

  3. Hello Aniket

    SNMP is a protocol that not only monitors network devices, but can also change their configurations. SNMP uses seven PDU types. Only one of those, SetRequest, is used to modify something in the config of the device. Specifically it is a request from an SNMP manager to an agent to change the value of a variable or list of variables. This is the PDU that requires the RW community string.

    The RW community string is not involved in config backups, but in actual changes to the config itself.

    I hope this has been helpful!

    Laz

  4. There’s a lab in GNS3VAULT that states the following:

    Configure router Agent so it doesn’t send any traps or informs when something happens with the loopback0 interface.

    How do you accomplish this?

11 more replies! Ask a question or join the discussion by visiting our Community Forum