Re: How to differentiate snmpwalk & snmpgetnext request ?

This is a discussion on Re: How to differentiate snmpwalk & snmpgetnext request ? within the SNMP Users forums, part of the Networking and Network Related category; --===============1705136143== Content-Type: multipart/alternative; boundary="0-1568358168-1210249097=:63779" Content-Transfer-Encoding: 8bit --0-1568358168-1210249097=:63779 ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-08-2008
valantina arumugam
 
Posts: n/a
Default Re: How to differentiate snmpwalk & snmpgetnext request ?

--===============1705136143==
Content-Type: multipart/alternative; boundary="0-1568358168-1210249097=:63779"
Content-Transfer-Encoding: 8bit

--0-1568358168-1210249097=:63779
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit


We had implemented the third option which you said with cache time of 6 sec.

And that too have some problem.

1. Say the cache time is 6 sec & XX Table contains 8 instance.
snmwalk request comes at 3 rd sec and has displayed say 4 instance details.
At this time cacheing would have crossed 6 sec, an instance would ahve add/remov-ed & started to refresh the data.
Obviously this leads to displaying the ambiguous data while displaying the remaining instance.

This arise me a necessity to diff. walk & getnext.

We also tried to identifying walk using timestamp b/w simultaneous snmpgetnext request.That too works good only if a single snmwalk is given at a time. If multiple request are given this solution also breaks the consistency of data.



You have clearly explained what i thought , through the diagram in the follow up reply mail. Thanks. Thanks..

Dave Shield <D.T.Shield@liverpool.ac.uk> wrote: 2008/5/8 valantina arumugam :
> Is there a way to differentiate the request from snmpwalk &
> snmpgetnext ?


No.

As Suresh has said, there is no such thing as an "snmpwalk"
request. The agent will simply receive a GETNEXT request.
The structure of this is standard and will look identical - whether
it is a one-off request, or part of a sequence (e.g. from snmpwalk
or snmptable). There are no "request context" flags.
The agent treats each incoming request identically.


> For snmpgetnext request i have to do some operation for xx OID.
> For snmpwalk request , i have to do the same operation
> plus some other functionality for xx OID.


That's simply not possible.
SNMP doesn't work that way.


> Eg :
> snmpwalk of xx table :
> we gather all the instance of xx table data for the 1st getnext req. itself.
> while walk is going on , there is a chance an instance may get
> deleted/added thro' other appln( other than snmp) .which will result
> in displaying of ambiguous data.


That, on the other hand, *is* possible to handle sensibly.

Three options spring to mind.

One would be to have a "last change time" object, which would
be updated whenever a row was added or deleted. The client could
then retrieve the value of this object along with the contents of the
table.
If this value changes during the walking of the table, the app
would know that the results were inconsistent, and could discard
them and start again. This is probably most useful in conjunction
with the GETBULK request, rather than GETNEXT (though it would
work with both).

The second option is to request the data for each row in a single
GETNEXT request, rather than walking through each column in turn.
Even rows were added or deleted during the course of the walk,
the results for each row would at least be consistent.
This is the approach used by the "snmptable" command

Both of these approaches require action at the client side.
The third approach is to handle this purely at the agent side,
by loading all of the data for the table in one go, and caching
it. Incoming SNMP requests would be served from this cache,
regardless of what changes might happen to the underlying data.
The results returned might be a bit out of date, but would at least
be consistent.
That's similar to what you were asking about, but the cache
is marked as invalid based on age, rather than the characteristics
of incoming requests.


The Net-SNMP agent includes just such a cache helper.
Invoke "mib2c -S cache=1 ...." (with most of the table templates)
to generate a suitable framework.

Dave



---------------------------------
Share files, take polls, and make new friends - all under one roof. Click here.
--0-1568358168-1210249097=:63779
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

