<div dir="ltr">Oh,maybe I did not introduce clearly, I'm working on sonic-frr(<a href="https://github.com/Azure/sonic-frr">https://github.com/Azure/sonic-frr</a>), what I want to do is:<div>1. sonic-frr build FRR deb package into a docker image, but this image has no SNMP support, so I have to add SNMP support, so I ask questions above.</div><div>2. How sonic-frr build is</div><div>    - use this script to build FRR deb package, is this script build SNMP codes(/usr/lib/*/frr/modules/*_snmp.so)? I think it is.</div><div><div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;line-height:18px;white-space:pre"><div><span style="color:rgb(220,220,170)">.ONESHELL</span>:</div><div><span style="color:rgb(156,220,254)">SHELL</span> = /bin/bash</div><div><span style="color:rgb(156,220,254)">.SHELLFLAGS</span> += -e</div><br><div><span style="color:rgb(156,220,254)">MAIN_TARGET</span> = <span style="color:rgb(206,145,120)">$(</span><span style="color:rgb(156,220,254)">FRR</span><span style="color:rgb(206,145,120)">)</span></div><div><span style="color:rgb(156,220,254)">DERIVED_TARGET</span> = <span style="color:rgb(206,145,120)">$(</span><span style="color:rgb(156,220,254)">FRR_PYTHONTOOLS</span><span style="color:rgb(206,145,120)">)</span> <span style="color:rgb(206,145,120)">$(</span><span style="color:rgb(156,220,254)">FRR_DBG</span><span style="color:rgb(206,145,120)">)</span></div><br><div><span style="color:rgb(206,145,120)">$(</span><span style="color:rgb(220,220,170)">addprefix</span><span style="color:rgb(206,145,120)"> $(</span><span style="color:rgb(156,220,254)">DEST</span><span style="color:rgb(206,145,120)">)/, $(</span><span style="color:rgb(156,220,254)">MAIN_TARGET</span><span style="color:rgb(206,145,120)">))</span>: <span style="color:rgb(206,145,120)">$(</span><span style="color:rgb(156,220,254)">DEST</span><span style="color:rgb(206,145,120)">)</span>/% :</div><div>    # Build the package</div><div>    pushd ./frr</div><div>    tools/tarsource.sh -V -e '-sonic'</div><div>    dpkg-buildpackage -rfakeroot -b -us -uc -Ppkg.frr.nortrlib -j$(SONIC_CONFIG_MAKE_JOBS)</div><div>    popd</div><div>    mv $(DERIVED_TARGET) $* $(DEST)/</div><br><div><span style="color:rgb(206,145,120)">$(</span><span style="color:rgb(220,220,170)">addprefix</span><span style="color:rgb(206,145,120)"> $(</span><span style="color:rgb(156,220,254)">DEST</span><span style="color:rgb(206,145,120)">)/, $(</span><span style="color:rgb(156,220,254)">DERIVED_TARGET</span><span style="color:rgb(206,145,120)">))</span>: <span style="color:rgb(206,145,120)">$(</span><span style="color:rgb(156,220,254)">DEST</span><span style="color:rgb(206,145,120)">)</span>/% : <span style="color:rgb(206,145,120)">$(</span><span style="color:rgb(156,220,254)">DEST</span><span style="color:rgb(206,145,120)">)</span>/<span style="color:rgb(206,145,120)">$(</span><span style="color:rgb(156,220,254)">MAIN_TARGET</span><span style="color:rgb(206,145,120)">)</span></div><br></div></div><div>    - use this script to build sonic-frr docker image, is this script install SNMP codes into docker image? I think it's NOT, so I want to know how to package SNMP codes into docker image, which is how to install SNMP codes into deb package. Is it to add '<span style="background-color:rgb(30,30,30);color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;white-space:pre">-Ppkg.frr.snmp</span>' ?</div><div><div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;line-height:18px;white-space:pre"><div><span style="color:rgb(96,139,78)"># FRRouting (frr) package</span></div><br><div><span style="color:rgb(156,220,254)">FRR_VERSION</span> = 7.0.1</div><div><span style="color:rgb(156,220,254)">FRR_SUBVERSION</span> = 0</div><div><span style="color:rgb(197,134,192)">export</span> <span style="color:rgb(156,220,254)">FRR_VERSION</span> <span style="color:rgb(156,220,254)">FRR_SUBVERSION</span></div><br><br><div><span style="color:rgb(156,220,254)">FRR</span> = frr_<span style="color:rgb(206,145,120)">$(</span><span style="color:rgb(156,220,254)">FRR_VERSION</span><span style="color:rgb(206,145,120)">)</span>-sonic-<span style="color:rgb(206,145,120)">$(</span><span style="color:rgb(156,220,254)">FRR_SUBVERSION</span><span style="color:rgb(206,145,120)">)</span>_amd64.deb</div><div><span style="color:rgb(156,220,254)">$(FRR)_DEPENDS</span> += <span style="color:rgb(206,145,120)">$(</span><span style="color:rgb(156,220,254)">LIBSNMP_DEV</span><span style="color:rgb(206,145,120)">)</span> <span style="color:rgb(206,145,120)">$(</span><span style="color:rgb(156,220,254)">LIBYANG_DEV</span><span style="color:rgb(206,145,120)">)</span></div><div><span style="color:rgb(156,220,254)">$(FRR)_RDEPENDS</span> += <span style="color:rgb(206,145,120)">$(</span><span style="color:rgb(156,220,254)">LIBYANG</span><span style="color:rgb(206,145,120)">)</span></div><div><span style="color:rgb(156,220,254)">$(FRR)_SRC_PATH</span> = <span style="color:rgb(206,145,120)">$(</span><span style="color:rgb(156,220,254)">SRC_PATH</span><span style="color:rgb(206,145,120)">)</span>/sonic-frr</div><div><span style="color:rgb(156,220,254)">SONIC_MAKE_DEBS</span> += <span style="color:rgb(206,145,120)">$(</span><span style="color:rgb(156,220,254)">FRR</span><span style="color:rgb(206,145,120)">)</span></div><div><span style="color:rgb(156,220,254)">SONIC_STRETCH_DEBS</span> += <span style="color:rgb(206,145,120)">$(</span><span style="color:rgb(156,220,254)">FRR</span><span style="color:rgb(206,145,120)">)</span></div><br><div><span style="color:rgb(156,220,254)">FRR_PYTHONTOOLS</span> = frr-pythontools_<span style="color:rgb(206,145,120)">$(</span><span style="color:rgb(156,220,254)">FRR_VERSION</span><span style="color:rgb(206,145,120)">)</span>-sonic-<span style="color:rgb(206,145,120)">$(</span><span style="color:rgb(156,220,254)">FRR_SUBVERSION</span><span style="color:rgb(206,145,120)">)</span>_all.deb</div><div>$(eval $(call add_derived_package,$(FRR),$(FRR_PYTHONTOOLS)))</div><br><div><span style="color:rgb(156,220,254)">FRR_DBG</span> = frr-dbgsym_<span style="color:rgb(206,145,120)">$(</span><span style="color:rgb(156,220,254)">FRR_VERSION</span><span style="color:rgb(206,145,120)">)</span>-sonic-<span style="color:rgb(206,145,120)">$(</span><span style="color:rgb(156,220,254)">FRR_SUBVERSION</span><span style="color:rgb(206,145,120)">)</span>_amd64.deb</div><div>$(eval $(call add_derived_package,$(FRR),$(FRR_DBG)))</div><br><div><span style="color:rgb(197,134,192)">export</span> <span style="color:rgb(156,220,254)">FRR</span> <span style="color:rgb(156,220,254)">FRR_PYTHONTOOLS</span> <span style="color:rgb(156,220,254)">FRR_DBG</span></div><br></div></div><div>    - use docker command to install this image</div><div><div><br></div><div>Thanks ~</div><div><br></div><div><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><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">David Lamparter <<a href="mailto:equinox@diac24.net">equinox@diac24.net</a>> 于2019年8月1日周四 下午5:05写道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, Aug 01, 2019 at 03:56:40PM +0800, Simon Jones wrote:<br>
> 1. In this doc (<a href="http://docs.frrouting.org/en/latest/snmp.html" rel="noreferrer" target="_blank">http://docs.frrouting.org/en/latest/snmp.html</a>), I think<br>
> SNMP related code in FRR is<br>
>     - snmp codes of each module, like zebra or bgpd, which is located in<br>
> .../modules/zebra_snmp.so. And these codes is load while zebra or bgpd<br>
> start up? These codes response for report snmp events in zebra or bgpd<br>
> modules by protocol to agentX?<br>
>     - AgentX, which is used to receive these snmp events and call snmp traps<br>
<br>
I'm having some trouble understanding your questions, but the modules<br>
are installed to /usr/lib/*/frr/modules/*_snmp.so and loaded at startup<br>
with the "-M snmp" option.<br>
<br>
> 2. So I want to start zebra with zebra_snmp.so. But I got errors which tell<br>
> me there is no zebra_snmp.so. So I check build process, then I have<br>
> questions in the email above.<br>
<br>
Then the frr-snmp package is not installed.  There is no problem with<br>
the build process.  Unless you modify the Debian package - or the<br>
package build didn't complete successfully - SNMP support is enabled for<br>
Debian packages.<br>
<br>
> 3. Is there some docs about how to build, package, install and use<br>
> frr-snmp? As this(<a href="http://docs.frrouting.org/en/latest/snmp.html" rel="noreferrer" target="_blank">http://docs.frrouting.org/en/latest/snmp.html</a>) is not<br>
> very clear.<br>
>     - <a href="http://docs.frrouting.org/en/latest/snmp.html" rel="noreferrer" target="_blank">http://docs.frrouting.org/en/latest/snmp.html</a> tell me SNMP support<br>
> compile is just use `--enable-snmp`. But as I said above, there is<br>
> zebra_snmp.so in compile log, but no zebra_snmp.so in packages I installed.<br>
>     - <a href="http://docs.frrouting.org/en/latest/snmp.html" rel="noreferrer" target="_blank">http://docs.frrouting.org/en/latest/snmp.html</a> tell me SNMP support<br>
> could be started by `--module <module:snmp>`, but when I start, report<br>
> error log that 'there is no zebra_snmp.so in .../modules/'<br>
<br>
There is nothing to change to enable SNMP support in Debian packages.<br>
You just need to install the frr-snmp package and add the "-M snmp" /<br>
"--module snmp" (same option) to your config.<br>
<br>
> 4. So could someone tell me clear steps on:<br>
>     - How to installed *additionally* to the "frr" package.<br>
<br>
apt-get install frr-snmp<br>
or<br>
dpkg -i frr-snmp_*.deb<br>
<br>
>     - How to start SNMP support in system.<br>
<br>
You seem to have that in place already since you're getting the<br>
"zebra_snmp.so not found" error.<br>
<br>
<br>
-David<br>
</blockquote></div>