Annotation of embedaddon/quagga/doc/snmp.texi, revision 1.1
1.1 ! misho 1: @node SNMP Support
! 2: @chapter SNMP Support
! 3:
! 4: @acronym{SNMP,Simple Network Managing Protocol} is a widely implemented
! 5: feature for collecting network information from router and/or host.
! 6: Quagga itself does not support SNMP agent (server daemon) functionality
! 7: but is able to connect to a SNMP agent using the SMUX protocol
! 8: (@cite{RFC1227}) and make the routing protocol MIBs available through
! 9: it.
! 10:
! 11: @menu
! 12: * Getting and installing an SNMP agent::
! 13: * SMUX configuration::
! 14: * MIB and command reference::
! 15: * Handling SNMP Traps::
! 16: @end menu
! 17:
! 18: @node Getting and installing an SNMP agent
! 19: @section Getting and installing an SNMP agent
! 20:
! 21: There are several SNMP agent which support SMUX. We recommend to use the latest
! 22: version of @code{net-snmp} which was formerly known as @code{ucd-snmp}.
! 23: It is free and open software and available at @uref{http://www.net-snmp.org/}
! 24: and as binary package for most Linux distributions.
! 25: @code{net-snmp} has to be compiled with @code{--with-mib-modules=smux} to
! 26: be able to accept connections from Quagga.
! 27:
! 28: @node SMUX configuration
! 29: @section SMUX configuration
! 30:
! 31: To enable SMUX protocol support, Quagga must have been build with the
! 32: @code{--enable-snmp} option.
! 33:
! 34: A separate connection has then to be established between between the
! 35: SNMP agent (snmpd) and each of the Quagga daemons. This connections
! 36: each use different OID numbers and passwords. Be aware that this OID
! 37: number is not the one that is used in queries by clients, it is solely
! 38: used for the intercommunication of the daemons.
! 39:
! 40: In the following example the ospfd daemon will be connected to the
! 41: snmpd daemon using the password "quagga_ospfd". For testing it is
! 42: recommending to take exactly the below snmpd.conf as wrong access
! 43: restrictions can be hard to debug.
! 44:
! 45: @example
! 46: /etc/snmp/snmpd.conf:
! 47: #
! 48: # example access restrictions setup
! 49: #
! 50: com2sec readonly default public
! 51: group MyROGroup v1 readonly
! 52: view all included .1 80
! 53: access MyROGroup "" any noauth exact all none none
! 54: #
! 55: # the following line is relevant for Quagga
! 56: #
! 57: smuxpeer .1.3.6.1.4.1.3317.1.2.5 quagga_ospfd
! 58:
! 59: /etc/quagga/ospf:
! 60: ! ... the rest of ospfd.conf has been omitted for clarity ...
! 61: !
! 62: smux peer .1.3.6.1.4.1.3317.1.2.5 quagga_ospfd
! 63: !
! 64: @end example
! 65:
! 66: After restarting snmpd and quagga, a successful connection can be verified in
! 67: the syslog and by querying the SNMP daemon:
! 68:
! 69: @example
! 70: snmpd[12300]: [smux_accept] accepted fd 12 from 127.0.0.1:36255
! 71: snmpd[12300]: accepted smux peer: \
! 72: oid GNOME-PRODUCT-ZEBRA-MIB::ospfd, quagga-0.96.5
! 73:
! 74: # snmpwalk -c public -v1 localhost .1.3.6.1.2.1.14.1.1
! 75: OSPF-MIB::ospfRouterId.0 = IpAddress: 192.168.42.109
! 76: @end example
! 77:
! 78: Be warned that the current version (5.1.1) of the Net-SNMP daemon writes a line
! 79: for every SNMP connect to the syslog which can lead to enormous log file sizes.
! 80: If that is a problem you should consider to patch snmpd and comment out the
! 81: troublesome @code{snmp_log()} line in the function
! 82: @code{netsnmp_agent_check_packet()} in @code{agent/snmp_agent.c}.
! 83:
! 84: @node MIB and command reference
! 85: @section MIB and command reference
! 86:
! 87: The following OID numbers are used for the interprocess communication of snmpd and
! 88: the Quagga daemons. Sadly, SNMP has not been implemented in all daemons yet.
! 89: @example
! 90: (OIDs below .iso.org.dod.internet.private.enterprises)
! 91: zebra .1.3.6.1.4.1.3317.1.2.1 .gnome.gnomeProducts.zebra.zserv
! 92: bgpd .1.3.6.1.4.1.3317.1.2.2 .gnome.gnomeProducts.zebra.bgpd
! 93: ripd .1.3.6.1.4.1.3317.1.2.3 .gnome.gnomeProducts.zebra.ripd
! 94: ospfd .1.3.6.1.4.1.3317.1.2.5 .gnome.gnomeProducts.zebra.ospfd
! 95: ospf6d .1.3.6.1.4.1.3317.1.2.6 .gnome.gnomeProducts.zebra.ospf6d
! 96: @end example
! 97:
! 98: The following OID numbers are used for querying the SNMP daemon by a client:
! 99: @example
! 100: zebra .1.3.6.1.2.1.4.24 .iso.org.dot.internet.mgmt.mib-2.ip.ipForward
! 101: ospfd .1.3.6.1.2.1.14 .iso.org.dot.internet.mgmt.mib-2.ospf
! 102: bgpd .1.3.6.1.2.1.15 .iso.org.dot.internet.mgmt.mib-2.bgp
! 103: ripd .1.3.6.1.2.1.23 .iso.org.dot.internet.mgmt.mib-2.rip2
! 104: ospf6d .1.3.6.1.3.102 .iso.org.dod.internet.experimental.ospfv3
! 105: @end example
! 106:
! 107: The following syntax is understood by the Quagga daemons for configuring SNMP:
! 108: @deffn {Command} {smux peer @var{oid}} {}
! 109: @deffnx {Command} {no smux peer @var{oid}} {}
! 110: @end deffn
! 111:
! 112: @deffn {Command} {smux peer @var{oid} @var{password}} {}
! 113: @deffnx {Command} {no smux peer @var{oid} @var{password}} {}
! 114: @end deffn
! 115:
! 116: @include snmptrap.texi
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>