Track Switch Port based on IP address

Start on the Layer 3 switch.

Get the MAC address of the device from the IP
2960-01#sh ip arp | inc 10.1.1.140
Internet 10.1.1.140 3 f44d.abcd.1234 ARPA Vlan2

Get the interface the MAC address is routed out of.
2960-01#show mac address-table | inc f44d
2 f44d.abcd.1234 DYNAMIC Po1

In this case its routed out an etherchannel so get the details
2960-01#show etherchannel 1 summary
Flags: D - down P - bundled in port-channel
I - stand-alone s - suspended
H - Hot-standby (LACP only)
R - Layer3 S - Layer2
U - in use f - failed to allocate aggregator
M - not in use, minimum links not met
u - unsuitable for bundling
w - waiting to be aggregated
d - default port
Number of channel-groups in use: 6
Number of aggregators: 6
Group Port-channel Protocol Ports
------+-------------+-----------+-----------------------------------------------
1 Po1(SU) - Gi1/0/1(P) Gi1/0/2(P) Gi1/0/3(P)
Gi1/0/4(P)

Get the IP address of the neighbouring switch
show cdp neighbors gigabitEthernet 1/0/1 detail
2960-01#show cdp neighbors gigabitEthernet 1/0/1 detail
-------------------------
Device ID: 2960-02
Entry address(es):
IP address: 10.2.2.21
Platform: cisco WS-C2960S-48, Capabilities: Switch IGMP
Interface: GigabitEthernet1/0/1, Port ID (outgoing port): GigabitEthernet4/0/48
Holdtime : 165 sec
Version :
Cisco IOS Software, C2960S Software (C2960S-UNIVERSALK9-M), Version 15.SE9, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2015 by Cisco Systems, Inc.
Compiled Mon 21-Dec-15 02:41 by prod_rel_team
advertisement version: 2
Protocol Hello: OUI=0x00000C, Protocol ID=0x0112; payload len=27, value=00000000FFFFFFFF01022501000000000000A45630E50380FF0000
VTP Management Domain: 'alexis'
Native VLAN: 10
Duplex: full
Power Available TLV:
Power request id: 0, Power management id: 1, Power available: 0, Power management level: -1
Management address(es):
IP address: 10.2.2.21

ssh/telnet onto the switch
2960-01#10.2.2.21
On the Layer 2 only enable switch
ping the IP address you tracking down to refresh the arp
2960-02#ping 10.1.1.140
Sending 5, 100-byte ICMP Echos to 10.1.1.140, timeout is 2 seconds:
!!!!!
2960-02#
Find the interface its been routing out of
2960-02#show mac address-table | inc f44d
2 f44d.abcd.1234 DYNAMIC Gi4/0/10
LIV-2960-02#sh running-config interface Gi4/0/10
switchport access vlan 100
switchport voice vlan 200
srr-queue bandwidth share 10 10 60 20
srr-queue bandwidth shape 30 0 0 0
queue-set 2
mls qos trust device cisco-phone
mls qos trust cos
spanning-tree portfast
service-policy input IPPhone+PC+VC+Endpoint
end

Tags: ,

About Alexis Katsavras

Working as Freelance Cisco Unified Communications Consultant in the UK. www.NetPacket.co.uk