any way to view host IP from router?

superbabe_uksuperbabe_uk Member Posts: 23 ■□□□□□□□□□
I was wondering if there is any to have a router display the IP addresses of its connected hosts?

- something similar to cdp neighbors

thanks!

Comments

  • ehndeehnde Member Posts: 1,103
    I was wondering if there is any to have a router display the IP addresses of its connected hosts?

    - something similar to cdp neighbors

    thanks!

    You typically wouldn't have hosts directly connected to a router, unless it's a multi-layer device of some sort with more than a few ports. You can try using
    show ip route
    or
    show ip int brief
    

    ...or if you haven't assigned addresses
    show log
    
    could be useful.

    Your running config is likely to have the information you are wanting as well. Now if your hosts are connected to a switch, try this from your switch:
    show mac?
    

    Take a look at the mac address table to see your hosts on the switch.

    Hope that helps!
    Climb a mountain, tell no one.
  • miller811miller811 Member Posts: 897
    ping the broadcast address
    ie 192.168.1.255

    the run show arp
    I don't claim to be an expert, but I sure would like to become one someday.

    Quest for 11K pages read in 2011
    Page Count total to date - 1283
  • phobophilephobophile Member Posts: 34 ■■□□□□□□□□
    I figure show arp would achieve what you are looking for.

    Example (some details omitted, production network!):
    ROUTER#sh arp
    Protocol  Address          Age (min)  Hardware Addr   Type   Interface
    Internet  10.xxx.xxx.1             -   xxxx.xxxx.xxx1  ARPA   FastEthernet0/1.xxx
    Internet  10.xxx.xxx.2             0   xxxx.xxxx.xxx2  ARPA   FastEthernet0/1.xxx
    Internet  10.xxx.xxx.5             6   xxxx.xxxx.xxx3  ARPA   FastEthernet0/1.xxx
    Internet  10.xxx.xxx.6             0   xxxx.xxxx.xxx4  ARPA   FastEthernet0/1.xxx
    Internet  10.xxx.xxx.7             0   xxxx.xxxx.xxx5  ARPA   FastEthernet0/1.xxx
    

    From there, if you have the hosts on a switch, then switch to the router, you can ran a show mac-address-table command on the switch.
    SWITCH#sh mac-address-table 
              Mac Address Table
    -------------------------------------------
    
    Vlan    Mac Address       Type        Ports
    ----    -----------       --------    -----
     xxx    xxxx.xxxx.xxx1    STATIC      Fa0/19 
     xxx    xxxx.xxxx.xxx2    STATIC      Fa0/10 
     xxx    xxxx.xxxx.xxx3    STATIC      Fa0/6 
     xxx    xxxx.xxxx.xxx4    STATIC      Fa0/12
    

    And then, if you know what device is plugged into what switch port, you can use an output modifier (|, aka "pipe") when issuing the sh arp command again on the router, to locate that single IP address.
    ROUTER#sh arp | inc xxxx.xxxx.xxx4
    Internet  10.xxx.xxx.6             2   xxxx.xxxx.xxx4  ARPA   FastEthernet0/1.xxx
    

    I assume that is the information your looking for, but if someone else has another suggestion, please let us know.
  • superbabe_uksuperbabe_uk Member Posts: 23 ■□□□□□□□□□
    beautiful. thanks guys!
  • chrisonechrisone Member Posts: 2,278 ■■■■■■■■■□
    If your router is providing DHCP services you can see how many IP addresses you have leased and to whom. That is another method of finding out who is connected.
    Certs: CISSP, EnCE, OSCP, CRTP, eCTHPv2, eCPPT, eCIR, LFCS, CEH, SPLK-1002, SC-200, SC-300, AZ-900, AZ-500, VHL:Advanced+
    2023 Cert Goals: SC-100, eCPTX
Sign In or Register to comment.