[Beowulf] How can i get the port number of a switch port via snmp?
Robert G. Brown
rgb at phy.duke.edu
Thu Sep 8 10:06:56 PDT 2005
On Thu, 8 Sep 2005, Zhang Hui wrote:
> Hi,all
>
> I need to disable a switch port my machine is connected to. But first I have to know the port number,haven't i?
> So how can i get the port number?
> Or, anyone gets better ideas? Thanks a lot.
Is your switch managed or unmanaged? If unmanaged, I don't believe you
can, at least in software -- unplug it is about all you can do (although
you can also take down the connecting NIC).
If managed, then it probably speaks SNMP. I'm not an expert on SNMP but
IIRC you may need a device specific toolkit to manage it, depending on
who makes the switch and how portable they really made the interface.
You might look here:
http://net-snmp.sourceforge.net/tutorial/tutorial-5/
for starters -- I believe this is a linux/OS snmp toolkit that may do
all that you need to do, with examples.
Remember GIYF.
rgb
--
Robert G. Brown http://www.phy.duke.edu/~rgb/
Duke University Dept. of Physics, Box 90305
Durham, N.C. 27708-0305
Phone: 1-919-660-2567 Fax: 919-660-2525 email:rgb at phy.duke.edu
More information about the Beowulf
mailing list