1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Tracking down a Port from an IP Address

Discussion in 'General Cisco Certifications' started by NetEyeBall, Jan 12, 2007.

  1. NetEyeBall

    NetEyeBall Kilobyte Poster

    279
    10
    45
    This might help you track down the port number that a server resides on and then you can do a show int to see if that port is not connected.

    Open Command Box.
    Traceroute to the IP.
    Telnet to the last hop.
    Check log file for anything interesting.

    sh arp | include (xxxx.yyyy.xxxx.yyyy)

    ! Note xxxx.yyyy.xxxx.yyyy is the IP address.
    ! Note the | is the key above the enter key.
    ! Note this will get you the MAC Address associated with the IP Address.


    sh mac-address-table address xxxx.yyyy.xxxx

    ! Note xxxx.yyyy.xxxx is the MAC Address
    ! Note this will get you the port number, however the port might be a switch rather then a host.


    sh cdp neighbors

    or

    sh cdp neighbors XX/X ! Note where XX/X is the port number. Example G0/1


    ! Note look for the port number. If it isn't in the CDP Neighbors then most likely the port is connected to the host in question. If it is listed then you have to take the name of the device and do the following to get the IP Address:

    sh cdp neighbors detail | begin (XXXX)

    or

    sh cdp neighbors XX/X detail ! Note where XX/X is the port number. Example G0/1

    ! Note the (XXXX) is the name of the device.
    !Note this will get you the IP of the device so you can telnet to this device and do this process again until you track down the port of the host or can't go any further due to the time out of the ARP Cache.


    I hope this helps. I use this regularly to track down ports to see how they are configured to check the switch a device is on and so on.
     
    Certifications: CCNA, A+, N+, MCSE 4.0, CCA
    WIP: CCDA, CCNP, Cisco Firewall

Share This Page

Loading...