cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
69913
Views
0
Helpful
5
Replies

Difference between "clear arp" and "clear ip arp <ip_addr>"?

limtohsoon
Level 1
Level 1

Hi Sir,

I have one unit Catalyst 6513 [Native IOS version 12.2(18)SXF8].

It is configured with multiple SVIs. One of the VLANs (VLAN 30) is a private VLAN with an associated isolated secondary VLAN (VLAN 31). Part of the config is as follows:

!

interface Vlan30

ip address 10.90.20.2 255.255.252.0

no ip redirects

no ip unreachables

no ip proxy-arp

private-vlan mapping 31

standby 30 ip 10.90.20.1

standby 30 priority 110

standby 30 preempt

!

interface GigabitEthernet1/1

switchport

switchport private-vlan host-association 30 31

switchport mode private-vlan host

no ip address

spanning-tree portfast

!

One particular IP address (10.90.23.180) has an ARP entry in the switch's ARP cache. But it's MAC address entry can't be found and the IP address can't be pinged. I believe this host is disconnected from the switch.

I understand if a host is removed from a port, its CAM entry is immediately removed. Question: What about its ARP entry (default aging time is 4 hrs)?

I executed the command "clear arp-cache". The ARP entry still exists. I then executed the command "clear ip arp 10.90.23.180"; the entry is removed.

Question: What's the difference between the commands "clear arp-cache" and "clear ip arp <ip_addr>"?

Please see attached file the commands I executed and their outputs.

Please help.

Thank you.

B.Rgds,

Lim TS

5 Replies 5

smothuku
Level 7
Level 7

Hi ,

clear arp-cache

To refresh dynamically created entries from the Address Resolution Protocol (ARP) cache, use the clear arp-cache

This command updates the dynamically learned IP address and MAC address mapping information in the ARP table to ensure the validity of those entries. If the refresh operation encounters any stale entries (dynamic ARP entries that have expired but have not yet been aged out by an internal, timer-driven process), those entries are aged out of the ARP table immediately as opposed to at the next refresh interval.

Note: By default, dynamically learned ARP entries remain in the ARP table for four minutes.

The clear arp-cache command can be entered multiple times to refresh dynamically created entries from the ARP cache using different selection criteria.

?Use this command without any arguments or keywords to refresh all ARP cache entries for all enabled interfaces.

?To refresh ARP cache entries for a specific interface, use this command with the interface keyword and type and number arguments.

Thanks,

Satish

smothuku
Level 7
Level 7

Hi Lim ,

IMP : " clear arp " won't clear all arp entries because it is not full command.

The syntax of the command on 6500 series is ,

clear arp

To delete a specific entry or all entries from the ARP table, use the clear arp command.

clear arp [all | dynamic | permanent | static] {ip_addr}

all

(Optional) Clears all ARP entries.

dynamic

(Optional) Clears all dynamic ARP entries.

permanent

(Optional) Clears all permanent ARP entries.

static

(Optional) Clears all static ARP entries.

ip_addr

IP address to clear from the ARP table.

In your case you tried to clear arp entries using " clear arp" command without any argument..Becoz of that the particular arp entry was not cleared from arp table as soon as you issue "clear arp" command.

I hope it is clear now..

Thanks,

Satish

Hi Satish,

I don't see all the options that you mentioned on my Cat6513 as follows:

Cat6513#clea arp-cache ?

interface Clear the entire ARP cache on the interface

Cat6513#clea arp-cache

I have tried "clea arp-cache interface vlan 30". The effect is the same as the command "clear arp-cache", i.e. that particular ARP entry is not removed.

My question is: What's the difference between "clear arp-cache" and "clear ip arp ? The latter seems to be able to remove the ARP entry, but not the former.

Hope you can advise me further.

Thank you.

B.Rgds,

Lim TS

Hi Satish,

Are you familiar with the command "ip sticky-arp" in PVLAN environment? See URL below:

http://www.cisco.com/en/US/products/ps6922/products_command_reference_chapter09186a00806c09b6.html#wp1011518

I suspect it contributes to the issue I'm facing, i.e. stale ARP entries still reappear after I execute the command "clear arp-cache".

Please advise.

Thank you.

B.Rgds,

Lim TS

I know is old, but I ran into a similar situation and cound not find much information about it. Opend a case and found this BugID

http://tools.cisco.com/Support/BugToolKit/search/getBugDetails.do?method=fetchBugDetails&bugId=CSCsk46195

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco