<div dir="ltr"><div>Hi all,</div><div><br></div><div>I'm working on sonic-frr, which is just frr. I enable frr-snmp, and follow this (<a href="http://docs.frrouting.org/en/latest/snmp.html">http://docs.frrouting.org/en/latest/snmp.html</a>) to get trap, this is my configuration:</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">root@NX-ZWYC-M1F202-A16-HW6865-A-INT-212:/# cat /etc/snmp/snmptrapd.conf<br>#<br># EXAMPLE-trap.conf:<br>#   An example configuration file for configuring the Net-SNMP snmptrapd agent.<br>#<br>###############################################################################<br>#<br># This file is intended to only be an example.<br># When the snmptrapd agent starts up, this is where it will look for it.<br>#<br># All lines beginning with a '#' are comments and are intended for you<br># to read.  All other lines are configuration commands for the agent.<br>disableAuthorization yes<br>#<br># PLEASE: read the snmptrapd.conf(5) manual page as well!<br>#<br>#authCommunity log,execute,net private<br>#authCommunity log,execute,net public<br>#authCommunity log,execute,net snmp@sankuai<br>#<br>traphandle .1.3.6.1.2.1.15.0.1 ./bgp-peer-status<br>traphandle .1.3.6.1.2.1.15.0.2 ./bgp-peer-status</blockquote><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">root@NX-ZWYC-M1F202-A16-HW6865-A-INT-212:/# cat ./bgp-peer-status<br>#!/bin/bash<br>echo `cat -` </blockquote><div><br></div><div>Then I up/down bgp peer use these command:</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">NX-ZWYC-M1F202-A16-HW6865-A-INT-212(config-router)# router bgp 65003<br>NX-ZWYC-M1F202-A16-HW6865-A-INT-212(config-router)# neighbor 192.168.10.9 shutdown<br>NX-ZWYC-M1F202-A16-HW6865-A-INT-212(config-router)# no neighbor 192.168.10.9 shutdown</blockquote><div><br></div><div>This is trap message I got, I got 2 messages, you could see, the 2 message is the same, especially in bgp peer status, I guess this is a BUG ? </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">root@NX-ZWYC-M1F202-A16-HW6865-A-INT-212:/etc/snmp# /usr/sbin/snmptrapd -f -Lo4d<br>NET-SNMP version 5.7.3<br>2019-08-15 09:42:15 172.18.8.212(via UDP: [127.0.0.1]:34916->[127.0.0.1]:162) TRAP, SNMP v1, community public<br> iso.3.6.1.2.1.15 Enterprise Specific Trap (1) Uptime: 23:59:58.54<br>     iso.3.6.1.2.1.15.3.1.14.192.168.10.9 = Hex-STRING: 06 02        iso.3.6.1.2.1.15.3.1.2.192.168.10.9 = INTEGER: 6  # This is first BGP peer status, which is Establish<br>localhost<br>UDP: [127.0.0.1]:34916->[127.0.0.1]:162<br>iso.3.6.1.2.1.1.3.0 0:23:59:58.54<br>iso.3.6.1.6.3.1.1.4.1.0 iso.3.6.1.2.1.15.0.1<br>iso.3.6.1.2.1.15.3.1.14.192.168.10.9 "06 02 "<br>iso.3.6.1.2.1.15.3.1.2.192.168.10.9 6<br>iso.3.6.1.6.3.18.1.3.0 172.18.8.212<br>iso.3.6.1.6.3.18.1.4.0 "public"<br>iso.3.6.1.6.3.1.1.4.3.0 iso.3.6.1.2.1.15<br></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">2019-08-15 09:42:22 172.18.8.212(via UDP: [127.0.0.1]:34916->[127.0.0.1]:162) TRAP, SNMP v1, community public<br>     iso.3.6.1.2.1.15 Enterprise Specific Trap (2) Uptime: 1 day, 0:00:05.65<br>       iso.3.6.1.2.1.15.3.1.14.192.168.10.9 = Hex-STRING: 06 02        iso.3.6.1.2.1.15.3.1.2.192.168.10.9 = INTEGER: 6  # This is second BGP peer status, which is also Establish<br>localhost<br>UDP: [127.0.0.1]:34916->[127.0.0.1]:162<br>iso.3.6.1.2.1.1.3.0 1:0:00:05.65<br>iso.3.6.1.6.3.1.1.4.1.0 iso.3.6.1.2.1.15.0.2<br>iso.3.6.1.2.1.15.3.1.14.192.168.10.9 "06 02 "<br>iso.3.6.1.2.1.15.3.1.2.192.168.10.9 6<br>iso.3.6.1.6.3.18.1.3.0 172.18.8.212<br>iso.3.6.1.6.3.18.1.4.0 "public"<br>iso.3.6.1.6.3.1.1.4.3.0 iso.3.6.1.2.1.15</blockquote><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>----</div>Simon Jones</div></div></div></div></div></div>