cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
41102
Views
0
Helpful
5
Replies

How to generate snmp test traps on routers (IOS command)

hboltz
Level 1
Level 1

Is ist possible to generate a snmp test trap from cisco routers with IOS? On Catalyst switches I found the CatOS command "test snmp trap!" command but I didn't found any reference about the SNMP trap number ( <trap_num> ).

Any information would be usefull! Thanks a lot!

5 Replies 5

Not applicable

I do not think that there is an actual command to test snmp traps in the IOS. However, what I usually do to test snmp traps is create a loopback interface and shut and no shut it. That will trigger interface down traps to be sent to the management station.

Kevin

rmushtaq
Level 8
Level 8

Not there in IOS.

stwhalley
Level 1
Level 1

Make sure you have traps configured for configuration eg.

snmp-server community yourpublicstring RO

snmp-server community yourprivatestring RW

snmp-server enable traps config

snmp-server host 10.1.1.1 yourpublicstring

YVER06#term moni

YVER06#deb snmp packets

SNMP packet debugging is on

YVER06#conf t

Enter configuration commands, one per line. End with CNTL/Z.

YVER06(config)#^Z

Then watch the traps

how to use the router send snmp v2 informs instead of snmp v1 trap?

rmushtaq
Level 8
Level 8

You can create a loopback interface and then do a shut/no shut to generate the trap for testing purpose.