Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to find the IP of a switch, in order to set it to factory defaults.

I heard there's a command for HP Switches to find all surrounding HP Switches. What is it?

share|improve this question
If you just want to reset the switch to factory defaults there should be a reset button or serial port you could use to do that. You will want to consult the manual since pushing the reset button is seldom enough to wipe the config. You may need to push additional buttons or watch for LEDs to flash before releasing the buttons, etc. Otherwise, If you need the IPs I would go with harrymc's answer of using a network scanner or you could use something like wireshark and watch for spanning tree protocol or other switch traffic. – chuck Aug 18 '11 at 13:19

You will want to run this command:

sho cdp neighbors det

cdp is the Cisco Discovery Protocol, but this command still works on Procurve switches.

As an alternative you can also run this:

sho lldp info remote-device

lldp is the Link Layer Discover Protocol. The SysName column will display the host name of the remote switch.

To map out your network, you will start at an edge switch, run these commands, then ssh to those remote switches. Once on the remote switch, repeat this process.

share|improve this answer

Are you looking for a network scanner, such as The Dude, SoftPerfect Network Scanner or Nmap ?
A switch should have a web interface and a telnet interface.

Another approach would be to use the arp command to find its IP address from the Mac address (which should be physically labeled on it somewhere).


nmap -sP >/dev/null && arp -an | grep <mac address here> | awk '{print $2}' | sed 's/[()]//g'
share|improve this answer
Could you tell me more about the ARP command? ARP isn't my speciality. – tom Aug 18 '11 at 13:06
Under Linux you can find it as a man page. There is information on it all over, just google for it. example. – harrymc Aug 18 '11 at 14:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .