cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
232
Views
5
Helpful
5
Replies
Highlighted
Beginner

Nexus 9000 not generating traps !!

Hi Community,

 

We have configured SNMP on a couple of Nexus 9k. All devices are using the same SNMP config.

 

The monitoring system is able to poll all the devices and also generate network map with all active connections, so communication seems ok. 

 

However only 2 of the devices are able to send traps ( the NMS is receiving traps only from these 2 devices). There is no trap(not even any log in tcpdump) when making a test like up/down an interface(I am not sure if this generates a trap)

 

Is there a test trap to be simulated in order to check if the NMS can get?

 

Also on the SNMP configuration, I try to enable snmp-server traps link. The command is accepted but it is not showing on the running-config.

 

Thanks in advance,

 

Nikola

Everyone's tags (3)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Cisco Employee

Re: Nexus 9000 not generating traps !!

A non-disruptive test could be trapping on a feature change. In this example here I'll use `feature bash` which enabled/disabled the BASH shell. First check to see what state you have the feature in (on/off). There should be no disruption turning this feature on/off but I would always recommended to do it during a window/quiet time.

Leaf-9(config)# snmp-server enable traps feature-control FeatureOpStatusChange
Leaf-9(config)# 
! Check if feature is currently enabled/disabled (it's on in my case)Leaf-9(config)# show feature | i i bash
bash-shell 1 enabled
Leaf-9(config)# no feature bash
Leaf-9(config)#

Leaf-9# ethanalyzer local interface mgmt display-filter "snmp" limit-cap 0
Capturing on mgmt0
2020-03-27 11:11:13.775465 10.66.50.37 -> 192.0.2.1 SNMP trap iso.3.6.1.4.1.9.9.377 1.3.6.1.4.1.9.9.377.1.1.2.1.8.153.1

 

View solution in original post

5 REPLIES 5
Highlighted
Cisco Employee

Re: Nexus 9000 not generating traps !!

Hi Nikola,

I just did a quick test in my lab 

Leaf-9(config)# show run snmp

!Command: show running-config snmp
[ snip ]
snmp-server host 192.0.2.1 traps version 1 public
snmp-server host 192.0.2.1 source-interface mgmt0
[ snip ]

! ! Change mgmt -> inband if you're not using mgmt0, VRF management for traps
! To stop the output hit ctrl + c
! If you want a more specific filter you can use display-filter "snmp && ip.addr==a.b.c.d"

! Leaf-9(config)# ethanalyzer local interface mgmt display-filter "snmp" limit-cap 0 Capturing on mgmt0 2020-03-26 20:40:06.137982 10.66.50.37 -> 192.0.2.1 SNMP trap iso.3.6.1.4.1.9.9.276 1.3.6.1.2.1 .2.2.1.1.436207616 1.3.6.1.2.1.2.2.1.7.436207616 1.3.6.1.2.1.2.2.1.8.436207616 1.3.6.1.2.1.31.1.1.1 .1.436207616 1.3.6.1.2.1.2.2.1.3.436207616

This will let you know if the switch is actually trying send the trap at all. Replace a.b.c.d with the IP destination of the trap server.

You can also run the commands below to check the default configuration for snmp/traps on the switch. From my switches default configuration I have "snmp trap link-status" on by default. I was able to generate the above traps but just flapping eth1/1.

show run int ex/y all | i i trap
show run all | i i snmp|trap

  HTH
  Regards,
  Jason.

Highlighted
Beginner

Re: Nexus 9000 not generating traps !!

Hi Jason,

Thanks for the reply. Very helpful commands to check the activity on the switch.

 

In my case, I did a shut/no shut on a not connected interface since this is a setup in production. I am afraid this cannot generate a trap.

 

So I my question is, how to simulate a trap remotely. I don't have physical access to the device, where maybe a redundant power supply removal could generate a trap.

 

Thanks,

Nikola

Highlighted
Cisco Employee

Re: Nexus 9000 not generating traps !!

A non-disruptive test could be trapping on a feature change. In this example here I'll use `feature bash` which enabled/disabled the BASH shell. First check to see what state you have the feature in (on/off). There should be no disruption turning this feature on/off but I would always recommended to do it during a window/quiet time.

Leaf-9(config)# snmp-server enable traps feature-control FeatureOpStatusChange
Leaf-9(config)# 
! Check if feature is currently enabled/disabled (it's on in my case)Leaf-9(config)# show feature | i i bash
bash-shell 1 enabled
Leaf-9(config)# no feature bash
Leaf-9(config)#

Leaf-9# ethanalyzer local interface mgmt display-filter "snmp" limit-cap 0
Capturing on mgmt0
2020-03-27 11:11:13.775465 10.66.50.37 -> 192.0.2.1 SNMP trap iso.3.6.1.4.1.9.9.377 1.3.6.1.4.1.9.9.377.1.1.2.1.8.153.1

 

View solution in original post

Highlighted
Beginner

Re: Nexus 9000 not generating traps !!

Hi Jason,

 

Thanks for your support.

 

At last I enabled the trap "config" which sends a trap if any changes are made to the running-config or startup-config. 

This allowed to make some simple changes like interface description and a trap was generated successfully.

 

BR,

Nikola

Highlighted
Cisco Employee

Re: Nexus 9000 not generating traps !!

Perfect! Glad to see everything is working =)

CreatePlease to create content
Content for Community-Ad

Cisco COVID-19 Survey