agentx: add appropriate documentation

This commit is contained in:
Vincent Bernat 2012-05-25 12:04:51 +02:00
parent b7c0d0651c
commit 0ff4b9c967
2 changed files with 83 additions and 11 deletions

View File

@ -7,7 +7,7 @@ provides TCP/IP based routing services with routing protocols support such
as RIPv1, RIPv2, RIPng, OSPFv2, OSPFv3, BGP-4, and BGP-4+ (@pxref{Supported as RIPv1, RIPv2, RIPng, OSPFv2, OSPFv3, BGP-4, and BGP-4+ (@pxref{Supported
RFCs}). Quagga also supports special BGP Route Reflector and Route Server RFCs}). Quagga also supports special BGP Route Reflector and Route Server
behavior. In addition to traditional IPv4 routing protocols, Quagga also behavior. In addition to traditional IPv4 routing protocols, Quagga also
supports IPv6 routing protocols. With SNMP daemon which supports SMUX supports IPv6 routing protocols. With SNMP daemon which supports SMUX and AgentX
protocol, Quagga provides routing protocol MIBs (@pxref{SNMP Support}). protocol, Quagga provides routing protocol MIBs (@pxref{SNMP Support}).
Quagga uses an advanced software architecture to provide you with a high Quagga uses an advanced software architecture to provide you with a high
@ -238,6 +238,9 @@ J. Chu, Editor. July 1994.}
@cite{OSPF Version 2 Management Information Base. F. Baker, R. Coltun. @cite{OSPF Version 2 Management Information Base. F. Baker, R. Coltun.
November 1995.} November 1995.}
@item @asis{RFC2741}
@cite{Agent Extensibility (AgentX) Protocol. M. Daniele, B. Wijnen. January 2000.}
@end table @end table
@node How to get Quagga @node How to get Quagga

View File

