[Beowulf] How can i get the port number of a switch port viasnmp?
Zhang Hui
spacetiller at 163.com
Thu Sep 8 17:57:58 PDT 2005
Firstly thank you for reply.
>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
>
Of course the switch is manageable via snmp.And the tutorial for net-snmp is covered too.
I have searched the result of "snmpwalk" to this switch, ending with some oids standing for the port numbers and the port macs.However, every oid is of fixed meaning.I just can't find the oid standing for the "enable/disable" function of my wanted port number, which is so hard to get.
>--
>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
>
>
>
= = = = = = = = = = = = = = = = = = = =
致
礼!
Zhang Hui
spacetiller at 163.com
2005-09-09
More information about the Beowulf
mailing list