cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
409
Views
0
Helpful
3
Replies

Question about using "ip prefix-list permit .... le "

gwhuang5398
Level 2
Level 2

I'm redistributing routes by using route map and prefix list. Would like to summary routes and use "permit ... le " in the prefix list when possible to make the prefix list shorter. For example here are the routes:

1.1.1.1/32

1.1.1.2/32

1.1.1.3/32

1.1.1.16/30

1.1.1.24/28

Should I use "ip prefix-list ... permit 1.1.1.0/26" or

"permit 1.1.1.0/26 le 30" or

"permit 1.1.1.0/26 le 32" or

"permit 1.1.1.0/30" and "permit 1.1.1.16/30" and "permit 1.1.1.24/28" individually?

I may not phrase the question clearly, but the objcetive is to make the prefix list as short as possible.

Thanks in advance.

Gary

3 Replies 3

pkhatri
Level 11
Level 11

Hi Gary,

Are these the only routes that you would like to match, or was that just an example.

If you need to match these 5 routes and nothing else, then you need to use the following:l

ip prefix-list list1 permit 1.1.1.1/32

ip prefix-list list1 permit 1.1.1.2/31

ip prefix-list list1 permit 1.1.1.16/30

ip prefix-list list1 permit 1.1.1.24/28

You cannot make the prefix-list shorted than that, I'm afraid.. at least, not for these 5 prefixes.

Hope that helps - pls rate the post if it does.

Paresh

mheusinger
Level 10
Level 10

Hello,

the shortest prefix-list entry matching all your routes (and some others too):

permit 1.1.1.0/24 ge 28

Hope this helps! Please rate all posts.

Regards, Martin

I was using them only as an example, but I got your ideas. Thanks for the help.

Gary