Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Community Member

Difference of Lists

I jut recently got to use a route map for the first time, pretty cool. When I was researching this issue I came across prefix lists, access-lists, and route maps. I know what access-lists do but what is the difference between all three of them. They seem to do the same thing so why use one instead of the other?

2 REPLIES
Blue

Re: Difference of Lists

differences betweeen route-maps and ACLs are as follows:

(as you've stated, there are also a few similarities)

1) route maps use ACLs as matching criteria

2) ACLs perform an evaluation and provide a YES/NO answer; route maps can modify information associated with the route

(this is commonly used when redistributing routes from one routing protocol to another)

3) route maps can determine if a route is internal or has a specific tag; ACLs cannot.

please see the following link for more route-map info:

http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a008047915d.shtml

prefix lists -

although there are a couple of similarities with ACLs, prefix lists differnces are as follows:

1) used to provide ip prefix filtering

2) can be configured to match an exact prefix or range of prefixes; ACLs cannot do this

3) prefixes use sequence numbers to determine which prefixes are read first and in what order. (lowest to highest sequence number); ACLs use top down reads.

please see the following link for more IP prefix list info:

http://www.cisco.com/en/US/products/ps6350/products_command_reference_chapter09186a0080454ced.html#wp1075035

Re: Difference of Lists

Hi there,

Depending on what you wanted to achieve, you would use either an access-list or a prefix list to specify traffic.

For example, if you wanted to specify the ip network 192.1.0.0 with an access list you could use:-

access-list 1 permit 192.1.0.0 0.0.0.0 and with a prefix list you could use:-

ip prefix-list name permit 192.1.0.0/16

Depending on how your mind works you can use either. prefix-lists are used quite heavily in bgp configurations. Prefix lists can also get a little complex, where you can say:-

ip prefix-list name permit 192.1.0.0/16 ge 17 le 24

Which would mean anything in the 192.1.0.0/16 network with a mask greater than 17 bits, but less than 24 bits.

I personally prefer to use access-list, given the choice.

A route-map is set of conditions applied to redistribution in a routing protocol. This is the command ou use where you want to apply access-lists and/or prefix lists to routing policy.

For example:-

access-list 1 permit 192.1.0.0 0.0.255.255

ip prefix-list name permit 192.2.0.0/16

route-map example permit 10

match ip address 1

match ip address prefix name

router rip

redistribute static metric 3 route-map example

At the end of a route map is an explicit deny all - just like an access list. The access-list 1 is used to specify the network 192.1.0.0/16 and the prefix list is used to specify the network 192.2.0.0/16.

Then the route-map says to match any ip addresses that conform with the access-list or the prefix-list will be permitted. This is then applied when redistributing static routes into rip (in this example) and given a metric of 3.

In the route-map statements you can also have a choice of match-all or match-any, meaning that the route has to match all of the conditions in the route map, or any of them.

So, to summerise:-

Access-lists - used to specify traffic

Prefix-lists - used to specify traffic

Route-maps - used to set conditions for route redistribution

Hope that helps clarify,

LH

Please rate all posts

121
Views
15
Helpful
2
Replies
CreatePlease to create content