IOS-XR: when use prefix-set and prefix-list (are they equivalent)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2013 05:30 AM
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.
- Labels:
-
XR OS and Platforms
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2013 01:51 AM
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 )

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2013 12:37 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2013 04:10 AM
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 ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2013 04:18 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2013 04:27 AM
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..) ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2013 04:37 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2013 04:42 AM
Ok, thank you Alexander.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2018 07:42 PM - edited 10-08-2018 07:43 PM
@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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2018 07:33 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2018 11:27 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2013 11:11 AM
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
