Linux Today: Linux News On Internet Time.
Search Linux Today
Linux News Sections:  Developer -  High Performance -  Infrastructure -  IT Management -  Security -  Storage -
Linux Today Navigation
LT Home
Contribute
Contribute
Link to Us
Linux Jobs


More on LinuxToday


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)

[ 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."

Complete Story

Related Stories: