Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Community Member

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

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

Everyone's tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

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

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,

6 REPLIES

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

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

Community Member

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

Hi Alex,

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

Cisco Employee

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

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,

Community Member

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

Hi Nik,

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

Community Member

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

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.

Community Member

Thanks for your explanation

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

 

2293
Views
10
Helpful
6
Replies
CreatePlease to create content