3

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?

1
  • 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, 2011 at 13:19

2 Answers 2

2

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.

0

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).

Example:

nmap -sP 192.168.1.0/24 >/dev/null && arp -an | grep <mac address here> | awk '{print $2}' | sed 's/[()]//g'
2
  • Could you tell me more about the ARP command? ARP isn't my speciality.
    – tom
    Aug 18, 2011 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, 2011 at 14:18

You must log in to answer this question.

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