On 7 Feb 2008 at 14:11, Dave Shield wrote:
> On 07/02/2008, Giuseppe Modugno <[EMAIL PROTECTED]> wrote:
> > Now I understand... your solution to my doubt is to use tables!
> Yup.

...so I didn't understand...


> > If I consider an agent inside each device, I would have a simple information
> > structure:
> >    enterprises
> >        mycompany
> >            devA
> >                devA<param1>
> >                devA<param2>
> 
> Nope.
> The agent within each device would be working with the same
> MIB structure.   You've got to have a consistent representation
> of the information throughout.
> 
> But the agent within each device would only be responsible for a
> single row within the relevant table.   That agent would register
> a "slice" (consisting of that one row) rather than the full table.
> The master agent would then be responsible for handing requests
> off to the appropriate device/subagent.
>    The AgentX protocol was deliberately designed to support this
> model of working.


Sorry Dave, I'm yet confused about your words. My poor English could be the 
cause.

I want to explain what I consider a "single agent for all devices" and "a 
single agent for each device".

Start from the second.
Each device (for example my DVDPLA2000 in the previous emails) is connected (by 
RS232) to a Linux box running Net-SNMP main agent and extensions.
The extended sub-agent registers OIDs of the device connected to the main 
agent:
   enterprises
       mycompany
           devA
           devB
           devC
           devD
When the main agent receive a request (GET or SET) for devA.devA<something>, my 
handler for devA is called. This handler converts the request to a RS232 
command send to the device and waits for the answer. Of course, RS232 protocol 
is proprietary (it is vaguely similar to SNMP PDUs, GET this OID or SET this 
OID with this value).
In this way, each device has an agent (main and sub-) and an IP address. The 
user that wants to walk through two devA can do:
  snmpwalk -v2c -c public -IR <ip1> devA
  snmpwalk -v2c -c public -IR <ip2> devA
He can select the device to interrogates by its IP address.
I think it's the normal situation with network equipments. If I buy a router 
(from Cisco or some other) I have a device running a complete SNMP agent. If I 
buy another router of the same type, I'll have another device running another 
SNMP agent of the same type with a different IP address.
There are no "table of devices" concept in this situation. I think this is a 
good situation.

But I have devices with a very low CPU performance, so I can't implement a 
complete SNMP agent inside. Just some simple RS232/RS485 protocol.
In this situation I want to use a single Linux box with a single main and sub-
agent that talks to devices.
In this case the agent must distinguish the receiver device from OID itself, 
because the IP address is the same for all of them. And the solution could be a 
table of devices (the device to send the SNMP request by RS232 is the index of 
the table).

I think these two scenarios are very different from the point of view of user 
and agent. 
In the first case there are no "table of devices" seen by the user during the 
tree walk and the user can address to a certain device by using the IP address. 
In the second scenario, there is a "table of devices" in the walk and the user 
can address a request to a certain device by using a different index of the 
table.
But I think the sub-agent is also different in the two scenarios.
In the first, it's very simple: the sub-agent registers OIDs related to the 
device connected to it and converts the received requests (like a SNMP/RS232 
gateway). If all the parameters are simple scalar, the agent doesn't manage any 
table.
In the second case, the situation is more complex. Each device parameter is 
accessed by an OID that conveys informations about the device (index of a 
"table of devices"). Even in the case all parameters are scalar, the agent must 
be able to manage tables (almost the "table of devices").
And I think the MIB is different too!
In the first case:
    enterprises
        mycompany
            devA
            devB
            devC
            devD
In the second case:
    enterprises
        mycompany
            devATable
            devBTable
            devCTable
            devDTable


I'm very sorry, but I can't understand your point of view. Please, be patient 
with me :)


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to