1

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?

3

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.

  • It is giving me a list of IPs, out of which the last IP is my switch IP. Thanks – Amit24x7 Jul 4 '17 at 13:17
0

tcpdump is used for sniffing network traffic, I feel like that might be an overkill in your situation. If you are connected to your router directly, just use route where gateway ip is an address of the next hop. Which is, with a high probability, an address of your router.

  • I know my gateway IP already. The switch IP is one from which I'll be able to access my network switch as I'm to change few configurations like VLANs and LACP. – Amit24x7 Jul 4 '17 at 7:53
-1

As always, RTFM. Googling finds the manual, 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.

  • For your kind information, the IP address is already been configured by DHCP server. Unfortunately, the infrastructure is a remote setup so we can't reconfigure it by physical connection and to do telnet we need that IP which is not known to us. – Amit24x7 Jul 4 '17 at 11:02
  • It would have been nice to have this information in the question ... see edit. – dirkt Jul 4 '17 at 11:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.