Posted by: paulsuela | May 8, 2009

Trackdown an IP to a switch port

Commands used:

ping <ip address>
show arp | inc <ip address>
show mac address-table | inc <mac address
show cdp neighbor detail

#####  force device to lookup the MAC by pinging it.
Router#ping 10.2.0.18

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.2.0.18, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms

#####  get the MAC address, it goes to Gi0/0/0
Router#show arp | inc 10.2.0.18
Internet  10.2.0.18               0   00a0.0302.44d7  ARPA   GigabitEthernet0/0/0

#####  CDP tells us its on a 3560 switch with IP 192.168.101.3
Router#show cdp neighbors detail
————————-
Device ID: OperA1-Switch
Entry address(es):
IP address: 192.168.101.3
Platform: cisco WS-C3560-24PS,  Capabilities: Switch IGMP
Interface: GigabitEthernet0/0/0,  Port ID (outgoing port): GigabitEthernet0/2
Holdtime : 167 sec

#####  going into the switch
Router#telnet 192.168.101.3
Trying 192.168.101.3 … Open

User Access Verification

Password:
OperA1-Switch#

#####  ping again to get the MAC
OperA1-Switch#ping 10.2.0.18

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.2.0.18, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/8 ms

#####  found the PORT!
OperA1-Switch#show mac address-table | inc 00a0.0302.44d7
1    00a0.0302.44d7    DYNAMIC     Fa0/32

#####  checking the interface details
OperA1-Switch#sh int fa0/32
FastEthernet0/32 is up, line protocol is up (connected)
Hardware is Fast Ethernet, address is 0022.9001.6ca4 (bia 0022.9001.6ca4)
Description: ClientPort — MY-PC
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 100Mb/s, media type is 10/100BaseTX


Leave a response

Your response:

Categories