]> git.proxmox.com Git - mirror_frr.git/blame - doc/user/snmp.rst
Merge pull request #3372 from nitinsoniism/show_evpn_mac_vni_all_detail
[mirror_frr.git] / doc / user / snmp.rst
CommitLineData
0efdf0fe 1.. _snmp-support:
42fc5d26
QY
2
3************
4SNMP Support
5************
6
c1a54c05
QY
7:abbr:`SNMP (Simple Network Managing Protocol)` is a widely implemented feature
8for collecting network information from router and/or host. FRR itself does
9not support SNMP agent (server daemon) functionality but is able to connect to
807ed4e9
DS
10a SNMP agent using the the AgentX protocol (:rfc:`2741`) and make the
11routing protocol MIBs available through it.
42fc5d26 12
c1a54c05 13Note that SNMP Support needs to be enabled at compile-time and loaded as module
0efdf0fe 14on daemon startup. Refer to :ref:`loadable-module-support` on the latter.
42fc5d26 15
0efdf0fe 16.. _getting-and-installing-an-snmp-agent:
42fc5d26
QY
17
18Getting and installing an SNMP agent
19====================================
20
807ed4e9 21The supported SNMP agent is AgentX. We recommend to use
c1a54c05
QY
22the latest version of `net-snmp` which was formerly known as `ucd-snmp`. It is
23free and open software and available at `http://www.net-snmp.org/ <http://www.net-snmp.org/>`_
807ed4e9 24and as binary package for most Linux distributions.
42fc5d26 25
0efdf0fe 26.. _agentx-configuration:
42fc5d26
QY
27
28AgentX configuration
29====================
30
c1a54c05
QY
31.. program:: configure
32
dc1046f7 33To enable AgentX protocol support, FRR must have been build with the
c1a54c05
QY
34:option:`--enable-snmp` or `--enable-snmp=agentx` option. Both the
35master 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.
37In each of the FRR daemons, ``agentx`` command will enable AgentX support.
42fc5d26 38
807ed4e9 39:file:`/etc/snmp/zebra.conf`:
b8df0600
TG
40
41::
42
9eb95b3b
QY
43 #
44 # example access restrictions setup
45 #
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
50 #
51 # enable master agent for AgentX subagents
52 #
53 master agentx
54
55:file:`/etc/frr/ospfd.conf:`
56
57 .. code-block:: frr
42fc5d26 58
c1a54c05
QY
59 ! ... the rest of ospfd.conf has been omitted for clarity ...
60 !
61 agentx
62 !
63
64
65Upon successful connection, you should get something like this in the log of
66each FRR daemons:
42fc5d26
QY
67
68::
69
9eb95b3b 70 2012/05/25 11:39:08 ZEBRA: snmp[info]: NET-SNMP version 5.4.3 AgentX subagent connected
a8c90e15 71
42fc5d26
QY
72
73Then, you can use the following command to check everything works as expected:
74
75::
76
9eb95b3b
QY
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
79 [...]
a8c90e15 80
42fc5d26 81
c1a54c05
QY
82The AgentX protocol can be transported over a Unix socket or using TCP or UDP.
83It usually defaults to a Unix socket and depends on how NetSNMP was built. If
84need to configure FRR to use another transport, you can configure it through
85:file:`/etc/snmp/frr.conf`:
42fc5d26
QY
86
87::
88
9eb95b3b
QY
89 [snmpd]
90 # Use a remote master agent
91 agentXSocket tcp:192.168.15.12:705
a8c90e15 92
42fc5d26 93
c1a54c05 94Here is the syntax for using AgentX:
42fc5d26 95
c1a54c05
QY
96.. index:: agentx
97.. clicmd:: agentx
98.. index:: no agentx
99.. clicmd:: no agentx
42fc5d26 100
42fc5d26 101
ec8404d8 102.. include:: snmptrap.rst