Route Map vs. Prefix-List vs. Distribution List
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2016 07:26 AM - edited 03-05-2019 03:39 AM
Hello,
I am studying for my CCNP exam. I came across with network filtering. I know that you can use route map, prefix list, or distribute-list to filter networks. Is there any one of them has more advantages over the others? In other words, which technology is the best way to filter network routes? If you can explain it with an example, that will be great! Thank you.
- Labels:
-
Other Routing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2016 09:54 AM
Hi,
I'd say:
BGP distribute-list syntax is quite confusing.
Prefix-list syntax is easier to understand and more flexible.
But using route-maps is much more flexible and powerful: you can match also other prefix attributes (not only IP addresses) and also to modify them when the route-map is applied!
Best regards,
Milan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2016 09:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2016 10:46 AM
Hi,
here is an example where a route-map is matching AS_PATH and setting the Weight attribute finally:
http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/26634-bgp-toc.html#neighborsroutemaps
You can't do that with distribute-list nor prefix-list.
Here are more examples (the same document) what can be matched and set by the route-maps:
http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/26634-bgp-toc.html#matchandset
Best regards,
Milan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2020 02:16 AM
distribute and prefix list are often confused. distribute list is only a command used to call an ACL or prefix-list to engineer what is allowed in and out the routing protocol. route-map also utilized both acl and prefix-list and offers a lot more different match options. So I personally believe it's best to use route-map over distribute list because of scalability and flexibility.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2020 03:15 PM
The original post clearly establishes the context for the question as network filtering and asks about 3 things as if they were equivalent things: route map, prefix list, or distribute-list. And asks if one has advantages over the others. If we can clarify the differences in what they do then it should be easier to identify which one is best in a particular context.
To start with the easiest one - a prefix list defines a list of network prefixes, specifying a network address, a bit mask, and potentially a range of prefix lengths. The prefix list can either permit or deny the specified set of network prefixes. But by itself a prefix list does not take any action. The prefix list must be called by something.
Which takes us to distribute lists. A distribute list is used in the configuration of a routing protocol and controls what prefixes might be learned or what prefixes might be advertised. The distribute list will call something to identify particular prefixes to be controlled, which might be a prefix list or might be an access list.
A route map has multiple potential uses but this post is specifically about network filtering, so we will concentrate on that use. A route map (similar to a distribute list) may call something to identify particular prefixes to be controlled (could be prefix list or access list) but a route map does not necessarily require a match statement calling one of these. And a route map has the ability not only to be selective about what is advertised/or learned but also has the ability to change attributes of the prefixes being advertised/learned using the set command.
So these three commands do quite different things. Depending on what you want to accomplish it should be possible to choose the more effective tool.
Rick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2021 11:42 PM
Perfect answer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2021 01:46 AM
Hello
I think you may be referring to bgp order of evaluation
Bgp does evaluate these depending on how you are using them either for ingress/egress filtering, route advertisements etc..
Egress evlaualtion
Distribute-list
Prefix-list
Filter-list
Route-map
Ingress evaluation
Route-map
Filter-list
Prefix-list
Distribute-list
Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.
Kind Regards
Paul
