how to configure snmp trap to send only when linkup linkdown

  • 0
  • 1
  • Problem
  • Updated 2 years ago
  • Solved
  • (Edited)
how to configure snmp trap to send only when linkup linkdown.
i don't want other alarm. only for linkup and linkdown. 
the switch will only send traps for linkUp and linkDown?

System Type:      X250e-24t

Secondary ver:    12.1.3.14 
Photo of Paul

Paul

  • 2,026 Points 2k badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of Bernhard Gruenwald

Bernhard Gruenwald

  • 250 Points 250 badge 2x thumb
enable snmp traps port-up-down ports <portlist>
Photo of Paul

Paul

  • 2,026 Points 2k badge 2x thumb
thanks Bernhard,

Understand that command will send trap about linkup linkdown.
enable snmp traps port-up-down ports all

so how to disable other snmp traps not to send.

thanks.
Photo of Pala, Zdenek

Pala, Zdenek, Employee

  • 8,442 Points 5k badge 2x thumb
I would try to define snmpview with corresponding OIDs only. Then you can use this view for notification. When you configure access rights you define readview, writeview and notifyview. I believe this is the righr way...


Good luck
(Edited)
Photo of Paul

Paul

  • 2,026 Points 2k badge 2x thumb
Hi Pala,

thank you for the advice. could you explain more about configuration on it. how to configure snmp trap to send only when linkup linkdown

thanks
Photo of Pala, Zdenek

Pala, Zdenek, Employee

  • 8,442 Points 5k badge 2x thumb
the USM (snmpv3) does have following construction:

Configure snmp-user credentials:
#configure snmpv3 add user snmpuser authentication md5 authcred privacy privcred

Add snmp-user to the group:
#configure snmpv3 add group RW user snmpuser sec-model usm

define what the group can do:
#configure snmpv3 ad access RW sec-model usm sec-level priv read-view ViewAll write-view ViewAll notify-view ViewAll

the "ViewAll" can be defined:
#configure snmpv3 add mib-view ViewAll subtree 1.0.0.0/0

in your case:
#configure snmpv3 ad access RW sec-model usm sec-level priv notify-view ViewPortUpDown
#configure snmpv3 add mib-view ViewAll subtree xxxxxx

check what is the OID for the port-up/port-down and replace the xxxxx with your OIDs

the next step will be to configure the snmptrap / inform to be sent with these credentials
Photo of Paul

Paul

  • 2,026 Points 2k badge 2x thumb
Hi Pala,

Thank you and it is very informative. Really appreciate your help on this.