[SNMP4J] help: multiple context

Liu, Yu M. (NSB - CN/Beijing) yu.m.liu at nokia-sbell.com
Tue Jan 8 00:54:27 CET 2019


Thanks for the info.


Best Regards,
Liu Yu
Tel: +86 10 64798176 (2736 8176)
Email : Yu.M.Liu at nokia-sbell.com

-----Original Message-----
From: Frank Fock [mailto:fock at agentpp.com] 
Sent: 2019年1月7日 16:19
To: Liu, Yu M. (NSB - CN/Beijing)
Cc: snmp4j at agentpp.org
Subject: Re: [SNMP4J] help: multiple context

Hi Yu,
That is intended behavior. The SNMP4J-Agent default context (empty context name) is visible in all SNMPv3 contexts although the explicit context takes precedence if there are registrations for the same OID in requested context and the default context. 

If you want strict separation, you need to put the objects in a second non-null context.

The default context is a kind of fallback context. 

Hope this helps.

Best regards
Frank

> Am 07.01.2019 um 06:39 schrieb Liu, Yu M. (NSB - CN/Beijing) <yu.m.liu at nokia-sbell.com>:
> 
> Hi experts,
> 
> We are using Snmp4J to develop our Subagent. Recently, we need to support multiple context function in our subagent and we follow below reference to achieve that.
> https://doc.snmp.app/pages/viewpage.action?pageId=14155780
> 
> But in our testing, we observe that when we configure context "contexta" and ""(empty) together, then snmpwalk context "contexta" MIB table, it will get some OIDs from context ""(empty) MIB table.
> Below is an example, the id "60" and "61" belong to context "contexta", id "64" and "65" belong to context ""(empty).
> [root@ ~]# snmpwalk -n contexta -v 3 -u test1 -a MD5 -A 12345678 -x 
> DES -X 12345678 -l authPriv 10.76.84.132:31101 
> 1.3.6.1.4.1.94.7.1.4.2.1
> SNMPv2-SMI::enterprises.94.7.1.4.2.1.1.60 = INTEGER: 60
> SNMPv2-SMI::enterprises.94.7.1.4.2.1.1.61 = INTEGER: 61
> SNMPv2-SMI::enterprises.94.7.1.4.2.1.2.60 = STRING: "system-system-test/host-host/container-container/service-service/process-process"
> SNMPv2-SMI::enterprises.94.7.1.4.2.1.2.61 = STRING: "system-system-test/host-host/container-container/service-service/process-process"
> SNMPv2-SMI::enterprises.94.7.1.4.2.1.3.60 = Hex-STRING: 07 E2 02 0A 01 
> 24 21 00 2D 00 00
> SNMPv2-SMI::enterprises.94.7.1.4.2.1.3.61 = Hex-STRING: 07 E2 02 0A 01 
> 24 21 00 2D 00 00
> SNMPv2-SMI::enterprises.94.7.1.4.2.1.4.60 = INTEGER: 600033
> SNMPv2-SMI::enterprises.94.7.1.4.2.1.4.61 = INTEGER: 600034 ...
> SNMPv2-SMI::enterprises.94.7.1.4.2.1.20.64 = ""
> SNMPv2-SMI::enterprises.94.7.1.4.2.1.20.65 = ""
> 
> 
> Would you please help to check if it's normal. Thanks!
> 
> 
> Best Regards,
> Liu Yu
> Tel: +86 10 64798176 (2736 8176)
> Email : Yu.M.Liu at nokia-sbell.com<mailto:Yu.M.Liu at nokia-sbell.com>
> 
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> https://oosnmp.net/mailman/listinfo/snmp4j



More information about the SNMP4J mailing list