IPv4 Device Tracking Commands

Use these commands to track IPv4 hosts that are attached to physical ports or LAGs.

The IPv4 Device Tracking (IPv4DT) feature enables you to track IPv4 hosts that are attached to physical ports or LAGs on an L2 or L3 switch.

The DHCP Snooping feature (see DHCP Snooping Configuration Commands) already provides mapping from host IP address to physical port on an L2 switch, for the IP address acquired using DHCP. But DHCP snooping cannot track the statically configured hosts, nor can it detect the movement of the hosts in a VLAN.

The IPv4 Device Tracking feature snoops the ARP packets exchanged in a VLAN and populates the tracking table with the information such as IP address, MAC address, VLAN ID, and interface number for each host.

ip device tracking (Global Config)

M4250

M4350

This command enables the IPv4 Device Tracking feature.

Default Disabled
Format ip device tracking
Mode Global Config

no ip device tracking (Global Config)

This command disables the IPv4 Device Tracking feature.

Format no ip device tracking
Mode Global Config

ip device tracking maximum (Interface Config)

M4250

M4350

This command sets the maximum number of entries learned on a routing or non-routing interface. This command clears all entries that were learned on the interface and sets the maximum of entries (from 1 to 10) that can be learned on the interface. If you set the maximum entries to zero, IPv4DT is effectively disabled on the interface.

Default No limit
Format ip device tracking maximum number
Mode Interface Config

no ip device tracking maximum (Interface Config)

This command resets the number of entries that can be learned on a routing or non-routing interface to the default, which is no limit.

Format no ip device tracking maximum
Mode Interface Config

clear ip device tracking

M4250

M4350

Use this command to clear the entries present in the IPv4DT database. Specify arguments to clear based on interface name, IPv4 address, and MAC address. When you enter the command, the ARP probes are sent to repopulate the entries.

To specify an actual interface or port, do the following:

  • For an M4250 series switch, use the argument slot/port.
  • For an M4350 series switch, use the argument unit/slot/port, as shown in the command description and format.
Format clear ip device tracking {all | interface unit/slot/port | ip ip-address | mac mac-address}
Mode Privileged EXEC
Parameter Description
all Clears the entire IPv4DT table.
interface unit/slot/port Clears the entries that were learned on a specified interface.
ip ip-address Clears the entries that match the host IPv4 address.
mac mac-address Clears the entries that match the MAC address.

ip device tracking probe

M4250

M4350

This command enables the ARP probe generation for each entry in the IPv4 Device Tracking database.

Default Enabled
Format ip device tracking probe
Mode Global Config

no ip device tracking probe

This command disables the ARP probe generation for each entry in the IPv4 Device Tracking database.

Format no ip device tracking probe
Mode Global Config

ip device tracking probe interval

M4250

M4350

This command sets the minimum time in seconds between two ARP probes for each entry in the IPv4 Device Tracking database. The range is from 30 to 300 seconds.

Default 30 seconds
Format ip device tracking probe interval seconds
Mode Global Config

no ip device tracking probe interval

This command resets the probe interval to the default of 30 seconds.

Format no ip device tracking probe interval
Mode Global Config

ip device tracking probe count

M4250

M4350

This command sets the number of probes sent without any responses from the client before declaring that its state is inactive in the IPv4 Device Tracking database. The range for the number argument is from 1 to 255.

Default 3
Format ip device tracking probe count number
Mode Global Config

no ip device tracking probe count

This command resets the probe count to the default of 3.

Format no ip device tracking probe count
Mode Global Config

ip device tracking probe delay

M4250

M4350

This command sets the delay in seconds before the probe is sent after a port is moving from the non-forwarding state to the forwarding state. This delay applies to each entry in the IPv4 Device Tracking database. The range is from 1 to 120 seconds.

Default 30 seconds
Format ip device tracking probe delay number
Mode Global Config

no ip device tracking probe delay

This command resets the probe delay to the default of 30 seconds.

Format no ip device tracking probe delay
Mode Global Config

ip device tracking probe auto-source fallback

M4250

M4350

This command sets the source address in the ARP probe packet for non-routing interfaces to prevent the duplication of IP address 0.0.0.0. When you enter the command, the source address in the probe packet is set to a new address based on the configured host IP address, mask, and the destination for each of the non-routing interfaces in the IPv4DT table.

Default The source IP address in the probe packet for non-routing interfaces is 0.0.0.0.
Format ip device tracking probe auto-source fallback host-ip mask override
Mode Global Config
Parameter Description
host-ip An IPv4 host in dotted notation (for example, 1.2.3.4).
mask An IPv4 host used for the destination IP address of the IPv4DT entries in dotted notation (for example, 255.255.0.0).

Command example:

In the following example, the probe entry for a host IP address is 10.5.5.20, causing an ARP probe with source address 10.5.5.1 to be generated:

CODE
(NETGEAR Switch)(Config)# ip device tracking probe auto-source fallback 0.0.0.1
255.255.255.0 override

no ip device tracking probe auto-source fallback

This command resets the source address in the ARP probe packet for non-routing interfaces to the default of 0.0.0.0.

Format no ip device tracking probe auto-source fallback
Mode Global Config

show ip device tracking all

M4250

M4350

This command displays all IPv4DT (IPv4, VLAN, and MAC) entries in the IPv4DT table.

Format show ip device tracking all [count | active | inactive]
Mode Privileged EXEC
Parameter Description
active (Optional) Displays the active status entries only.
inactive (Optional) Displays the inactive status entries only.
count (Optional) Displays the number of ARP, DHCP, active, and inactive IPv4DT entries in the IPv4DT table.

