Link to home
Start Free TrialLog in
Avatar of osloboy
osloboyFlag for United Kingdom of Great Britain and Northern Ireland

asked on

cisco layer 2 switches

Hi Experts,

is there any  direct way or tool  to determine what IP is connected to a certain switch port.

Thanks .
Avatar of ArneLovius
ArneLovius
Flag of United Kingdom of Great Britain and Northern Ireland image

not quite direct

show mac address-table 

Open in new window


this will list all of the MAC addresses that the switch knows, it can be "filtered" by adding a specific port or vlan.

you could then do a "show arp" on the gateway device to correlate between the MAC address and an IP address.

if the switch is running CDP and the connected device is also running CDP, then you could do

show cdp neighbors detail 

Open in new window


this could be further filtered by adding a pipe "|" and the ususal filters
With L3 you can, but with L2 i am not sure, but if you have a L2 switch, give it a try

========
show mac address-table | include f2/28 (switchport)

output:
10 0002.a534.8ff5 dynamic ip f2/28

sh arp | include 0002.a534.8ff5

result:
Internet 10.1.185.251 0 0002.a534.8ff5 ARPA Vlan10
========
You may turn on DHCP snooping on newer L2 switches. Of course, that won't give much info for static addresses.

Tamas
Avatar of osloboy

ASKER

thanks all of your comments, but still i am not able to get the port against mac address.

i also try to find the mac address of my computer in the switch where is my Pc connected.

i give the below  command

# show mac address-table

and copy the result in text file and then try to search mine own computer mac adress in the table but i don't find. Why the switch mac address table don't show my computer mac-address ???
ASKER CERTIFIED SOLUTION
Avatar of ArneLovius
ArneLovius
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
can u paste the output or attach text file here from "sh mac address-table"
and ur MAC address.
Possibilities are there when u have multiple adapter/wireless adapter MAC address you might have searched for different MAC.
Avatar of osloboy

ASKER

great