One approach would be to get a list of all IP addresses on your network
(via. some sort of discovery process) and then do a walk (from the mib-2
should be able to determine what mib-2 objects are being managed.
Obviously, you manager must be aware of rfc1213, but it also needs to know
of the as many of the other transmission subgroup rfc's that you might
encounter at the various agents, that is if you desire meaningful
mib-variable names in the walked results.
All this presupposes that the agents are standard agents (running on UDP
port 161 with a common read community string, like 'public'). It won't
discover agents running on other ports, v2-only agents (but I assume that
any agent designed for v2 can also exchange v1 packets), and the variety of
distributed agents (proxied, sub-agents, etc.).
> How is it possible to obtain the list of common and different
> objects maintained by devices on different layers of network hierarchy
> on relatively painless and automated way(suitable for use in programm)?
> I am interested only in objects under mgmt.mib-2 node(e.g. no private ,
> no security branches of tree)