Query a network switch

Started by seckner, May 14, 2014, 01:24:04 PM

Previous topic - Next topic

seckner

Wondering how this was done and can WB do it... We loaded Spiceworks on the network today just to see what it was about. As it was inventorying the equipment on the network, somehow it's able to pull not only the network switch it's connected to but the physical port that it's connected to! Does anyone have any idea how they accomplished this? Is it possible to query a switch? We have HP switches but it's really not that far from a Cisco switch. Just really curious!

Deana

Deana F.
Technical Support
Wilson WindowWare Inc.

seckner

Using the info you provided I went on a search - found 2 utilities called snmpget.exe and snmpwalk.exe that allow command line access to the snmp values that can be read - going to play with it tomorrow but it looks promising! Thank you Deana!

....IFICantBYTE

I have been using SNMP stuff in WinBatch for years (basic SNMP v1 get/walk only though) and have made a few utilities we use in the company I work for to monitor and report on our printer fleet and other devices.
I am using the little known built-in com component that Windows uses to interrogate printers (their bi-directional detection of printer capabilities), so it is native to all flavors of Windows.
It is able to be used to look at any SNMP device that has a known community name you can read settings from (so long as you don't need v3 authentication or want to wait for traps, support MIBs etc).

I have not tried any 3rd party .NET distributions that support SNMP yet. Most are not free, but I did find an open source one once that looked good... don't remember what it was but I saved it somewhere in case I wanted to try it one day.

Anyway, I will see if I have the time in the next day or so to pull out some of my SNMP code (can't give you the full source of the utilities I made due to privacy/copyright) and put it in an example script so that you can make use of it if you like.
Regards,
....IFICantBYTE

Nothing sucks more than that moment during an argument when you realize you're wrong. :)

....IFICantBYTE

Seckner,
I have just posted some example SNMP V1 stuff in the Script Exchange area for you.
Regards,
....IFICantBYTE

Nothing sucks more than that moment during an argument when you realize you're wrong. :)