1

I want to be able to dynamically filter the result of an SNMP walk, via an intermediate agent (a process) based on the interface(IP) where the request came from.

I.e., my scenario is like this, say the walk request can come from two different network interfaces 10.1.1.1 and 11.1.1.1, and I map these to the ID 1 and 2 respectively.

If I have a MIB structure like:

iso.org.dod.internet.private.enterprises.myent.X.Y.<id> ...

The SNMP Agent is responding with all the results, but in the interim process, I want to filter out what is not relevant for that requester, i.e., if the request came from 11.1.1.1, then I will only send out values which match its ID (2)

iso.org.dod.internet.private.enterprises.myent.X.Y.2 ... iso.org.dod.internet.private.enterprises.myent.X.Z.2 ...

etc.

I checked the filter feature in snmpd.conf - I want to be able to do something similar, but dynamically based on where the request is coming from, also I want to know if this can cause issues with the walk - as in, can this cause the lexicographic ordering to fail?

I hope I made my question clear, any hints or pointers to probe further, much appreciated.


EDIT

There can be new MIBs added, with newer versions of software, so I do not want to statically map an IP to allowed OIDs (as in SNMP VACM views). Also, this method makes it difficult to manage, when there are many interfaces(IPs) and many MIBs.

I would want to know, if it is possible to filter out results, dynamically (by looking at the OID, and the requester's IP, if a result is relevant or not)

  • You are just traversing network paths? An snmp-view is not enough for your needs? A view can be defined by the incoming IP... – Nils Oct 14 '15 at 20:18
  • @Nils, I do use SNMP views (VACM), but those are pretty much static (though I dont see how I can map an IP to a view). Also I need to list down each and every OID path that are allowed/disallowed (so, each new MIB addition means - all views need to be modified) - is that correct? – vyom Oct 16 '15 at 7:16
  • Yes, views are static. But why do you need to add additional mibs? Please edit your question and describe your scenario in deeper detail. Is this a router? – Nils Oct 17 '15 at 6:26
  • @Nils, I will add more details. This is a device which can act do routing as well as other network services. – vyom Oct 20 '15 at 5:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.