cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5230
Views
20
Helpful
6
Replies

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

arpit.gpandit
Level 1
Level 1

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

1 Accepted Solution

Accepted Solutions

nkarpysh
Cisco Employee
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,

HTH,
Niko

View solution in original post

6 Replies 6

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

Hi Alex,

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

nkarpysh
Cisco Employee
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,

HTH,
Niko

Hi Nik,

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

Do you know of a reference with a good explanation for why the refcount is different among the entries in some lists? I know you touched on it, but I'm not really tracking why single lines would be referenced individually from the entire list.

cggveritas.cco
Level 1
Level 1

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

 

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:

Review Cisco Networking products for a $25 gift card