November 9, 2012

How to test SNMP in Windows Server 2008 R2

Working with Unix based system I used to use SnmpWalk tool to test Simple Network Management Protocol.

Today I have a task to test SNMP protocol using my Windows workstation.

I install SNMP service on remote Windows Server 2008 R2 (optionally you can install WMI Provider):


Configure community. In my case I used MyCommunity without trap and any security configuration that is not best practice (It is configured just for testing purpose):

 

Then test SNMP via SnmpWalk for windows (http://www.snmpsoft.com/freetools/snmpwalk.html)

snmpwalk -r:192.168.1.1 -c:MyCommunity

Where 192.168.1.1 - ip address of server where SNMP service is configured.
MyCommunity - configured community name.

SnmpWalk command line syntax:

   -q               Quiet mode (suppress header; print variable values only).
   -r:host          Name or network address (IPv4/IPv6) of remote host.
   -p:port          SNMP port number on remote host. Default: 161
   -t:timeout       SNMP timeout in seconds (1-600). Default: 5
   -v:version       SNMP version. Supported version: 1, 2c or 3. Default: 1
   -c:community     SNMP community string for SNMP v1/v2c. Default: public
   -ei:engine_id    Engine ID. Format: hexadecimal string. (SNMPv3).
   -sn:sec_name     SNMP security name for SNMPv3.
   -ap:auth_proto   Authentication protocol. Supported: MD5, SHA (SNMPv3).
   -aw:auth_passwd  Authentication password (SNMPv3).
   -pp:priv_proto   Privacy protocol. Supported: DES, IDEA, AES128, AES192,
                    AES256, 3DES (SNMPv3).
   -pw:priv_passwd  Privacy password (SNMPv3).
   -cn:cont_name    Context name. (SNMPv3)
   -ce:cont_engine  Context engine. Format: hexadecimal string. (SNMPv3)
   -os:start_oid    Object ID (OID) of first SNMP variable to walk. Default:.1
   -op:stop_oid     Object ID (OID) of last SNMP variable to walk.
                    Default: walk to the very last variable.
   -csv             Output in CSV (Comma Separated Values) format.

1 comment:

  1. Anonymous12 July, 2017

    Admiring the hard work you put into your blog and in depth information you offer.
    It's awesome to come across a blog every once in a while that isn't the same outdated rehashed material.
    Excellent read! I've saved your site and I'm adding your
    RSS feeds to my Google account.

    ReplyDelete