Command to know the Network Switch IP

9,031

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.

Share:
9,031

Related videos on Youtube

Amit24x7
Author by

Amit24x7

Graphic designer, front-end and back-end developer, bash lover, part-time photographer and a friend.

Updated on September 18, 2022

Comments

  • Amit24x7
    Amit24x7 almost 2 years

    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?

  • Amit24x7
    Amit24x7 almost 7 years
    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
    Amit24x7 almost 7 years
    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.
  • dirkt
    dirkt almost 7 years
    It would have been nice to have this information in the question ... see edit.
  • Amit24x7
    Amit24x7 almost 7 years
    It is giving me a list of IPs, out of which the last IP is my switch IP. Thanks