04-25-2013 01:56 AM - edited 03-04-2019 07:43 PM
Hi All,
I have a routing map with different prefix list, let´s assume prefix list A, B, C ,D.
How can I verify which prefix list is macthed by a route?
Of course this route is not mentioning explicitely in all of these prefix list.
The router is using NX-OS.
Thanks.
Solved! Go to Solution.
05-09-2013 03:25 AM
Hello,
for example if you configure the following prefix-list:
ip prefix-list rip-filter seq 5 deny 192.168.48.0/22 ge 23
ip prefix-list rip-filter seq 10 permit 0.0.0.0/0 le 32
You can use the commands:
R1#show ip prefix-list rip-filter
ip prefix-list rip-filter: 2 entries
seq 5 deny 192.168.48.0/22 ge 23
seq 10 permit 0.0.0.0/0 le 32
To see the matches count:
R1#show ip prefix-list detail rip-filter
ip prefix-list rip-filter:
count: 2, range entries: 2, sequences: 5 - 10, refcount: 3
seq 5 deny 192.168.48.0/22 ge 23 (hit count: 1504, refcount: 1)
seq 10 permit 0.0.0.0/0 le 32 (hit count: 1402, refcount: 1)
To see if a specific prefix does match or not:
R1#show ip prefix-list rip-filter 192.168.48.0/24 first-match
seq 5 deny 192.168.48.0/22 ge 23 (hit count: 1512, refcount: 1)
R1#show ip prefix-list rip-filter 192.168.48.0/23 first-match
seq 5 deny 192.168.48.0/22 ge 23 (hit count: 1512, refcount: 1)
R1#show ip prefix-list rip-filter 192.168.48.0/22 first-match
seq 10 permit 0.0.0.0/0 le 32 (hit count: 1410, refcount: 1)
Regards.
05-02-2013 03:47 AM
U can try debug ip routing or debug ip packet detail. BUT I would be careful not to overwhelm the Router.
Maybe u can try to find it out with a close look the the match clauses, wouldn't that enough? If you like u can post the prefix-list with the route u asked for..
08-05-2018 05:56 AM
I use the next command to check the matching in IOS 15.X.
show ip prefix-list TEST_1 <prefix>/<len> first-match
where:
<prefix>: is the prefix
<len>: is the length mask.
Example:
XXXX#show ip prefix-list TEST_1
ip prefix-list TEST_1: 1 entries
seq 1 permit 10.0.0.0/16 le 30
When i try to check with a different length, the output is none:
XXXXX#show ip prefix-list TEST_1 10.0.0.0/17
When i try to check with a different length and the command recommended in the first line, the output is:
XXXX#show ip prefix-list TEST_1 10.0.0.0/17 first-match
seq 1 permit 10.0.0.0/16 le 30 (hit count: 0, refcount: 1)
this command was tested in:
Cisco IOS Software, 2801 Software (C2801-IPBASEK9-M), Version 15.1(2)T4, RELEASE SOFTWARE (fc1)
05-09-2013 03:25 AM
Hello,
for example if you configure the following prefix-list:
ip prefix-list rip-filter seq 5 deny 192.168.48.0/22 ge 23
ip prefix-list rip-filter seq 10 permit 0.0.0.0/0 le 32
You can use the commands:
R1#show ip prefix-list rip-filter
ip prefix-list rip-filter: 2 entries
seq 5 deny 192.168.48.0/22 ge 23
seq 10 permit 0.0.0.0/0 le 32
To see the matches count:
R1#show ip prefix-list detail rip-filter
ip prefix-list rip-filter:
count: 2, range entries: 2, sequences: 5 - 10, refcount: 3
seq 5 deny 192.168.48.0/22 ge 23 (hit count: 1504, refcount: 1)
seq 10 permit 0.0.0.0/0 le 32 (hit count: 1402, refcount: 1)
To see if a specific prefix does match or not:
R1#show ip prefix-list rip-filter 192.168.48.0/24 first-match
seq 5 deny 192.168.48.0/22 ge 23 (hit count: 1512, refcount: 1)
R1#show ip prefix-list rip-filter 192.168.48.0/23 first-match
seq 5 deny 192.168.48.0/22 ge 23 (hit count: 1512, refcount: 1)
R1#show ip prefix-list rip-filter 192.168.48.0/22 first-match
seq 10 permit 0.0.0.0/0 le 32 (hit count: 1410, refcount: 1)
Regards.
05-13-2013 01:56 AM
Grazie Antonio,
Very useful hints!!
03-29-2019 01:24 AM
Thank you for sharing this nice information.
i have one question here.
qus : in "show ip prefix-list detail rip-filter" what is the " refcount: 3" value.
when it become 1 and when change to different.
thank you!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide