[mrtg] Re: MRTG Request ID
Simon Leinen
simon at limmat.switch.ch
Mon Jun 2 15:26:18 MEST 2003
puyo writes:
> I have the 7004BR work verry well .
> i like now to get snmp value from router Via MRTG 2.9.29 redhat 7.3 .
> In fact, the router firmware doesn't follow the SNMP specification
> exactly... For each query, you need to use a query ID which can be
> from -2^32 to 2^32
> the Router doen't like when it is not from 0 to 2^16
First of all, thank you for doing this detailed analysis first!
There are in fact a few agents that have trouble with negative request
IDs. The SNMP_Session.pm library that MRTG uses has a workaround for
this - see "avoid_negative_request_ids" in the code. You could patch
your SNMP_Session.pm to set this to "1" by default, or patch MRTG to
set it for the problematic target. Oops, you said it masks the entire
upper 16 bits. Well there's no workaround for this, but one could do
it in SNMP_Session.pm, either by adding a
"use_16_bit_unsigned_request_id" variable or by doing something like
"lenient_request_id_matching".
But the best fix would be to fix your agent. Maybe there is newer
firmware available for the router that fixes the problem. Otherwise,
"MRTG doesn't work" will be a good incentive for the vendor to fix it.
And therefore I'm reluctant to add this workaround to SNMP_Session.pm:
We would be adding workarounds all the time for differently broken
SNMP agents, and end up with the lowest common denominator that would
work badly with all agents.
> request (mrtg)
> Comm/Auth Object Type/Len: 0x30 0x57 (87)
> Version Number Type/Len/Value: 0x02 0x01 (1) 0x00
> Community Type/Len/Value: 0x04 0x06 (6) public
> PDU Message Type: 0xA0 Get Request
> PDU Message Length: 0x4A (74)
> Request ID Type/Len/Value: 0x02 0x04 (4) 0x477C2EF0
> answere (router)
> Comm/Auth Object Type/Len: 0x30 0x5F (95)
> Version Number Type/Len/Value: 0x02 0x01 (1) 0x00
> Community Type/Len/Value: 0x04 0x06 (6) public
> PDU Message Type: 0xA2 Get Response
> PDU Message Length: 0x52 (82)
> Request ID Type/Len/Value: 0x02 0x02 (2) 0x2EF0
> How i can fix MRTG to use only from 0 to 2^16 request ID ?
> can some one help me please?
> best regards
--
Simon Leinen simon at babar.switch.ch
SWITCH http://www.switch.ch/misc/leinen/
Computers hate being anthropomorphized.
--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive http://www.ee.ethz.ch/~slist/mrtg
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the mrtg
mailing list