Add SNMP Monitoring section for the if_bridge(4) bridge implementation.
Submitted by: thompsa, syrinx
This commit is contained in:
parent
106299d4d4
commit
fe93bb8663
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=30657
1 changed files with 85 additions and 0 deletions
|
@ -2771,6 +2771,91 @@ bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1
|
|||
the full <hostid role="netmask">/24</hostid> address range
|
||||
can be allocated without subnetting.</para>
|
||||
</sect3>
|
||||
|
||||
<sect3>
|
||||
<title>SNMP Monitoring</title>
|
||||
|
||||
<para>The bridge interface and STP parameters can be monitored
|
||||
via the SNMP daemon which is included in the &os; base
|
||||
system. The exported bridge MIBs conform to the IETF
|
||||
standards so any SNMP client or monitoring package can be
|
||||
used to retrieve the data.</para>
|
||||
|
||||
<para>On the bridge machine uncomment the
|
||||
<literal>begemotSnmpdModulePath."bridge" =
|
||||
"/usr/lib/snmp_bridge.so"</literal> line from
|
||||
<filename>/etc/snmp.config</filename> and start the
|
||||
<application>bsnmpd</application> daemon. Other
|
||||
configuration such as community names and access lists may
|
||||
need to be modified. See &man.bsnmpd.1; and
|
||||
&man.snmp.bridge.3; for more information.</para>
|
||||
|
||||
<para>The following examples use the
|
||||
<application>Net-SNMP</application> software (<filename
|
||||
role="package">net-mgmt/net-snmp</filename>) to query a
|
||||
bridge, the <filename
|
||||
role="package">net-mgmt/bsnmptools</filename> port can also
|
||||
be used. From the SNMP client host add to
|
||||
<filename>$HOME/.snmp/snmp.conf</filename> the following
|
||||
lines to import the bridge MIB definitions in to
|
||||
<application>Net-SNMP</application>:</para>
|
||||
|
||||
<programlisting>mibdirs +/usr/share/snmp/mibs
|
||||
mibs +BRIDGE-MIB:RSTP-MIB:BEGEMOT-MIB:BEGEMOT-BRIDGE-MIB</programlisting>
|
||||
|
||||
<para>To monitor a single bridge via the IETF BRIDGE-MIB
|
||||
(RFC4188) do</para>
|
||||
|
||||
<screen>&prompt.user; <userinput>snmpwalk -v 2c -c public bridge1.example.com mib-2.dot1dBridge</userinput>
|
||||
BRIDGE-MIB::dot1dBaseBridgeAddress.0 = STRING: 66:fb:9b:6e:5c:44
|
||||
BRIDGE-MIB::dot1dBaseNumPorts.0 = INTEGER: 1 ports
|
||||
BRIDGE-MIB::dot1dStpTimeSinceTopologyChange.0 = Timeticks: (189959) 0:31:39.59 centi-seconds
|
||||
BRIDGE-MIB::dot1dStpTopChanges.0 = Counter32: 2
|
||||
BRIDGE-MIB::dot1dStpDesignatedRoot.0 = Hex-STRING: 80 00 00 01 02 4B D4 50
|
||||
...
|
||||
BRIDGE-MIB::dot1dStpPortState.3 = INTEGER: forwarding(5)
|
||||
BRIDGE-MIB::dot1dStpPortEnable.3 = INTEGER: enabled(1)
|
||||
BRIDGE-MIB::dot1dStpPortPathCost.3 = INTEGER: 200000
|
||||
BRIDGE-MIB::dot1dStpPortDesignatedRoot.3 = Hex-STRING: 80 00 00 01 02 4B D4 50
|
||||
BRIDGE-MIB::dot1dStpPortDesignatedCost.3 = INTEGER: 0
|
||||
BRIDGE-MIB::dot1dStpPortDesignatedBridge.3 = Hex-STRING: 80 00 00 01 02 4B D4 50
|
||||
BRIDGE-MIB::dot1dStpPortDesignatedPort.3 = Hex-STRING: 03 80
|
||||
BRIDGE-MIB::dot1dStpPortForwardTransitions.3 = Counter32: 1
|
||||
RSTP-MIB::dot1dStpVersion.0 = INTEGER: rstp(2)</screen>
|
||||
|
||||
<para>The <literal>dot1dStpTopChanges.0</literal> value is two
|
||||
which means that the STP bridge topology has changed twice,
|
||||
a topology change means that one or more links in the
|
||||
network have changed or failed and a new tree has been
|
||||
calculated. The
|
||||
<literal>dot1dStpTimeSinceTopologyChange.0</literal> value
|
||||
will show when this happened.</para>
|
||||
|
||||
<para>To monitor multiple bridge interfaces one may use the
|
||||
private BEGEMOT-BRIDGE-MIB:</para>
|
||||
|
||||
<screen>&prompt.user; <userinput>snmpwalk -v 2c -c public bridge1.example.com</userinput>
|
||||
enterprises.fokus.begemot.begemotBridge
|
||||
BEGEMOT-BRIDGE-MIB::begemotBridgeBaseName."bridge0" = STRING: bridge0
|
||||
BEGEMOT-BRIDGE-MIB::begemotBridgeBaseName."bridge2" = STRING: bridge2
|
||||
BEGEMOT-BRIDGE-MIB::begemotBridgeBaseAddress."bridge0" = STRING: e:ce:3b:5a:9e:13
|
||||
BEGEMOT-BRIDGE-MIB::begemotBridgeBaseAddress."bridge2" = STRING: 12:5e:4d:74:d:fc
|
||||
BEGEMOT-BRIDGE-MIB::begemotBridgeBaseNumPorts."bridge0" = INTEGER: 1
|
||||
BEGEMOT-BRIDGE-MIB::begemotBridgeBaseNumPorts."bridge2" = INTEGER: 1
|
||||
...
|
||||
BEGEMOT-BRIDGE-MIB::begemotBridgeStpTimeSinceTopologyChange."bridge0" = Timeticks: (116927) 0:19:29.27 centi-seconds
|
||||
BEGEMOT-BRIDGE-MIB::begemotBridgeStpTimeSinceTopologyChange."bridge2" = Timeticks: (82773) 0:13:47.73 centi-seconds
|
||||
BEGEMOT-BRIDGE-MIB::begemotBridgeStpTopChanges."bridge0" = Counter32: 1
|
||||
BEGEMOT-BRIDGE-MIB::begemotBridgeStpTopChanges."bridge2" = Counter32: 1
|
||||
BEGEMOT-BRIDGE-MIB::begemotBridgeStpDesignatedRoot."bridge0" = Hex-STRING: 80 00 00 40 95 30 5E 31
|
||||
BEGEMOT-BRIDGE-MIB::begemotBridgeStpDesignatedRoot."bridge2" = Hex-STRING: 80 00 00 50 8B B8 C6 A9</screen>
|
||||
|
||||
<para>To change the bridge interface being monitored via the
|
||||
<literal>mib-2.dot1dBridge</literal> subtree do:</para>
|
||||
|
||||
<screen>&prompt.user; <userinput>snmpset -v 2c -c private bridge1.example.com</userinput>
|
||||
BEGEMOT-BRIDGE-MIB::begemotBridgeDefaultBridgeIf.0 s bridge2</screen>
|
||||
</sect3>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
|
|
Loading…
Reference in a new issue