[dev] How to build FRR with snmp supported ?

Simon Jones batmanustc at gmail.com
Thu Aug 1 03:56:40 EDT 2019


Thank you ! BUT I still have these questions, I don't know if I'm wrong:

1. In this doc (http://docs.frrouting.org/en/latest/snmp.html), I think
SNMP related code in FRR is
    - snmp codes of each module, like zebra or bgpd, which is located in
.../modules/zebra_snmp.so. And these codes is load while zebra or bgpd
start up? These codes response for report snmp events in zebra or bgpd
modules by protocol to agentX?
    - AgentX, which is used to receive these snmp events and call snmp traps

2. So I want to start zebra with zebra_snmp.so. But I got errors which tell
me there is no zebra_snmp.so. So I check build process, then I have
questions in the email above.

3. Is there some docs about how to build, package, install and use
frr-snmp? As this(http://docs.frrouting.org/en/latest/snmp.html) is not
very clear.
    - http://docs.frrouting.org/en/latest/snmp.html tell me SNMP support
compile is just use `--enable-snmp`. But as I said above, there is
zebra_snmp.so in compile log, but no zebra_snmp.so in packages I installed.
    - http://docs.frrouting.org/en/latest/snmp.html tell me SNMP support
could be started by `--module <module:snmp>`, but when I start, report
error log that 'there is no zebra_snmp.so in .../modules/'

4. So could someone tell me clear steps on:
    - How to installed *additionally* to the "frr" package.
    - How to start SNMP support in system.

Thank you~

----
Simon Jones


David Lamparter <equinox at diac24.net> 于2019年8月1日周四 下午3:36写道:

> SNMP support is in a separate debian package called "frr-snmp".  It is
> installed *additionally* to the "frr" package.
>
> -David
>
>
> On Thu, Aug 01, 2019 at 03:31:11PM +0800, Simon Jones wrote:
> > Hi all,
> >
> > I'm working on FRR, and I want bgpd and zebra to support snmp like this (
> > http://docs.frrouting.org/en/latest/snmp.html).
> > As I want to handle peer down/up events.
> >
> > So I use this script to build :
> > .ONESHELL:
> > SHELL = /bin/bash
> > .SHELLFLAGS += -e
> >
> > MAIN_TARGET = $(FRR)
> > DERIVED_TARGET = $(FRR_PYTHONTOOLS) $(FRR_DBG)
> >
> > $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
> >     # Build the package
> >     pushd ./frr
> >     tools/tarsource.sh -V -e '-sonic'
> >     dpkg-buildpackage -rfakeroot -b -us -uc -Ppkg.frr.nortrlib
> > -j$(SONIC_CONFIG_MAKE_JOBS)
> >     popd
> >     mv $(DERIVED_TARGET) $* $(DEST)/
> >
> > $(addprefix $(DEST)/, $(DERIVED_TARGET)): $(DEST)/% :
> $(DEST)/$(MAIN_TARGET)
> >
> >
> > In build log, I found there are zebra_snmp.so, and I found in this folder
> >
> > > $ find -name zebra_snmp.so
> > > ./frr/zebra/.libs/zebra_snmp.so
> > >
> ./frr/debian/frr-snmp/usr/lib/x86_64-linux-gnu/frr/modules/zebra_snmp.so
> > > ./frr/debian/tmp/usr/lib/x86_64-linux-gnu/frr/modules/zebra_snmp.so
> >
> >
> > But at last, in deb package, this is no zebra_snmp.so and other snmp.so
> in
> > modules folder, and actually there is no modules folder.
> >
> > So how to build with these modules and snmp support like that URL?
> >
> > Will this be work?
> > 1. Add '-Ppkg.frr.snmp' in 'dpkg-buildpackage' step? Or
> > 2. Use some old version?
> >
> > Thank you~
> >
> > ----
> > Simon Jones
>
> > _______________________________________________
> > dev mailing list
> > dev at lists.frrouting.org
> > https://lists.frrouting.org/listinfo/dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.frrouting.org/pipermail/dev/attachments/20190801/af48761c/attachment.html>


More information about the dev mailing list