cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
815106
Views
182
Helpful
39
Replies

find IP address/machine connected to a cisco switch port

trackme
Level 1
Level 1

hello,

I need to know which IP/device is connecetd to a cisco Switch port.

I can get the mac-address of that switch port using sh mac-add command, but with the mac address how can i find that which ip belongs to this mac.

is there way i can do this, i know i can do the other way meaning with IP i can find to which port its connected ,but dont know how to find this MAC to IP with switch without the need for additional tools

39 Replies 39

Alessio - many thanks - very much apreciated.  Chris

sh cdp nei det           

this CLI only shows cisco devices that connect to the switch, won't show any non cisco devices.

show cdp neighbors detail | begin MACADDRESS

Hi Trackme You can use the following command 'show ip arp' to see if the MAC address is  one that has been resolved recently, also you could use "show cdp neighbors detail" and see the type of device, ip , mac address and timers

If this answer was satisfactory for you, please mark the question as Answered.

Thank you

Earl Kacin
Level 1
Level 1

sh ip dev trac ip

Hi,

     Am too late to this post. If you want to find IP connectd to a specific Port enable TP Tracking in your swicth and run,

"sh mac address-table". This will give which MAC is connected to which port.

"sh ip device tracking interface gigabitEthernet ". This will give which IP is connectd to a port.

"sh ip arp" will give you a IP to MAC table

what about the switch doesn't support sh ip dev tra CLI?

ashirkar
Level 7
Level 7

Hey Anantha ,

Hop u r doing good,

If u dont know ip address of devices present on specific vlan and wanted to track end device ip address please try

follow this below

steps 1:ping it to brodcast ip address of subnet

for ex

R1--SW1--SW2--(H1

                             --H2

R1..1.1.1.1/24

H1..1.1.1.2/24

H2.1.1.1.3/24

So u r brodacast ip is 1.1.1.255

ping  1.1.1.255

Sending 1000, 100-byte ICMP Echos to 1.1.1.255, timeout is 2 seconds:

........

Reply to request 8 from 1.1.1.2, 28 ms

Reply to request 9 from 1.1.1.3, 64 ms

u will get reply from all host present on that segment and ur arp table will get flood with ip and respective mac on

your L3 device...(R1 in this example)

Step2: then u can use command

sh ip arp ..to see ip and respective mac associate with it

R1#sh ip arp

Protocol  Address          Age (min)  Hardware Addr   Type   Interface

Internet  1.1.1.1                 -   c000.2498.0000  ARPA   Vlan2

Internet  1.1.1.2                 0   c003.2498.0000  ARPA   Vlan2

Step3: see the mac learned from specific port

R1#sh mac address c003.2498.0000

Destination Address  Address Type  VLAN  Destination Port

-------------------  ------------  ----  --------------------

c003.2498.0000          Dynamic       2     FastEthernet1/1

Step4:If  u have all cisco devices then u can use CDP

to check wht device connect to ur interface

R1#sh cdp ne fa1/1 detail

-------------------------

Device ID: SW1.lab.local

Follow this way, hop u will trace devices present on ur network

Hop this informative,

Regards,

Ashish shirkar

rajeev_k_ranjan
Level 1
Level 1

Hello trackme,


Is this question still on? Have you got answer for what you were looking? IF so, please post it here and mark it answered.


If not, i would like to thank you for asking such question and thank you everyone for posting all the relevant answers. I was too looking if we can track IP of a device using MAC or interface known.


I tried everything mentioned above but, hard luck. Nothing worked. Finally, i tried this to track IP which worked for me:


sh ip dhcp snooping binding interface gig 1/0/2 ---if you know the interface

sh ip dhcp snooping binding mac XXXX.XXXX.XXXX ---if you know the MAC

Assuming that DHCP snooping is enabled.


or sh ip source binding

or sh arp | in xxxx.xxxx.xxxx


Hope, this helps you as well.


Regards,

Rajeev

walter baziuk
Level 5
Level 5

the best answer seems to be

log onto the rtr or gateway device

ping the broadcast addreess of the vlan in question

sh ip arp

all devices with an ip will respond and be visble in the arp table

note, some devices "may" not respond. they are designed that way , for specific reasons

all devices with an ip will respond and be visble in the arp table

note, some devices "may" not respond. they are designed that way , for specific reasons

Actually, only Cisco routers respond to pings to the broadcast address. PCs and other endpoints do not. So it a technique of limited use.

If you have Mac Address than , login to your cisco l3 switch which is connected to L2 Switch ,

In Cisco L3 Switch Type # sh ip dhcp binding assigned . here u need to find exact mac address which is might be start with 01 or 11 . thats it , there only u will find ip address which is associated to relevent Mac address.

othere than u can also enable cdp discovery in switch and type #sh cdp nei details

Ravi Singh
Level 7
Level 7

You can use the below command to check the ip address of devices

"show ip arp | include "

or

show cdp neighbors detail | begin MACADDRESS

Collin Clark
VIP Alumni
VIP Alumni

IMO it pays off to know how to do this instead of paying for and using some 3rd party tool. Here's a write up I did for some teammates.

http://www.packetpros.com/2012/08/find-device-in-network.html

Sent from Cisco Technical Support Android App

Hi, 

I know your answer is 3 years old but I think your information would be a great asset to me as I am just starting out with Cisco devices in a very large environment. The URL you reference no longer exists. If your'e still around could you repost a valid link?

Thanks so much.

Jeffrey Weller 

Network Administrator 

Review Cisco Networking for a $25 gift card