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

Unanswered Question
Jun 19th, 2007

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

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
smothuku Tue, 06/19/2007 - 04:16

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 Tue, 06/19/2007 - 04:22

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

limtohsoon Tue, 06/19/2007 - 04:45

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

Actions

This Discussion