FreakoutITGeek's Blog

Random IT postings from Freakz

Monthly Archives: December 2021

Which port in a storm?

I’m sure I’m not the only IT support person that has got frustrated when they move into a new role or location and find that the coms cabinets are a mess, with patch leads of various colours and lengths randomly patched into the nearby switches.

I recently found myself in this situation (again) and without valid documentation.

As is usual for such an organisation, I was not provided with any networking tools beyond a simple “pairs tester” and the possibility of getting hold of a Fluke or NetAlly (previously NetScout) handheld network tool was highly unlikely.

So, as I do, I thought “there must be a way to get the switch port details for a ‘known working’ connection. After all the network tools must get their data from somewhere!”

A quick search online (mostly looking at the Cisco Discovery Protocol [CDP] or Link Layer Discovery Protocol [LLDP]) brought up a lot of interesting possibilities, most relied on having CLI access to the switches or relied on *nix.

Before I go further, I want to acknowledge one of the most interesting pieces of kit, that I have seen relating to this issue, which would definitely help any IT people out there with networking issues…. “Pockethernet”.

Pockethernet is a small (pocket size) network tester and analyser that comes with it’s own wiremap/Loopback adapter and it only costs €249 (possibly less in some countries)

Connecting Pockethernet to your ethernet cable will advise on not only the port details (VLAN, Port, Speed etc), but it can also test the cable (using the adapter) for faults, breaks etc and all this data (and More…) is made available via your mobile device.

But let’s get back to the issue at hand…. What I needed was a way to get the Switch Port details from any Windows PC, without having to buy anything (I could only buy from certain suppliers, who put big markups on anything specialist like network test equipment).

The solution came from a piece of software from Chris Hall called “LDWin” (available on github).

LDWin is a tool Chris created using my old IT support hackers goto tool “AutoIt” and the freeware tool tcpdump.

If you want to understand how it works he has left the uncompiled AutoIt script on GitHub, which can be opened in your favourite text editor.

The basics of the tool are that you copy the program and files to a folder on a Windows PC, run the software, which opens to a basic Graphical User Interface. You select the network device you want to use (eg the wired ethernet) and let it do it’s thing.

In the background TCPDump is looking for packets that the switch sends (CDP or LLDP) advising which port is in use. [there’s a lot of factors that can stop this working, but that’s for you to look into 😉 ].

After 60 second (or less) the GUI should show details of the port in use and some basic information [including Switch Name, Port, VLAN(s), Switch IP, port Duplex, switch model and VTP domain].

For IT support people who can’t get hold of a Fluke / NetAlly / Pockethernet or similar, this small software tool is a brilliant workaround to a common issue.

(Let’s just hope it doesn’t get flagged as PUA or Malicios software by those overbearing Anti-virus/security scanners).

I hope this helps someone in a similar situation.