×

Warning message

  • Cisco Support Forums is in Read Only mode while the site is being migrated.
  • Cisco Support Forums is in Read Only mode while the site is being migrated.

What is the difference between hit count and refcount in prefix-list

Answered Question
Oct 31st, 2011
User Badges:

didn't get the answer anywhere else, so please help.

Correct Answer by nkarpysh about 5 years 9 months ago

Hi Arpit,


Refcount:

When a prefix is created, its reference is set to 1. And the last deletion/insertion prefix list's reference is incremented

by 1.


If a prefix list is referred by a routing process like "distribute-list prefix pl1 out", its reference is incremented by 1. The reference counter is a common concept of IOS. It shows how many objects uses the memory block. You can imagine that objects are functions like show commands and data structures like configurations.


Each entry's refcount is more complicated. Some entries refers other entries. This is because prefix-list entries form

a kind of tree data structure and some of entries cannot be deleted without changing links from child entries.



Hits: Preaty straightforward - number of times this prefix-list was called for action - hit.


Rate if this is what you searched for. Can help others further.


Nik,

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
Alexander Maroukian Mon, 10/31/2011 - 08:33
User Badges:
  • Bronze, 100 points or more

Hi,


Hit count is how many times maches are found for this prefix in the prefix list.

Refcount is number of times list or seq is used in policy settings.


Best regards,

Alex

arpit.gpandit Mon, 10/31/2011 - 09:55
User Badges:

Hi Alex,


Thank you very much for your information...........it was really helpful

Correct Answer
nkarpysh Mon, 10/31/2011 - 08:37
User Badges:
  • Cisco Employee,

Hi Arpit,


Refcount:

When a prefix is created, its reference is set to 1. And the last deletion/insertion prefix list's reference is incremented

by 1.


If a prefix list is referred by a routing process like "distribute-list prefix pl1 out", its reference is incremented by 1. The reference counter is a common concept of IOS. It shows how many objects uses the memory block. You can imagine that objects are functions like show commands and data structures like configurations.


Each entry's refcount is more complicated. Some entries refers other entries. This is because prefix-list entries form

a kind of tree data structure and some of entries cannot be deleted without changing links from child entries.



Hits: Preaty straightforward - number of times this prefix-list was called for action - hit.


Rate if this is what you searched for. Can help others further.


Nik,

arpit.gpandit Mon, 10/31/2011 - 09:56
User Badges:

Hi Nik,


Thank you very much for your reply............it was simple and straightforward........thanks again.

cggveritas.cco Tue, 05/13/2014 - 00:41
User Badges:

Thanks for your explanation on hitcount, but how can I have a refcount of 0 then ?

seq 2000 permit 0.0.0.0/0 le 24 (hit count: 85589, refcount: 0)

 

Thanks

Thomas

 

Actions

This Discussion

Related Content