SNMP simulator installation guide

Posted on November 13, 2013

About SNMP Simulator

The the SNMP Simulator software is intended for testing SNMP Managers against a large number of SNMP Agents that represent a potentially very large network populated with different kinds of SNMP-capable devices.

Refers to its project page for more info.

Why?

With SNMP simulator you can simulate a device by the output of SNMPwalk without considering MIB files.

This article is about how to install SNMP Simulator.

  1. Install Python

    Download/execute Python installation files from the official website.

    Installation option:

    Installation setting
    Installation setting
  2. Install PyCrypto

    SNMP simulator depends on the packages:

    • PyASN1
    • PySNMP
    • PyCrypto
    • pysmi
    • ply

    It always fails when installing PyCrypto by pip with error:

    running build_ext
    warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
    building 'Crypto.Random.OSRNG.winrandom' extension
    error: Unable to find vcvarsall.bat
    ----------------------------------------
    Command d:\program files (x86)\python3.5\python.exe; -u -c import setuptools,tokenize;__file__='D:\\temp\\OSTEMP\\pip-build-9o27ywdt\\pycrypto\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec')) install --record D:\temp\OSTEMP\pip-3h_5j6n8-record\install-record.txt --single-version-externally-managed --compile failed with error code 1 in D:\temp\OSTEMP\pip-build-9o27ywdt\pycrypto\
    

    Refer to stackoverflow, I would like to install a build distribution from 3rd party.

    • For Python 2.6, 2.7, 3.2, 3.3, 3.4

      Visit the link to select/download Pycrypto installation file, execute the file to finish PyCrypto setup

      E.g.:

      • For Python3.4 32bit, choose pycrypto-2.6.1.win32-py3.4.exe

      • For Python3.4 64 bit, choose pycrypto-2.6.1.win-amd64-py3.4.exe

    • For Python3.5

      Install PyCrypto by pip command

      • 64-bit

        pip install --use-wheel --no-index --find-links=https://github.com/sfbahr/PyCrypto-Wheels/raw/master/pycrypto-2.6.1-cp35-none-win_amd64.whl pycrypto
        
      • 32bit

        pip install --use-wheel --no-index --find-links=https://github.com/sfbahr/PyCrypto-Wheels/raw/master/pycrypto-2.6.1-cp35-none-win32.whl pycrypto
        
  3. Install SNMPsim:

    • Python3.5 and newer versions

      Install SNMP Simulator by pip command:

      pip install snmpsim
      
    • Previous versions:

      Refer to SNMPsim pypi page, copy egg file’s hyperlink to install it by easy_install tool

      easy_install.exe egg_file_hyperlink
      
  4. Run it:

    Installation Done
    Installation Done

Note:

  • If Python is not in your OS path environment, enter to pip folder by command:

    cd $python installation folder$/scripts
    

    when the installation was done, snmpsimd.py also in the folder: python installation folder/scripts

  • Pycrypto installation issue

    On Linux, you may meet an issue:

    warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
    src/MD2.c:31:20: fatal error: Python.h: No such file or directory
    compilation terminated.
    

    Solution:

    Install Python-dev by apt-get command

    sudo apt-get install python-dev
    
  • Newer version is strongly recommended

    Checked the changelog from its official website.


SNMP simulator installation guide


donation

Scan the QR code using WeChat

comments powered by Disqus