Command example:

CODE
(NETGEAR Switch) #show ip device tracking all

IP Device Tracking for clients......................... Enable
IP Device Tracking Probe Generation.................... Enable
IP Device Tracking Probe Count......................... 3
IP Device Tracking Probe Interval.......................30
IP Device Tracking Probe Delay Interval.................30
-------------------------------------------------------------------------------
IP Address  MAC Address     Vlan Interface Time-left   Time-since State Source
                                           to inactive inactive
-------------------------------------------------------------------------------
10.21.1.1  01:02:03:04:05:06  2   1/0/1      30           0      ACTIVE   ARP

Total number interfaces enabled: 1

Enabled interfaces:
1/0/1

Command example:

CODE
(NETGEAR Switch) #show ip device tracking all count

IP Device Tracking ARP Entries Count .......... 40
IP Device Tracking DHCP Entries Count ......... 0

IP Device Tracking ACTIVE Entries Count ....... 30
IP Device Tracking INACTIVE Entries Count ..... 10

IP Device Tracking Total Entries Count ........ 40

show ip device tracking interface

M4250

M4350

This command displays all IPv4DT (IPv4, VLAN, and MAC) entries in the IPv4DT table learned on a specific interface. To specify an actual interface or port, do the following:

  • For an M4250 series switch, use the argument slot/port.
  • For an M4350 series switch, use the argument unit/slot/port, as shown in the command description and format.
Format show ip device tracking interface unit/slot/port
Mode Privileged EXEC
Field Description
IP Address The learned IPv4 address of the device.
MAC Address The MAC address associated with the learned IPv4 address.
VLAN The VLAN ID associated with an interface on which the device is learned.
Interface The interface number on which the device is learned.
State Indicates if the device is in the active or inactive state.
Time left to inactive The number of seconds before the reachable device is set to inactive.
Time since inactive The number of seconds since the inactive device was last reachable.
Source Indicates if the source of the device is ARP, DHCP, or static.

Command example:

CODE
(Switching) #show ip device tracking interface 1/0/1

IP Device Tracking for clients......................... Enable
IP Device Tracking Probe Generation.................... Enable
IP Device Tracking Probe Count......................... 3
IP Device Tracking Probe Interval.......................30
IP Device Tracking Probe Delay Interval.................30
IP Device Tracking Interface Max Entry Limit ...........No Limit
-------------------------------------------------------------------------------
IP Address  MAC Address     Vlan Interface Time-left   Time-since State Source
                                           to inactive inactive
-------------------------------------------------------------------------------
10.21.1.1  01:02:03:04:05:06  2   1/0/1      50           0      ACTIVE   ARP
20.21.1.1  01:02:03:04:05:07  2   1/0/1      80           0      ACTIVE   ARP

show ip device tracking ip

M4250

M4350

This command displays all IPv4DT (IPv4, VLAN, and MAC) entries in the IPv4DT table learned on a specific IPv4 address.

Format show ip device tracking ip ip-address
Mode Privileged EXEC
Field Description
IP Address The learned IPv4 address of the device.
MAC Address The MAC address associated with the learned IPv4 address.
VLAN The VLAN ID associated with an interface on which the device is learned.
Interface The interface number on which the device is learned.
Time left to inactive The number of seconds before the reachable device is set to inactive.
Time since inactive The number of seconds since the inactive device was last reachable.
State Indicates if the device is in the active or inactive state.
Source Indicates if the source of the device is ARP, DHCP, or static.

Command example:

CODE
(Switching) #show ip device tracking ip 10.21.1.1

IP Device Tracking for clients......................... Enable
IP Device Tracking Probe Generation.................... Enable
IP Device Tracking Probe Count......................... 3
IP Device Tracking Probe Interval.......................30
IP Device Tracking Probe Delay Interval.................30
-------------------------------------------------------------------------------
IP Address  MAC Address     Vlan Interface Time-left   Time-since State Source
                                           to inactive inactive
-------------------------------------------------------------------------------
10.21.1.1  01:02:03:04:05:06  2   1/0/1      50           0      ACTIVE   ARP
10.21.1.1  01:02:03:04:05:07  2   1/0/2      50           0      ACTIVE   ARP

show ip device tracking mac

M4250

M4350

This command displays all IPv4DT (IPv4, VLAN, and MAC) entries in the IPv4DT table learned for a specific MAC address.

Format show ip device tracking mac mac-address
Mode Privileged EXEC
Field Description
IP Address The learned IPv4 address of the device.
MAC Address The MAC address associated with the learned IPv4 address.
VLAN The VLAN ID associated with an interface on which the device is learned.
Interface The interface number on which the device is learned.
Time left to inactive The number of seconds before the reachable device is set to inactive.
Time since inactive The number of seconds since the inactive device was last reachable.
State Indicates if the device is in the active or inactive state.
Source Indicates if the source of the device is ARP, DHCP, or static.

Command example:

CODE
(Switching) #show ip device tracking mac 01:02:03:04:05:06

IP Device Tracking for clients......................... Enable
IP Device Tracking Probe Generation.................... Enable
IP Device Tracking Probe Count......................... 3
IP Device Tracking Probe Interval.......................30
IP Device Tracking Probe Delay Interval.................30
-------------------------------------------------------------------------------
IP Address  MAC Address     Vlan Interface Time-left   Time-since State Source
                                           to inactive inactive
-------------------------------------------------------------------------------
10.21.1.1  01:02:03:04:05:06  2   1/0/1      50           0      ACTIVE   ARP
20.21.1.1  01:02:03:04:05:06  2   1/0/1      50           0      ACTIVE   ARP