Route-maps,Distributed Lists and and Prefix Lists

Hello,

I’m looking for a simple and specific definition and purpose of Route-maps, Distributed Lists and and Prefix Lists. What is recommendation and best practice to use each one of them ?

Many thanks in advance

Samir,
Route-Maps
These are the swiss-army tool of Cisco. Think of Route-Maps as little logic programs in the form of “If condition X, then do Y.” Route-maps have so many uses that I can’t possibly list them all. Route-maps are commonly used for filtering, modifying or matching addresses or routes. They are most heavily used in setting BGP options. For example, if you simply create a test route-map and issue a “set ?” command, you will see many, many options that are BGP related:
* as-path
* automatic-tag
* comm-list
* dampening
* extcomm-list
* local-preference
* origin
* traffic-index
* weight

Route-maps are often used in combination with the other entities (prefix-lists and access-lists) as a means of identifying which type of traffic you want to modify or act upon.

Distribute Lists
Distribute lists are a means of controlling what information you do or do not want to send to routing partner. Distribute lists do not, in and of themselves, actually filter or match anything. Instead, they call other mechanisms, such as ACLs or prefix-lists for that. So think of distribute-lists as a mechanism of applying ACLs or prefix-lists to or from routing neighbors.

Prefix-List
Prefix-lists appear to be very similar to Access-lists. In fact, most all of the functionality that prefix-lists offer now could, in theory, be accomplished with very ugly looking extended ACLs. Prefix-lists allow you to identify or filter entire network ranges just based on prefix length. For example, “ip prefix-list 1 permit 192.168.0.0/16 ge 24” would match any network between 192.168.0.0 - 192.168.255.255 that has a subnet mask of 255.255.255.0 - 255.255.255.255.

The rule of thumb with prefix-lists is to use them when doing ROUTE filtering (as opposed to using access-lists when doing PACKET filtering)

Overall
Often, the Cisco IOS doesn’t give you a choice as to what type of filter you can use. Many times, IOS will tell you that you must use something in particular, a route-map for example, for the action you are trying to permit. However, if given the choice, I find Route-Maps and Prefix-Lists to be the most versatile to use.

Thanks Andrew for giving detailed information, now it make sense. Much appreciated.