Question: I'm using the below Network Switch:

```
HPE ProCurve J8697A Switch 5406zl
Software Revision K.14.34

```

I'm advised to execute the below command to know my network switch IP:

```
tcpdump -i net0 ether proto 0x88cc -v -c 5

```

It is showing the following output but not executing completely and getting stuck there:

```
dropped privs to nobody
tcpdump: listening on net0, link-type EN10MB (Ethernet), capture size 262144 bytes

```

On giving `Ctrl`+`C`, it shows below output:

```
root@solaris:~# tcpdump -i net0 ether proto 0x88cc -v -c 5
dropped privs to nobody
tcpdump: listening on net0, link-type EN10MB (Ethernet), capture size 262144 bytes
^C
0 packets captured
607908 packets received by filter
0 packets dropped by kernel
root@solaris:~#

```

What is this command doing? Why is it not giving the expected output and is there any other command to know the same?

Answer: 
I guess you can, if you are connected to a host which is directly wired to the switch, do a :

```
ping -b <yourBroadcastAddress>

```

Chances are only the switch will answer as it will, most likely, depending on the brand of the switch and configuration, block broadcast ping from being forwarded.
As always, RTFM. Googling finds the [manual](http://whp-aus2.cold.extweb.hp.com/pub/networking/software/5400zl-InstallGuide-June2006-59914713.pdf), and on p. 2-20 it says:

> 
> The console can be accessed through these methods:
> 
> 
> * Out-of-band: Connect a PC or VT-100 terminal, to be used as a console,
>  directly to the switch using the serial cable that comes with the Series
>  5400zl Switches. If the PC or terminal has a 25-pin serial connector, you
>  can use a readily available 9-pin to 25-pin serial cable, or attach a 9-to-25
>  pin straight-through adapter to the PC end of the cable.
> * In-Band: Access the console using telnet from a PC or UNIX station on
>  the network, and a VT-100 terminal emulator. This method requires that
>  you first configure the switch with an IP address and subnet mask by using
>  either out-of-band console access or through DHCP/Bootp.
> 
> 
> 

So, use the serial cable and **configure** the IP address, or connect the switch to a LAN segment with a working DHCP server, then the DHCP server will **assign** it a (transient) IP address (identified by the MAC address of the switch's internal interface).

Listening with `tcpdump` will tell you nothing (an initial DHCP request broadcast if you are lucky) unless the DHCP server is already working, in which case you can just look up the address in the DHCP server data without bothering with `tcpdump`.

So, there is no "command to tell you the IP address". You must use the correct infrastructure.

**Edit**

If the switch already has an IP address (by console or DHCP), and if you are not able to sniff the DHCP negotiation (because you can't reboot the switch, and/or the negotiation happens on a different segment), then you are just out of luck.

You can try to scan your IP range (you *have* got an IP range from the DHCP server behind the switch, haven't you?) with `nmap`, `ping` etc. and hope you get an answer, but if the switch is configured to have its internal IF only on the segment where it got the DHCP answer, you are again out of luck.

Best solution is to have someone go there *once*, access the switch physically, fix the IP address in the console, and tell everyone who needs to know.

If you don't have permission to access the switch physically, you probably also don't have permission to access its console interface.