WTCS.ORG |
SNMP49X
(Implementing SNMP on Windows 95/98)
Things you
ought to know about SNMP on Windows 95/98
Implementation Details
Well, to begin with, you may be a little disappointed with the level of SNMP monitoring you can do with the SNMP support services from Microsoft. You can only access the MIB-2 (.1.3.6.1.2.1) tree. There is no Private Enterprises level monitoring (.1.3.6.1.4.1.311). SORRY! Here is what you can browse (try getif):
.1.3.6.1.2.1.1 (system)
.1.3.6.1.2.1.2 (interfaces)
.1.3.6.1.2.1.3 (at)
.1.3.6.1.2.1.4 (ip)
.1.3.6.1.2.1.5 (icmp
.1.3.6.1.2.1.6 (tcp)
.1.3.6.1.2.1.7 (udp)
(you could also use SNMPUTIL.EXE if you wanted to).
Straight out of the box, SNMP under Windows 95/98 is set up for a community called public and no sysContact or sysLocation. If you want to add a sysContact, sysLocation or change the community name you will need to "hack" the registry. You can either do this through regedit.exe (kinda messy) or from the command line like so:
1) Download the appropriate file
(snmpw95reg.fil for Windows
95) or snnpw98reg.fil for Windows98)
2) Save it as eithe c:\temp\snmpw95.reg or c:\temp\snmpw98.reg (depending on the OS
version)
3) Edit c:\temp\snmpw95.reg or snmpw98.reg (using notepad.exe)
4) Change the appropriate line(s). See Windows 95
or Windows 98 examples below
Leave the sysServices line alone!
5) Save the file again
6) Open a DOS prompt (start/run/command)
7) BACKUP YOUR REGISTRY (SYSTEM.DAT)
The following DOS commands should work fine...
md c:\windows\dat_save
attrib -r -s -h c:\windows\system.dat
copy c:\windows\system.dat c:\windows\dat_save
attrib +r +s +h c:\windows\system.dat
(continued after the following short
interruption...)
BY THE WAY ...it
is probably a good idea to perform step 7 periodically anyway. It just might save
your bacon if you toast your system. If you do, the recovery steps would be...
1) Boot the system to a DOS
prompt (bypass system files)
2) Type the following commands
attrib -r -s -h c:\windows\system.dat
copy c:\windows\dat_save\system.dat c:\windows
attrib +r +s +h c:\windows\system.dat
3) Reboot the system (and cross your fingers, toes, teeth, whatever!)
(moving right along ...)
8) regedit c:\temp\snmpw95.reg or regedit c:\temp\snmpw98.reg (you should
see a message like "snmpw9x.reg sucessfully entered into registry).
9) del c:\temp\snmpw95.reg or del c:\temp\snmpw98.reg
10) Reboot the system
That's all folks!
FILE
(SNMPW95.REG) STARTS BELOW THIS DOTTED LINE (cut and paste if you want)
-----------------------------------------------------------------------------------------------------
REGEDIT4
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\SNMP\Parameters\RFC1156Agent]
"sysContact"="Put your name/tel/pager/email in here"
"sysLocation"="Put the computer's location here"
"sysServices"=hex:4c,00,00,00
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\SNMP\Parameters\ValidCommunities]
"1"="public"
-----------------------------------------------------------------------------------------------------
FILE (SNMPW95.REG) ENDS ABOVE THIS DOTTED LINE
FILE
(SNMPW98.REG) STARTS BELOW THIS DOTTED LINE (cut and paste if you want)
-----------------------------------------------------------------------------------------------------
REGEDIT4
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\SNMP]
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\SNMP\Parameters]
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\SNMP\Parameters\EnableAuthenticationTraps]
"switch"=hex:01,00,00,00
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\SNMP\Parameters\ExtensionAgents]
"1"="SOFTWARE\\Microsoft\\RFC1156Agent\\CurrentVersion"
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\SNMP\Parameters\PermittedManagers]
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\SNMP\Parameters\TrapConfiguration]
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\SNMP\Parameters\TrapConfiguration\1]
"192.168.200.10"="1"
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\SNMP\Parameters\RFC1156Agent]
"sysContact"="Garth K. Williams - garth.williams@home.com"
"sysLocation"="Kidz Computer (Basement)"
"sysServices"=hex:4c,00,00,00
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\SNMP\Parameters\ValidCommunities]
"1"="communityname1"
"2"="communityname2"
-----------------------------------------------------------------------------------------------------
FILE (SNMPW98.REG) ENDS ABOVE THIS DOTTED LINE
It is not likely that Microsoft will improve the level of SNMP monitoring here. From what I can tell, if one wanted to get into the SDKs (Software Development Kits) from MS, then they COULD access more (performance) statistics through SNMPAPI.DLL. I'm not a programmer, but I am a bit intrigued. I may delve into this a bit later.
Meantime, if you want to see what Microsoft has for support for these ooperating systems, click either of the images below!
To return the the main page, click
the
logo!