Thursday, April 9, 2020

Discover switch port a client device is plugged into?

So I have an original Fluke LinkSprinter that I've been using for a while now, but while it works, it's not the quickest utility. What I really like about it, is the ability to tell me which switch, switch port and VLAN a wall jack is patched to.

I have the data of wall jack to patch panel, but from the patch panel to the switches, not so much. For budgeting reasons, I was shot down on serialized patch cables. So now I get to do the "I Told You So" and spend more money than we saved on my time to trace all the cables.

Most of our workstations are Ubuntu anyways, so if I had a script, a quick Ansible job could let me document my network better than it is.

Ideally, I'm looking for a way to script gathering this data using Python or something, and be able to either plug a laptop into a jack, or run the script via Ansible, and record all the data of what is plugged into what switch. :)

I'm not sure how the LinkSprinter gathers this data, but I can only presume it's something like python on the little embedded device, so I'm looking to replicate that for simplicity, in theory. :)



No comments:

Post a Comment