If you’ve ever sat there staring at your router’s CLI wondering whether to use a route map or a prefix list, you’re not alone. I’ve seen many students — even working professionals — struggle with this subtle yet powerful decision. Today, I’ll walk you through these tools not just in theory, but in a way you’ll be able to implement confidently in real-world enterprise networks.
So grab a coffee, launch your EVE-NG lab, and let’s go beyond textbook and into practical CCNP-level mastery.
Table of Contents
Theory in Brief: What Are Route Maps & Prefix Lists?
Prefix List: The Filter
Prefix lists are used to match specific IP prefixes and subnet lengths. Think of it as a more powerful version of an access list, designed for route filtering. It’s commonly used in:
- Controlling which routes get advertised or received in BGP or OSPF.
- Defining prefix-match conditions in route maps or policy-based routing.
Example:
ip prefix-list FILTER-PREFIX seq 5 permit 10.0.0.0/8 le 24
This means: Permit any route starting with 10.0.0.0/8 and with subnet mask up to /24.
Route Map: The Policy Engine
Route maps are like if-else logic blocks — they evaluate matched conditions and then take specific actions. They’re super flexible and used in:
- Policy-based routing
- Route filtering and redistribution
- Manipulating BGP attributes (like setting local preference or metric)
Example:
route-map PBR-TEST permit 10
match ip address 101
set ip next-hop 192.168.1.1
Relationship: Prefix Lists Inside Route Maps
Here’s where most learners get confused — prefix lists are often used inside route maps. You define your match logic using a prefix list, then use the route map to apply actions.
Route Maps vs Prefix Lists – Comparison
Feature | Prefix List | Route Map |
---|---|---|
Purpose | Match IP prefixes (filtering) | Apply policies (filter + act) |
Common Use | Route filtering in BGP, OSPF, etc. | Policy-based routing, redistribution, PBR |
Match Capabilities | IP address + subnet length only | Can match multiple conditions (IP, AS, tags) |
Actions Supported | No (just permit/deny) | Yes (set next-hop, local-pref, tags, etc.) |
Complexity | Simple | More complex but flexible |
Config Dependency | Can be standalone or in route maps | Often uses prefix list or access-list |
CLI Use | Lightweight | Heavier logic processing |
Pros and Cons
Feature | Prefix List | Route Map |
---|---|---|
Pros | Fast processing, simple to configure | Extremely flexible, can match and modify route behavior |
Cons | Limited to IP/subnet matching | More CPU-intensive, harder to read for beginners |
Ideal Usage | Filtering routes in BGP, redistributing specific prefixes | Policy-based routing, route manipulation during redistribution, conditional routing |
Essential CLI Commands
Task | CLI Command |
---|---|
Create prefix list | ip prefix-list MY-LIST seq 5 permit 192.168.0.0/16 le 24 |
View prefix list | show ip prefix-list |
Create route map | route-map SET-NH permit 10 |
Match prefix list in route map | match ip address prefix-list MY-LIST |
Set next hop in route map | set ip next-hop 10.1.1.1 |
Apply route map to redistribution | redistribute ospf 1 route-map SET-NH |
Debug route map usage | debug ip routing / debug ip policy |
View route map usage | show route-map |
Real-World Use Case
Scenario | Description |
---|---|
Multi-site BGP Filtering | Use prefix list to allow only your public /24 blocks to be advertised |
Route Redistribution | Use route map to selectively redistribute OSPF into BGP based on tags |
Policy-Based Routing (PBR) | Use access list + route map to redirect guest VLAN traffic via firewall |
Default Route Control | Use prefix list to match 0.0.0.0/0 in BGP |
Small EVE-NG Lab – Route Map + Prefix List Filtering
Lab Topology

