Re: How do I receive broadcast results?

Juergen Schoenwaelder (schoenw@gaertner.de)
Sat, 7 Jun 1997 15:55:28 +0200

Cameron Laird <claird@Starbase.NeoSoft.COM> said:

Cameron> This is my question: how do I receive the complete results
Cameron> from an SNMP session request addressed to a *broadcast* ad-
Cameron> dress? I think I'm asking something reasonable; if I command
Cameron> Scotty
Cameron> set s [snmp session -address $MYSUBNET.255]
Cameron> $s get sysDescr.0

Cameron> I can watch in the debugger as the full collection of distinct
Cameron> nodes report back, and Scotty receives all the packets, but
Cameron> the only result it returns, or that shows up in %V, if I ask
Cameron> for that binding, is the last machine to reply. How am I
Cameron> supposed to work with broadcast addresses?

Sending SNMP packets to broadcast addresses leads to ambiguities. You
would have to write quite some code to make broadcasted SNMP requests
work properly because the Tcl command interface is not prepared to
handle this case (both, the synchronous and the asynchronous
interface). Note that security mechanism proposed in all the security
proposals will make broadcasted SNMP requests impossible.

Cameron> Perhaps related question: when I do the same from one par-
Cameron> ticular host, even while running Scotty as root, I receive an
Cameron> error diagnostic, "sendto failed: permission denied". Yes,
Cameron> root owns /usr/local/bin/ntping, and the latter has its sticky
Cameron> bit set. Again, I looked through the archive of the mailing
Cameron> list. Next I'll start on the source code, but I suspect what
Cameron> I most need is better understanding of what Scotty is
Cameron> *supposed* to do with such requests.

Sending and receiving SNMP packets has nothing to do with ntping nor
does it need special privileges. There are several possible reasons
why this host disallows broadcasted SNMP messages and I do not want to
speculate about this here.

My recommendation is to avoid broadcasted SNMP requests, at least
without doing a carefull analysis of the semantics and the actual
implementation. (There are quite a number of things to change in order
to make broadcasted asynchronous SNMP messages work. For example, you
currently get a random result. The fact that you see 'always the last
one' only depends on the fact that responses are received faster than
scotty can handle them.)

BTW, doing table walks with broadcasted SNMP requests will soon eat up
the benefit of saved requests in terms of wasted processing cycles on
your agents.
Juergen

-- 
Juergen Schoenwaelder     <schoenw@gaertner.de>     (Tel: +49-531-23873-0)
Gaertner Datensysteme, Hamburger Strasse 273a, 38114 Braunschweig, Germany
--
!! This message is brought to you via the `tkined & scotty' mailing list.
!! Please do not reply to this message to unsubscribe. To subscribe or
!! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>.
!! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.