Layer 2Privileged EXEC

clear arp-cache

Clears the entire ARP cache on the device, forcing the router to dynamically re-learn all ARP entries, typically used to resolve connectivity issues caused by stale or incorrect ARP mappings.

Syntax·Privileged EXEC
clear arp-cache

When to Use This Command

  • After changing the IP address of a directly connected device to ensure the router learns the new MAC-to-IP mapping.
  • When troubleshooting intermittent connectivity issues suspected to be caused by a stale ARP entry pointing to a wrong MAC address.
  • After replacing a faulty NIC or switch port on a directly connected host to force the router to discover the new MAC address.
  • When implementing a security policy that requires periodic ARP cache flushing to prevent ARP spoofing attacks.

Command Examples

Clear entire ARP cache

clear arp-cache
Router#
Router#

The command executes without any output or confirmation. The ARP cache is cleared immediately. Use 'show arp' to verify that the cache is empty and entries are being re-learned.

Verify ARP cache after clearing

show arp
Protocol  Address          Age (min)  Hardware Addr   Type   Interface
Internet  192.168.1.1             -   0001.0001.0001  ARPA   GigabitEthernet0/0
Internet  192.168.1.2             0   0002.0002.0002  ARPA   GigabitEthernet0/0
Internet  10.0.0.1                -   0003.0003.0003  ARPA   GigabitEthernet0/1

After clearing, the ARP table shows only static entries (age '-') and dynamically learned entries with age '0' (just learned). The 'Hardware Addr' column shows MAC addresses. Dynamic entries will age out and be refreshed as traffic flows.

Understanding the Output

The 'clear arp-cache' command produces no output on successful execution. To verify the effect, use 'show arp'. The output of 'show arp' displays the ARP table with columns: Protocol (always Internet for IP), Address (IP address), Age (minutes since last learned; '-' means static), Hardware Addr (MAC address), Type (encapsulation type, typically ARPA for Ethernet), and Interface (outgoing interface). After clearing, dynamic entries will have an age of 0 or will be absent until traffic triggers ARP requests. Static entries remain. A healthy network should show dynamic entries with low ages for active hosts. Stale entries (high age) or incomplete entries (no MAC) indicate potential issues.

CCNA Exam Tips

1.

CCNA exam tip: 'clear arp-cache' is a privileged EXEC command; it cannot be run from global config mode.

2.

CCNA exam tip: Clearing ARP cache does not affect static ARP entries; they remain until manually removed.

3.

CCNA exam tip: The command is useful when troubleshooting connectivity after IP changes; it forces the router to send ARP requests again.

4.

CCNA exam tip: Be aware that clearing ARP cache can cause temporary packet loss until entries are re-learned.

Common Mistakes

Mistake: Using 'clear arp-cache' in global configuration mode instead of privileged EXEC mode, resulting in '% Invalid input detected' error.

Mistake: Assuming the command clears only dynamic entries; it clears all entries including static ones (except those configured with 'arp' command).

Mistake: Forgetting to verify with 'show arp' after clearing, leading to confusion about whether the cache was actually cleared.

Practice for the CCNA 200-301

Test your knowledge with hundreds of CCNA practice questions covering all exam domains.

Practice CCNA Questions