December 5, 2018 in network ‐ 2 min read
In this article I want to show you how to find out where physical devices are connected to in a network using HP Switches. Typical scenario, will happen from time to time:
Usually this means that the user is connected to a port configured with a wrong v-lan on it. If there is a clean documentation that issue should be quite easy to solve. Unfortunately you sometimes have to deal with customers that seem to have guerilla cabeling written in thier company policy or that have taken over a bad IT infrastructure. You will find a cable that runs into a (hopefully) labeled port in the wall and then ends up somewhere in some switch. How do you find out what port has to be reconfigured in order for the customer to be able to work?
First find out the MAC Address of the device you want to find in your network. At a windows machine use ipconfig
, on Linux / Apple use ifconfig
or ip
.
Now login to one of the customers switches using SSH. Check if LLDP is active.
show lldp config
If not you should enable LLDP on all devices first. More details can be found here.
Then check the MAC Address Table of the Switch for the MAC Address of the device you are looking for.
show mac-address <MAC>
The Switch knows that MAC on port 49… Port 49 on a 48 Port Switch is quite a Dead Giveaway that you are looking at a glas uplink to another switch.
Lets look at the MAC Table of port 49. (Or rather filter for devices at that port)
show mac-address ethernet <Interface>
As expected there are quite a lot of devices there. Lets check LLDP what is behind Port 49.
show lldp info remote-device ethernet <Interface>
Aha, another switch. This way you can hop from device to device until you found out what port this device is connected to.
The you can change the v-lan config of that interface and everything should work as expected for the user.
THINK TWICE ABOUT WHAT YOU ARE DOING! IF YOU MESS UP THE V-LAN CONFIG OF AN UPLINK YOU CAN END UP CRASHING THE ENTIRE NETWORK OR PARTS OF IT!
… and if in that case you are not on-site, good night!
Cheers, Ori