cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
30210
Views
10
Helpful
11
Replies
lbattistin
Beginner

IOS-XR: when use prefix-set and prefix-list (are they equivalent)?

Hi, I just started using IOX-XR and understand that route-policies in IOS-XR are a more flexible way of doing route-maps in IOS, as well as prefix-sets have pretty much the same functionality than prefix-list. But I wonder why are prefix-lists still present in IOS-XR, are there any particular cases where you would prefer using prefix-lists instead of prefix-sets ? The Command Reference explains both but no clue about specific differences or cases where you have to use one or another. Any links to documentation regarding the specific uses of these are welcome. TIA.

11 REPLIES 11
medhat elsaeed
Beginner

The regular prefix-list contain Permit and Deny statments

But the Prefic-set doesn't contain permit or deny options, so you have to use the RPL to permit or deny a prefix-set

my recommendation is to use the prefix-list in order to be easily moved from one router to another ( like from an IOS to IOS XR )

xthuijs
Cisco Employee

Adding to the response already given, here are some good examples on how to work with RPL:

https://supportforums.cisco.com/docs/DOC-22031

xander

Thank you. So up to this point my understanding is that within a route policy you have to use prefix-sets ( as it is one of the 5 sets supported by RPL, besides as-path-set, community-set, extcommunity-set and rd-set ); everywhere else when you need to select prefixes you would choose prefix-lists as they are more flexible, am I right ?

the IOS route-map approach and the XR RPL approach are just different in nature.

So where IOS uses a prefix-list with permits and denies in an acl manner, XR uses the prefix-sets and you use the if-then-else structure to define what you want to do with the prefix that matches the set.

You could achieve the same in RPL as what you could do in route-maps, for instance, if your ios prefix list would say

permit X

deny Y

permit Z

In RPL it would look like (for example):

perfix-set PERMITS

x

z

perfix-set DENIES

y

if destination in DENIES then

drop

else if destination in PERMITS then

pass

else

set local pref 1234

end if

something like that.

regards

xander

Thanks again for such a quick answer !  I understand how RPL and prefix-sets work, my question is more towards the purpose of prefix-lists in IOS-XR (not IOS). Is prefix-list mantained in IOS-XR just for back compatibility to IOS or are there applications where you need prefix-list and not prefix-set (for BGP I guess..) ?

I see what you mean, I dont believe you can use prefix-lists in XR for route filtering. this has to be done by RPL.

xander

Ok, thank you Alexander.

@xthuijs Thanks for clarifying the differences in the above statements. When I compare IOS-XR with IOS-XE, prefix-set seem to do the job of prefix-list in IOS-XE and are called by the route-policy in XR as route-map calls the prefix-list in XE.

 

So, why would you have prefix-list option which essentially does the same task as route-policy in IOS-XR? Just curious? Sounds like they both perform the same function. 

 

Looking forward to hearing from you

 

Nage

hi nage,
in XR you have route-policies as you noted, this route policies can leverage prefix-sets or community-sets.
this is merely to simplify the configuration and ease of reading.
also there is a slight performance difference between the two approaches of “inline” vs using sets (talking usecs here btw).

if your prefix set is small, or community set for that matter, you can do it inline:

if destination in (a/8 or b/16) then
bla

if your lists are very long, then ti is easier to reference a set:
if destination in PREFIXSET then
bla

and prefix-set PREFIXSET
a/8
b/16
c/24
etc

in RPL, when you want to edit the RPL you need to reconfigure it completely.
so if you ewant to adjust the prefix in the first example you need to retype your whole policy.
in the 2nd mode you only have to update your prefix set to add a line or change it.

cheers!
xander

hi nagender!

prefix-set and route-policy are married together.

RPL provides for a programmatic approach of defining yeah route policies.

prefix-sets are the way to group/list prefixes together.

 

prefix-lists is a more user friendly approach probably, but it is not tied to RPL.

so you can use it for basic filter of prefixes, but not to manipulate them (like what RPL can do).

 

cheers

xander

Alessio Andreoli
Contributor

Hi,
I am sorry being out of the curve but I would prefer to use prefix-set because even if is the equivalent of prefix-list in IOS , it is a much more flexible and granular tool than the prefix-list. The RPL can match a prefix with a level of detail that is more difficult to implement with IOS prefix-list. Scalability is another IOS XR prefix-set strength point.


Hope this helps
Alessio

Sent from Cisco Technical Support iPad App