<br> We had implemented the third option which you said with cache time of 6 sec.<br> <br> And that too have some problem.<br> <br> &nbsp;&nbsp;&nbsp; 1.&nbsp; Say the cache time is 6 sec &amp; XX Table contains 8 instance.<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; snmwalk request comes at 3 rd sec and has displayed&nbsp; say 4 instance details.<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ; At this time cacheing would have crossed 6 sec, an instance would ahve add/remov-ed &amp; started to refresh the data.<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ; Obviously this leads to displaying the ambiguous data while displaying the remaining instance.<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ; <br> This arise me a necessity to diff. walk &amp; getnext. <br> <br> We also tried to identifying walk using timestamp b/w simultaneous snmpgetnext request.That too works good only if a single snmwalk is given at a time. If multiple request are given this
solution also breaks the consistency of data.<br> <br> <br> <br> You have clearly explained what i thought , through the diagram in the follow up reply mail. Thanks. Thanks..<br> <br><b><i>Dave Shield &lt;D.T.Shield@liverpool.ac.uk&gt;</i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> 2008/5/8 valantina arumugam <vals_85 @yahoo.co.in="">:<br>&gt; Is there a way to differentiate the request from snmpwalk &amp;<br>&gt; snmpgetnext ?<br><br>No.<br><br>As Suresh has said, there is no such thing as an "snmpwalk"<br>request. The agent will simply receive a GETNEXT request.<br>The structure of this is standard and will look identical - whether<br>it is a one-off request, or part of a sequence (e.g. from snmpwalk<br>or snmptable). There are no "request context" flags.<br>The agent treats each incoming request identically.<br><br><br>&gt; For snmpgetnext request i have to do some operation for xx
OID.<br>&gt; For snmpwalk request , i have to do the same operation<br>&gt; plus some other functionality for xx OID.<br><br>That's simply not possible.<br>SNMP doesn't work that way.<br><br><br>&gt; Eg :<br>&gt; snmpwalk of xx table :<br>&gt; we gather all the instance of xx table data for the 1st getnext req. itself.<br>&gt; while walk is going on , there is a chance an instance may get<br>&gt; deleted/added thro' other appln( other than snmp) .which will result<br>&gt; in displaying of ambiguous data.<br><br>That, on the other hand, *is* possible to handle sensibly.<br><br>Three options spring to mind.<br><br> One would be to have a "last change time" object, which would<br>be updated whenever a row was added or deleted. The client could<br>then retrieve the value of this object along with the contents of the<br>table.<br> If this value changes during the walking of the table, the app<br> would know that the results
were inconsistent, and could discard<br>them and start again. This is probably most useful in conjunction<br>with the GETBULK request, rather than GETNEXT (though it would<br>work with both).<br><br> The second option is to request the data for each row in a single<br>GETNEXT request, rather than walking through each column in turn.<br>Even rows were added or deleted during the course of the walk,<br>the results for each row would at least be consistent.<br> This is the approach used by the "snmptable" command<br><br>Both of these approaches require action at the client side.<br>The third approach is to handle this purely at the agent side,<br>by loading all of the data for the table in one go, and caching<br>it. Incoming SNMP requests would be served from this cache,<br>regardless of what changes might happen to the underlying data.<br>The results returned might be a bit out of date, but would at least<br>be consistent.<br> That's similar to what you were asking
about, but the cache<br>is marked as invalid based on age, rather than the characteristics<br>of incoming requests.<br><br> <br> The Net-SNMP agent includes just such a cache helper.<br>Invoke "mib2c -S cache=1 ...." (with most of the table templates)<br>to generate a suitable framework.<br><br>Dave<br></vals_85></blockquote><br><p>


<!--8--><hr size=1></hr> Share files, take polls, and make new friends - all under one roof. <a href="http://in.rd.yahoo.com/tagline_groups_8/*http://in.promos.yahoo.com/groups/"> Click here.</a>
--0-1568358168-1210249097=:63779--


--===============1705136143==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757...un.com/javaone
--===============1705136143==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/...net-snmp-users

--===============1705136143==--

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:14 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0