- R1 advertises multiple networks via OSPF.
- R2 redistributes OSPF into BGP using route map + prefix list.
- R3 receives only selected prefixes.
R1 Configuration (OSPF Advertisements)
router ospf 1
network 10.1.1.0 0.0.0.255 area 0
network 192.168.10.0 0.0.0.255 area 0
R2 Configuration (Prefix List + Route Map)
ip prefix-list FILTER-ROUTES seq 5 permit 10.1.1.0/24
route-map REDIST-BGP permit 10
match ip address prefix-list FILTER-ROUTES
set metric 200
router bgp 100
redistribute ospf 1 route-map REDIST-BGP
R3 Configuration (BGP Neighbor)
router bgp 100
neighbor 192.168.2.2 remote-as 100
Troubleshooting Tips
Issue | Check This | Suggested Command |
---|---|---|
Route map not matching | Prefix list missing or wrong | show route-map , show ip prefix-list |
Routes not redistributed into BGP | Route map deny all? Redistribute cmd applied? | debug ip routing , show ip bgp |
Route filtered unexpectedly | Sequence number or prefix length mismatch | show ip prefix-list detail |
BGP neighbor not receiving route | Check route-map on outgoing route | show ip bgp neighbors <ip> received-routes |
Prefix list showing 0 matches | Sequence logic wrong or prefix format error | show ip prefix-list <name> |
FAQs – Route Maps vs Prefix Lists
1. What is the primary difference between a route map and a prefix list?
Answer:
A prefix list is used only to match and filter IP prefixes, typically for route advertisements and inbound filtering in protocols like BGP or OSPF.
A route map, on the other hand, acts like a policy engine — it can match on many conditions (prefix, next-hop, tags, metrics) and take actions (like setting metrics, changing next-hop, or redistributing routes).
In short:
- Prefix list = filter
- Route map = filter + act
2. Can a prefix list be used without a route map?
Answer:
Yes. You can apply prefix lists directly to BGP neighbors, distribute-lists, or filter commands in routing protocols to control which prefixes are accepted or advertised.
Example:
neighbor 192.168.1.1 prefix-list BLOCK-NETS in
This blocks certain prefixes from being accepted from a BGP neighbor.
3. Are route maps used only for routing decisions?
Answer:
No. Route maps are versatile and used in:
- Routing (BGP/OSPF/Redistribution)
- Policy-Based Routing (PBR)
- NAT configuration
- QoS classification
So, route maps go far beyond routing—they’re a powerful tool for applying conditional logic in multiple services on Cisco devices.
4. Can I match a prefix list inside a route map?
Answer:
Absolutely. That’s a common practice. You create a prefix list to match specific routes and then reference it within a route map to apply a policy.
Example:
ip address prefix-list ALLOW-ROUTES
This helps you modularize your logic — keep matching and action parts separately for clarity.
5. Do route maps process entries sequentially?
Answer:
Yes. Route maps use sequence numbers, and they process entries from the lowest to highest until a match is found. Once a match occurs in a permit
or deny
statement, the evaluation stops.
Think of it like an if-else ladder — the first match wins. Hence, ordering your route map sequences correctly is critical.
6. What’s the default behavior of a prefix list?
Answer:
If a prefix list doesn’t explicitly permit a prefix, that prefix is implicitly denied.
So always ensure your prefix list includes necessary permit
statements, or you might unintentionally block desired routes.
7. Can I apply a route map on both inbound and outbound BGP updates?
Answer:
Yes. In BGP, you can apply route maps for both incoming and outgoing route advertisements using:
x.x.x.x route-map MY-MAP in
neighbor x.x.x.x route-map MY-MAP out
This gives you full control over what you learn from a peer and what you send to them.
8. What happens if none of the match conditions in a route map are met?
Answer:
If there is no match, and there is no implicit permit or deny, the route or traffic is dropped by default. That’s why careful planning of match statements and default sequences is important. Always include a final “catch-all” sequence if needed:
route-map MY-MAP permit 100
9. Which one should I prefer for filtering routes: ACLs or Prefix Lists?
Answer:
Prefix lists are preferred over ACLs for route filtering because:
- They are faster to process.
- They support more granular control with
le
andge
options. - They are purpose-built for IP prefix matching in routing contexts.
ACLs are still used in PBR and access control scenarios, but prefix lists are the go-to for routing tasks.
10. Can I use both prefix lists and route maps together in the same configuration?
Answer:
Yes — and this is very common in real-world networks. For example, in route redistribution between OSPF and BGP, you can:
- Create a prefix list to define which prefixes to allow.
- Use a route map to match that prefix list and set route attributes.
- Apply the route map during the redistribution process.
This layered approach ensures both precision and flexibility in your routing policies.
YouTube Video – Watch the Live Lab
Watch the Complete CCNP Enterprise: Route Maps vs Prefix Lists – A Deep Dive for Real-World Networking [ CCNP ENTERPRISE ] Lab Demo & Explanation on our channel:
Final Note
Understanding how to differentiate and implement Route Maps vs Prefix Lists – A Deep Dive for Real-World Networking is critical for anyone pursuing CCNP Enterprise (ENCOR) certification or working in enterprise network roles. Use this guide in your practice labs, real-world projects, and interviews to show a solid grasp of architectural planning and CLI-level configuration skills.
If you found this article helpful and want to take your skills to the next level, I invite you to join my Instructor-Led Weekend Batch for:
CCNP Enterprise to CCIE Enterprise – Covering ENCOR, ENARSI, SD-WAN, and more!
Get hands-on labs, real-world projects, and industry-grade training that strengthens your Routing & Switching foundations while preparing you for advanced certifications and job roles.
Email: info@networkjourney.com
WhatsApp / Call: +91 97395 21088
Upskill now and future-proof your networking career!