how to find ip --switching

Answered Question
Dec 19th, 2009
User Badges:

Hi seniors,


I am new in networking field and studying Cisco stuff on daily basis. Questions are -


1- How to know the port of the device if IP is know but MAC is unknow ?


2- Say there are 8 switches attached in a stack, and one PC is attached to a switch , only IP is know, how to know what is that particular switch the PC is attached to ?


Thanks you all.


Tahir.

Correct Answer by Jon Marshall about 7 years 6 months ago

tahir1234 wrote:


Hi seniors,


I am new in networking field and studying Cisco stuff on daily basis. Questions are -


1- How to know the port of the device if IP is know but MAC is unknow ?


2- Say there are 8 switches attached in a stack, and one PC is attached to a switch , only IP is know, how to know what is that particular switch the PC is attached to ?


Thanks you all.


Tahir.


Tahir


If you only know the IP then you need to go to the L3 device ie. router or L3 switch that is the default-gateway for the client. Then


1) "sh arp | include "   will give you the mac-address


then log onto one of the switches and


2) "sh cam "


the result will either be the port the device is attached to or it may be a trunk port. If it is a trunk port then you will need to find out the switch on the other end of the trunk link, log onto that switch and then repeat step 2.


You can use CDP to find details of device attached via trunk ie.


sh cdp neigh detail


Jon

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Correct Answer
Jon Marshall Sat, 12/19/2009 - 09:36
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

tahir1234 wrote:


Hi seniors,


I am new in networking field and studying Cisco stuff on daily basis. Questions are -


1- How to know the port of the device if IP is know but MAC is unknow ?


2- Say there are 8 switches attached in a stack, and one PC is attached to a switch , only IP is know, how to know what is that particular switch the PC is attached to ?


Thanks you all.


Tahir.


Tahir


If you only know the IP then you need to go to the L3 device ie. router or L3 switch that is the default-gateway for the client. Then


1) "sh arp | include "   will give you the mac-address


then log onto one of the switches and


2) "sh cam "


the result will either be the port the device is attached to or it may be a trunk port. If it is a trunk port then you will need to find out the switch on the other end of the trunk link, log onto that switch and then repeat step 2.


You can use CDP to find details of device attached via trunk ie.


sh cdp neigh detail


Jon

tahir1234 Sat, 12/19/2009 - 10:28
User Badges:

Jon thanks for reply.


One think I forgot to ask in previous post,


-for the same scenarious  , what would if switches are CATOS running on them,,


Thanks again.

Ganesh Hariharan Sat, 12/19/2009 - 10:27
User Badges:
  • Purple, 4500 points or more
  • Community Spotlight Award,

    Member's Choice, February 2016

Hi,


login into switch then issue a command show arp after wards with mac you can issue show mac-address | in specific mac .


Hope that helps


Regards

Ganesh.H

Reza Sharifi Sat, 12/19/2009 - 11:11
User Badges:
  • Super Bronze, 10000 points or more
  • Cisco Designated VIP,

    2017 LAN

Hello Tahir,


For Cat OS you use

sh cam


For native IOS you use

sh mac-address-table


HTH

Reza

Actions

This Discussion