Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

infra for snmp support and linkUp/Down and Config change traps #225

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

suresh-rupanagudi
Copy link

- What I did
Infra for snmp trap generation and support for linkUp/Down and Config change traps.
- How I did it
Trap infra provides a way to applications to register db keys changes interested and callback function that needs to be called on
db change.
- How to verify it
1)Configure snmp trap receiver
2)shut/noshut interface

- Description for the changelog

UT:
1)
config snmptrap modify 2 <trap_receiver_ip>
config vlan add 100

trap revived at receiver:
11:29:04.246743 IP (tos 0x0, ttl 64, id 18847, offset 0, flags [DF], proto UDP (17), length 103)
10.59.143.181.55851 > 10.59.142.44.162: [udp sum ok] { SNMPv2c { V2Trap(60) R=647415881 .1.3.6.1.2.1.1.3.0=13371 .1.3.6.1.6.3.1.1.4.1.0=.1.3.6.1.4.1.441
3.1.2.2.1.2.0.1 } }

config interface shutdown Ethernet0

Trap received at receiver:
11:33:20.007605 IP (tos 0x0, ttl 64, id 53955, offset 0, flags [DF], proto UDP (17), length 178)
10.59.143.181.55851 > 10.59.142.44.162: [udp sum ok] { SNMPv2c { V2Trap(133) R=647417338 .1.3.6.1.2.1.1.3.0=38947 .1.3.6.1.6.3.1.1.4.1.0=.1.3.6.1.6.3.1.
1.5.3 .1.3.6.1.2.1.2.2.1.1.1=1 .1.3.6.1.2.1.2.2.1.7.1=2 .1.3.6.1.2.1.2.2.1.8.1=2 .1.3.6.1.6.3.1.1.4.3.0=.1.3.6.1.4.1.8072.3.2.10 } }

@suresh-rupanagudi
Copy link
Author

sonic-net/sonic-buildimage#8130
this pull request also required.

@lgtm-com
Copy link

lgtm-com bot commented Jul 8, 2021

This pull request introduces 4 alerts when merging 7195611 into 7a78703 - view on LGTM.com

new alerts:

  • 4 for Unused import

@lgtm-com
Copy link

lgtm-com bot commented Mar 22, 2022

This pull request introduces 4 alerts when merging defbf17 into 2654f4a - view on LGTM.com

new alerts:

  • 4 for Unused import

@praveen-ramamoorthi
Copy link

We require this change to support SNMP Link up and Link down Trap messages. Kindly let me know if any other change is required in this PR, as it's in review for a long time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants