Knowledge Base

Browse our knowledge base for free solutions to common problems

Track Device IP Using IP Device Tracking In Cisco

Created On: 14 September 2022
Written by: Ben

We had an issue where the device that was plugged into our remote router was configured with the incorrect static IP address and was not accessible remotely via SSH. To overcome the issue with determined the IP that the device was running on using the procedure below:

Add a new VLAN to the router which will be run on same network as the incorrectly configured device:

conf t
interface vlan3
    ip address 192.168.1.1 255.255.255.0
end

Configure the FastEthernet port which the device is plugged into to use to use Vlan3 as switchport access and add IP tracking:

conf t
interface fa0
    no switchport access vlan 2
    switchport access vlan 3
    ip device tracking max 10
end

Notice I remove Vlan2, this is the Vlan I was using for the device originally.

Now add / enable tracking to the router itself:

conf t
    ip device tracking
end

Wait a minute or so then check for the device IP address being advertised in the tracking list with the following:

sh ip device tracking interface Fa0

If it does not work straightaway repeat the above command a few times until something populates (if it does that is).

Once you have the device IP bring the Vlan3 onto the same network as the device. Try use either the first or last IP of the subnet (first or last IP):

conf t
interface vlan3
    no ip address
    ip address <IP_ADDRESS_HERE> 255.255.255.0
end

You should now be able to access the device and fix IP config / diagnose using the following command:

ssh -l <USERNAME> <DEVICE_IP_ADDRESS_FROM_TRACKING_BR>

Once you have completed your work and fixed the issue revert the config, for me I used the following:

conf t
no ip device tracking
interface fa0
    no switchport access vlan 3
    switchport access vlan 2
    no ip device tracking max 10
    exit
no interface vlan3
end
wr

Providing the device was fixed successfully you should be able to access your device now using the configured IP Addresses:

ICTU LTD is a company registered England and Wales (Company No. 09344913) 15 Queen Square, Leeds, West Yorkshire, England, LS2 8AJ
Copyright © 2024 ICTU LTD, All Rights Reserved.
exit