@ -5,11 +5,12 @@
feature for collecting network information from router and/or host. feature for collecting network information from router and/or host.
Quagga itself does not support SNMP agent (server daemon) functionality Quagga itself does not support SNMP agent (server daemon) functionality
but is able to connect to a SNMP agent using the SMUX protocol but is able to connect to a SNMP agent using the SMUX protocol
(@cite{RFC1227}) and make the routing protocol MIBs available through (@cite{RFC1227}) or the AgentX protocol (@cite{RFC2741}) and make the
it. routing protocol MIBs available through it.
@menu @menu
* Getting and installing an SNMP agent:: * Getting and installing an SNMP agent::
* AgentX configuration::
* SMUX configuration:: * SMUX configuration::
* MIB and command reference:: * MIB and command reference::
* Handling SNMP Traps:: * Handling SNMP Traps::
@ -18,20 +19,82 @@ it.
@node Getting and installing an SNMP agent @node Getting and installing an SNMP agent
@section Getting and installing an SNMP agent @section Getting and installing an SNMP agent
There are several SNMP agent which support SMUX. We recommend to use the latest There are several SNMP agent which support SMUX or AgentX. We recommend to use the latest
version of @code{net-snmp} which was formerly known as @code{ucd-snmp}. version of @code{net-snmp} which was formerly known as @code{ucd-snmp}.
It is free and open software and available at @uref{http://www.net-snmp.org/} It is free and open software and available at @uref{http://www.net-snmp.org/}
and as binary package for most Linux distributions. and as binary package for most Linux distributions.
@code{net-snmp} has to be compiled with @code{--with-mib-modules=smux} to @code{net-snmp} has to be compiled with @code{--with-mib-modules=agentx} to
be able to accept connections from Quagga. be able to accept connections from Quagga using AgentX protocol or with
@code{--with-mib-modules=smux} to use SMUX protocol.
Nowadays, SMUX is a legacy protocol. The AgentX protocol should be
preferred for any new deployment. Both protocols have the same coverage.
@node AgentX configuration
@section AgentX configuration
To enable AgentX protocol support, Quagga must have been build with the
@code{--enable-snmp} or @code{--enable-snmp=agentx} option. Both the
master SNMP agent (snmpd) and each of the Quagga daemons must be
configured. In @code{/etc/snmp/snmpd.conf}, @code{master agentx}
directive should be added. In each of the Quagga daemons, @code{agentx}
command will enable AgentX support.
@example
/etc/snmp/snmpd.conf:
#
# example access restrictions setup
#
com2sec readonly default public
group MyROGroup v1 readonly
view all included .1 80
access MyROGroup "" any noauth exact all none none
#
# enable master agent for AgentX subagents
#
master agentx
/etc/quagga/ospfd.conf:
! ... the rest of ospfd.conf has been omitted for clarity ...
!
agentx
!
@end example
Upon successful connection, you should get something like this in the
log of each Quagga daemons:
@example
2012/05/25 11:39:08 ZEBRA: snmp[info]: NET-SNMP version 5.4.3 AgentX subagent connected
@end example
Then, you can use the following command to check everything works as expected:
@example
# snmpwalk -c public -v1 localhost .1.3.6.1.2.1.14.1.1
OSPF-MIB::ospfRouterId.0 = IpAddress: 192.168.42.109
[...]
@end example
The AgentX protocol can be transported over a Unix socket or using TCP
or UDP. It usually defaults to a Unix socket and depends on how NetSNMP
was built. If need to configure Quagga to use another transport, you can
configure it through @code{/etc/snmp/quagga.conf}:
@example
/etc/snmp/quagga.conf:
[snmpd]
# Use a remote master agent
agentXSocket tcp:192.168.15.12:705
@end example
@node SMUX configuration @node SMUX configuration
@section SMUX configuration @section SMUX configuration
To enable SMUX protocol support, Quagga must have been build with the To enable SMUX protocol support, Quagga must have been build with the
@code{--enable-snmp} option. @code{--enable-snmp=smux} option.
A separate connection has then to be established between between the A separate connection has then to be established between the
SNMP agent (snmpd) and each of the Quagga daemons. This connections SNMP agent (snmpd) and each of the Quagga daemons. This connections
each use different OID numbers and passwords. Be aware that this OID each use different OID numbers and passwords. Be aware that this OID
number is not the one that is used in queries by clients, it is solely number is not the one that is used in queries by clients, it is solely
@ -85,7 +148,7 @@ troublesome @code{snmp_log()} line in the function
@section MIB and command reference @section MIB and command reference
The following OID numbers are used for the interprocess communication of snmpd and The following OID numbers are used for the interprocess communication of snmpd and
the Quagga daemons. Sadly, SNMP has not been implemented in all daemons yet. the Quagga daemons with SMUX only.
@example @example
(OIDs below .iso.org.dod.internet.private.enterprises) (OIDs below .iso.org.dod.internet.private.enterprises)
zebra .1.3.6.1.4.1.3317.1.2.1 .gnome.gnomeProducts.zebra.zserv zebra .1.3.6.1.4.1.3317.1.2.1 .gnome.gnomeProducts.zebra.zserv
@ -95,7 +158,8 @@ ospfd .1.3.6.1.4.1.3317.1.2.5 .gnome.gnomeProducts.zebra.ospfd
ospf6d .1.3.6.1.4.1.3317.1.2.6 .gnome.gnomeProducts.zebra.ospf6d ospf6d .1.3.6.1.4.1.3317.1.2.6 .gnome.gnomeProducts.zebra.ospf6d
@end example @end example
The following OID numbers are used for querying the SNMP daemon by a client: Sadly, SNMP has not been implemented in all daemons yet. The following
OID numbers are used for querying the SNMP daemon by a client:
@example @example
zebra .1.3.6.1.2.1.4.24 .iso.org.dot.internet.mgmt.mib-2.ip.ipForward zebra .1.3.6.1.2.1.4.24 .iso.org.dot.internet.mgmt.mib-2.ip.ipForward
ospfd .1.3.6.1.2.1.14 .iso.org.dot.internet.mgmt.mib-2.ospf ospfd .1.3.6.1.2.1.14 .iso.org.dot.internet.mgmt.mib-2.ospf
@ -104,7 +168,7 @@ ripd .1.3.6.1.2.1.23 .iso.org.dot.internet.mgmt.mib-2.rip2
ospf6d .1.3.6.1.3.102 .iso.org.dod.internet.experimental.ospfv3 ospf6d .1.3.6.1.3.102 .iso.org.dod.internet.experimental.ospfv3
@end example @end example
The following syntax is understood by the Quagga daemons for configuring SNMP: The following syntax is understood by the Quagga daemons for configuring SNMP using SMUX:
@deffn {Command} {smux peer @var{oid}} {} @deffn {Command} {smux peer @var{oid}} {}
@deffnx {Command} {no smux peer @var{oid}} {} @deffnx {Command} {no smux peer @var{oid}} {}
@end deffn @end deffn
@ -113,4 +177,9 @@ The following syntax is understood by the Quagga daemons for configuring SNMP:
@deffnx {Command} {no smux peer @var{oid} @var{password}} {} @deffnx {Command} {no smux peer @var{oid} @var{password}} {}
@end deffn @end deffn
Here is the syntax for using AgentX:
@deffn {Command} {agentx} {}
@deffnx {Command} {no agentx} {}
@end deffn
@include snmptrap.texi @include snmptrap.texi