Python HowTo: Find the port on a switch that a host belongs to
Apr 08, 2009, 06:11 (0 Talkback[s])
(Other stories by Allen Sanabria)
How to Help Your Business Become an AI Early Adopter
[ Thanks to asanabria6910 for this link.
"The other day I was speaking to a buddy of mine. I asked him
how cool would it be, if you could just get the port on a switch
that you are plugged into, in one line? So since I thought about
it... I figured why not.... I just finished writing the first
revision ( I'm assuming more to come). I must say that I am quite
pleased with it. Right now you can pass the switch you want to talk
too, the community string, and either the MAC or IP address of the
host device. In return you will get the MAC Address, IP Address,
Port Description (VLAN), and Port you are plugged into."