DAEnetIP2
User Manual
12 Sep 2013
12.4.
Control from command line
12.4.1. Windows
Net-snmp is command line tool for accessing SNMP based network devices under
windows console. By default it is not included in Windows OS.
DAEnetIP2
can be
easily accessed by the net-snmp tool. This is very useful when the snmp commands
must be executed from batch file for example.
Bellow are the steps for installing
net-snmp
tool on windows OS.
1. Download the last version net-snmp binary for windows from
http://net-
snmp.sourceforge.net/download
. The file must look like net-snmp-X.X.X.X-
X.win32.exe
2. Install the downloaded file. Leave the default options. The packet will be install
in c:\usr by default.
3. Download the DAEnetIP2 MIB file from
here
4. Copy the mib file here c:\usr\share\snmp\mibs
5. Add new line in the file c:\usr\etc\snmp\snmp.conf with the "mibs all" directive.
6. Now you can test different commands for OID access, supported by this
module. Their names you may see in the DAEnetIP2.mib file.
A simple test may be done to be sure if the tool is installed successfully:
run->cmd->
snmpget -v1 -c 000000000000 172.16.100.2 .1.3.6.1.4.1.19865.1.1.1.0
answer: SNMPv2-SMI::enterprises.19865.1.1.1.0 = IpAddress: 172.16.100.2
For creating batch files, you may use the following steps:
1. Open new file and save it as ON.bat
2. Enter the following code:
snmpset -v1 -c private 172.16.100.2 .1.3.6.1.4.1.19865.1.2.2.1.0 i 0
PING 1.1.1.1 -n 1 -w 5000
snmpset -v1 -c private 172.16.100.2 .1.3.6.1.4.1.19865.1.2.2.1.0 i 1
1. Save the file
2. Run it.
-
43
-