7 :abbr:`SNMP (Simple Network Managing Protocol)` is a widely implemented feature
8 for collecting network information from router and/or host. FRR itself does
9 not support SNMP agent (server daemon) functionality but is able to connect to
10 a SNMP agent using the the AgentX protocol (:rfc:`2741`) and make the
11 routing protocol MIBs available through it.
13 Note that SNMP Support needs to be enabled at compile-time and loaded as module
14 on daemon startup. Refer to :ref:`loadable-module-support` on the latter.
16 .. _getting-and-installing-an-snmp-agent:
18 Getting and installing an SNMP agent
19 ====================================
21 The supported SNMP agent is AgentX. We recommend to use
22 the latest version of `net-snmp` which was formerly known as `ucd-snmp`. It is
23 free and open software and available at `http://www.net-snmp.org/ <http://www.net-snmp.org/>`_
24 and as binary package for most Linux distributions.
26 .. _agentx-configuration:
31 .. program:: configure
33 To enable AgentX protocol support, FRR must have been build with the
34 :option:`--enable-snmp` or `--enable-snmp=agentx` option. Both the
35 master SNMP agent (snmpd) and each of the FRR daemons must be configured. In
36 :file:`/etc/snmp/snmpd.conf`, the ``master agentx`` directive should be added.
37 In each of the FRR daemons, ``agentx`` command will enable AgentX support.
39 :file:`/etc/snmp/zebra.conf`:
44 # example access restrictions setup
46 com2sec readonly default public
47 group MyROGroup v1 readonly
48 view all included .1 80
49 access MyROGroup "" any noauth exact all none none
51 # enable master agent for AgentX subagents
55 :file:`/etc/frr/ospfd.conf:`
59 ! ... the rest of ospfd.conf has been omitted for clarity ...
65 Upon successful connection, you should get something like this in the log of
70 2012/05/25 11:39:08 ZEBRA: snmp[info]: NET-SNMP version 5.4.3 AgentX subagent connected
73 Then, you can use the following command to check everything works as expected:
77 # snmpwalk -c public -v1 localhost .1.3.6.1.2.1.14.1.1
78 OSPF-MIB::ospfRouterId.0 = IpAddress: 192.168.42.109
82 The AgentX protocol can be transported over a Unix socket or using TCP or UDP.
83 It usually defaults to a Unix socket and depends on how NetSNMP was built. If
84 need to configure FRR to use another transport, you can configure it through
85 :file:`/etc/snmp/frr.conf`:
90 # Use a remote master agent
91 agentXSocket tcp:192.168.15.12:705
94 Here is the syntax for using AgentX:
102 .. include:: snmptrap.rst