Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Oct 2006 19:21:27 +0200
From:      Thomas <freebsdlists@bsdunix.ch>
To:        Harti Brandt <harti@freebsd.org>
Cc:        freebsd-net@freebsd.org
Subject:   Re: paket loss on freebsd router if (b)snmpd is running##SPAM
Message-ID:  <45424017.2030905@bsdunix.ch>
In-Reply-To: <20061027173957.S27619@knop-beagle.kn.op.dlr.de>
References:  <4541AB5C.2060009@bsdunix.ch> <20061027104553.D27619@knop-beagle.kn.op.dlr.de> <454226C7.10505@bsdunix.ch> <20061027173957.S27619@knop-beagle.kn.op.dlr.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Hello Harti

Harti Brandt schrieb:
> On Fri, 27 Oct 2006, Thomas wrote:
> 
> T>Hello Harti
> T>
> T>Harti Brandt schrieb:
> T>> On Fri, 27 Oct 2006, Thomas wrote:
> T>> 
> T>> T>Hello
> T>> T>
> T>> T>I use several 5.4 and 6.1 FBSD machines as router (with quagga). The
> T>> T>average traffic is 300mbit/s (em interfaces with polling enabled). It
> T>> T>works more or less.
> T>> T>
> T>> T>Problem:
> T>> T>If bsnmpd is running and I'm doing a snmpwalk from a remote machine the
> T>> T>router has some significant packet loss. We are talking about 3-15% of
> T>> T>packet loss. It's a simple snmpwalk (ipRouteTable and the interfaces stats).
> T>> 
> T>> Does this happen also if you walk only the interface tables? What size is 
> T>> your routing table?
> T>
> T>The routing table has approx. 200k entries. I've to correct my
> T>statement. I don't walk over the RoutingTable.
> 
> Oh. That would be a nice test how good the RB-tree implementation of the 
> routing table is :-)
> 
> T>It's only an interface table walk (IF-MIB). bsnmpd consumes approx.
> T>6-10% cpu. I already have significant packet loss if bsnmpd is started.
> T>
> T>bsnmpd not running:
> T>
> T>ping www.switch.ch
> T>
> T>--- oreius.switch.ch ping statistics ---
> T>44 packets transmitted, 44 packets received, 0% packet loss
> T>round-trip min/avg/max/stddev = 6.825/7.425/8.007/0.252 ms
> T>
> T>zero packet loss.
> T>
> T>
> T>netstat -w 1 shows no error.
> T>
> T>            input        (Total)           output
> T>   packets  errs      bytes    packets  errs      bytes colls
> T>     39877     0   34330807      38614     0   34087518     0
> T>     45522     0   38730142      44124     0   38424881     0
> T>     44671     0   38783909      43455     0   38604698     0
> T>     43140     0   36939542      42059     0   36691583     0
> T>     43428     0   36858817      42213     0   36700954     0
> T>     43748     0   37994949      42687     0   37780190     0
> T>     42698     0   36451927      41409     0   36270936     0
> T>     38695     0   32184588      37119     0   31791417     0
> T>
> T>
> T>
> T>
> T>bsnmpd started:
> T>
> T>ping www.switch.ch
> T>--- oreius.switch.ch ping statistics ---
> T>57 packets transmitted, 53 packets received, 7% packet loss
> T>round-trip min/avg/max/stddev = 6.715/12.638/95.183/19.041 ms
> T>
> T>7% packet loss.
> T>
> T>
> T>netstat shows some errors too.
> T>netstat -w 1
> T>            input        (Total)           output
> T>   packets  errs      bytes    packets  errs      bytes colls
> T>     33597     0   27508009      32433     0   27344720     0
> T>     38204     0   32117848      36950     0   31852251     0
> T>     39171     0   33870984      37999     0   33696346     0
> T>     32160     0   26825650      31065     0   26591079     0
> T>     26915   726   20902878      25771     0   20791170     0
> T>     35167     0   29173014      33945     0   28904867     0
> T>     33282   370   27478393      32140     0   27297079     0
> T>     29738     0   23859586      28464     0   23524984     0
> T>     38456   598   31559055      36881     0   31313396     0
> T>     34738     0   28088584      33247     0   27743827     0
> T>     38193   648   30854513      36657     0   30556948     0
> T>
> T>
> T>A snmpwalk makes it a bit worse but not much. I already have packet loss
> T>if bsnmpd is just started without any walks.
> 
> You mean, you have loss if it is just ideling around? The only thing 
> bsnmpd does in this situation is polling the interface statistics, which 
> is needed because the kernel has only 32-bit counters. Could you please 
> check what the polling interval is? You find this in the BEGEMOT-MIB2-MIB. 
> Something like
>

Yes, bsnmpd is just ideling.

> snmpwalk ... <host> begemotMib2

On this freebsd 5.4 machine I have bsnmpd-1.12:
share/snmp/mibs/BEGEMOT-MIB.txt
share/snmp/mibs/BEGEMOT-NTP-MIB.txt
share/snmp/mibs/BEGEMOT-SNMPD.txt

