How to configure SNMPv2 on Cisco IOS Router


(Rene Molenaar) #1

This topic is to discuss the following lesson:


(Abdi M) #2

Hi Rene,

Are those the only commands to enter the router to get SNMP v2 going? How about the client side?

Thank you in advance.

 

Abdi


(Rene Molenaar) #3

Hi Abdi,

That’s all you need to get it going yes. If you want to test this, I can highly recommend to try LibreNMS:

Rene


(Davis W) #4

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


(Rene Molenaar) #5

Hi Davis,

That’s right. Don’t forget to use the snmp-server enable traps command to specify which traps you want to send.

If you don’t want to use traps, setting the community with the snmp-server community command is all you need. You can use this if you want to read the router/switch with a NMS.

Rene


(Davis W) #6

Thanks Rene :slight_smile:


(Mohammad Hasanuz Zaman) #7

Hi Rene,

I didnt understand the line…

“If you don’t want to use traps, setting the community with the snmp-server community command is all you need”

If we enter “snmp-server enable traps” command then all traps will be enable, right ?

br//
zaman


(Rene Molenaar) #8

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


(aniket g) #9

Hello Rene/Laz,

In which scenarios we use rw community ? I understand we can configure device remotely if rw string is configured, could you please explain this in detail (As never seen it practically). Suppose we we are taking config backup of device on daily basis using solarwinds , do we need rw community string as a prerequisite ?


(Lazaros Agapides) #10

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


(Mike C) #11

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?


(Lazaros Agapides) #12

Hello Mike

You can disable SNMP traps on an interface by issuing the following command in the interface mode:

Router(config-if)# snmp trap if-monitor

This will disable all SNMP monitoring (traps and informs) on that particular interface.

I hope this has been helpful!

Laz


(Mike C) #13

It has. Thank you very much!