Google+

SNMP Simulator Project Logo
SNMP Simulator introduction
Producing SNMP snapshots
Simulating SNMP Agents
Transport-based variation
Sharing snapshots
MIB-based simiulation
Simulation based on captured traffic
Simulation with variation modules
Recording with variation modules
Managing data files
Large scale simulation
Tips and tricks
Download & Install
License
Changelog
Github repo
Adding features
Sponsorship
Simulation Service
Contact
Get SNMP Simulator at SourceForge.net. Fast, secure and Free Open Source software downloads

Transport address based variation

Sometimes Managers can't easily change community name to address particular simulated device instance as mention in the previous section. Or it may be useful to present the same simulated device to different SNMP Managers differently.

When running in --v2c-arch mode, Simulator (version 0.1.4 and later) would attempt to find device file to fullfill a request by probing files by paths constructed from pieces of request data. This path construction rules are as follows:

community / transport-ID / source-address .snmprec
community / transport-ID .snmprec
community .snmprec

In other words, Simulator first tries to take community name, destination and source addresses into account. If that does not match any existing file, the next probe would use community name and destination address. The last resort is to probe files by just community name, as described in previous chapters.

Transport ID is an OID that also identifies local transport endpoint (e.g. protocol, local address and port Simulator is listening on). It is reported by the Simulator on startup for each endpoint it is listening on.

When mapping source-address into a file, the following transformation rules apply:

UDP/IPv4:

192.168.1.1 remains 192.168.1.1

UDP/IPv6:

fe80::12e:410f:40d1:2d13 becomes fe80__12e_410f_40d1_2d13

UNIX local domain sockets

/tmp/snmpmanager.FAB24243 becomes tmp/snmpmanager.FAB24243

For example, to make Simulator reporting from particular file to a Manager at 192.168.1.10 whenever community name "public" is used and queries are sent to Simulator over UDP/IPv4 to 192.168.1.1 interface (which is reported by Simulator under transport ID 1.3.6.1.6.1.1.0), device file public/1.3.6.1.6.1.1.0/192.168.1.10.snmprec would be used for building responses.

When Simulator is NOT running in --v2c-arch mode, e.g. SNMPv3 engine is used, similar rules apply to SNMPv3 context name rather than to SNMPv1/2c community name. In that case device file path construction would work like this:

context-name / transport-ID / source-address .snmprec
context-name / transport-ID .snmprec
context-name .snmprec

For example, to make Simulator reporting from particular file to a Manager at 192.168.1.10 whenever context-name is an empty string and queries are sent to Simulator over UDP/IPv4 to 192.168.1.1 interface (which is reported by Simulator under transport ID 1.3.6.1.6.1.1.0), device file 1.3.6.1.6.1.1.0/192.168.1.10.snmprec whould be used for building responses.


Need help? Try snmpsim mailing lists or contact us.