but no BEGEMOT-MIB2-MIB.


snmpwalk -v 2c -m /usr/share/snmp/mibs/BEGEMOT-MIB.txt -c public
localhost BEGEMOT
BEGEMOT-MIB::begemot.1.1.1.1.0 = INTEGER: 2048
BEGEMOT-MIB::begemot.1.1.1.2.0 = INTEGER: 2048
BEGEMOT-MIB::begemot.1.1.1.3.0 = INTEGER: 1
BEGEMOT-MIB::begemot.1.1.1.4.0 = IpAddress: 0.0.0.0
BEGEMOT-MIB::begemot.1.1.1.5.0 = Gauge32: 3
BEGEMOT-MIB::begemot.1.1.2.1.3.192.168.1.10.162 = INTEGER: 1
BEGEMOT-MIB::begemot.1.1.2.1.4.192.168.1.10.162 = STRING: "SNTrap"
BEGEMOT-MIB::begemot.1.1.2.1.5.192.168.1.10.162 = INTEGER: 2
BEGEMOT-MIB::begemot.1.1.4.1.3.127.0.0.1.161 = INTEGER: 1
BEGEMOT-MIB::begemot.1.1.4.1.3.192.168.1.100.161 = INTEGER: 1
BEGEMOT-MIB::begemot.1.1.6.1.2.5.109.105.98.73.73 = STRING:
"/usr/local/lib/snmp_mibII.so"
BEGEMOT-MIB::begemot.1.1.6.1.3.5.109.105.98.73.73 = STRING: "This module
implements the interface and ip groups."
BEGEMOT-MIB::begemot.1.1.7.1.0 = Counter32: 0
BEGEMOT-MIB::begemot.1.1.7.2.0 = Counter32: 0
BEGEMOT-MIB::begemot.1.1.7.3.0 = Counter32: 0
BEGEMOT-MIB::begemot.1.1.7.4.0 = Counter32: 0
BEGEMOT-MIB::begemot.1.1.8.1.0 = INTEGER: 2
BEGEMOT-MIB::begemot.1.1.8.2.0 = Gauge32: 0
BEGEMOT-MIB::begemot.1.1.8.3.0 = INTEGER: 7
BEGEMOT-MIB::begemot.1.1.9.1.2.19.47.118.97.114.47.114.117.110.47.115.110.109.112.100.46.115.111.99.107
= INTEGER: 1
BEGEMOT-MIB::begemot.1.1.9.1.3.19.47.118.97.114.47.114.117.110.47.115.110.109.112.100.46.115.111.99.107
= INTEGER: 4
BEGEMOT-MIB::begemot.1.1.10.1.1.2.3.117.100.112 = INTEGER: 1
BEGEMOT-MIB::begemot.1.1.10.1.1.2.5.108.115.111.99.107 = INTEGER: 1
BEGEMOT-MIB::begemot.1.1.10.1.1.3.3.117.100.112 = OID:
BEGEMOT-MIB::begemot.1.1.10.2
BEGEMOT-MIB::begemot.1.1.10.1.1.3.5.108.115.111.99.107 = OID:
BEGEMOT-MIB::begemot.1.1.10.3
BEGEMOT-MIB::begemot.3.1.1.1.0 = Counter64: 1000000000
BEGEMOT-MIB::begemot.3.1.1.2.0 = Timeticks: (2000) 0:00:20.00
BEGEMOT-MIB::begemot.3.1.1.3.0 = Timeticks: (0) 0:00:00.00

> given that /usr/share/snmp/mibs is in your MIB path.

snmpd.conf:

# Configuration
%snmpd
begemotSnmpdDebugDumpPdus       = 2
begemotSnmpdDebugSyslogPri      = 7

begemotSnmpdCommunityString.0.1 = $(read)
begemotSnmpdCommunityString.0.2 = $(write)
begemotSnmpdCommunityDisable    = 1

# open standard SNMP ports
begemotSnmpdPortStatus.[$(host)].161 = 1
begemotSnmpdPortStatus.127.0.0.1.161 = 1

# open a unix domain socket
begemotSnmpdLocalPortStatus."/var/run/snmpd.sock" = 1
begemotSnmpdLocalPortType."/var/run/snmpd.sock" = 4

# send traps to the traphost
begemotTrapSinkStatus.[$(traphost)].$(trapport) = 4
begemotTrapSinkVersion.[$(traphost)].$(trapport) = 2
begemotTrapSinkComm.[$(traphost)].$(trapport) = $(trap)

sysContact      = $(contact)
sysLocation     = $(location)
sysObjectId     = 1.3.6.1.4.1.12325.1.1.2.1.$(system)

snmpEnableAuthenTraps = 2

begemotSnmpdModulePath."mibII"  = "/usr/local/lib/snmp_mibII.so"

Regards,
Thomas





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45424017.2030905>