Prefix-List & Route-Map Reference
Cheat sheet · https://pcornel.dk/topic.php?topic=216
Answer
A prefix-list matches routes by prefix and prefix length. A route-map is an ordered list of permit and deny clauses that match routes — often with a prefix-list — and can set attributes on them. Both are read top-down, the first match wins, and both end with an implicit deny.
Remember
10.0.0.0/8 in a prefix-list matches only that exact /8; add le 24 or ge 24 to match longer prefixes inside it. 0.0.0.0/0 is only the default route; 0.0.0.0/0 le 32 is everything. In a route-map, a route that matches no clause is dropped, so finish with an empty permit clause if the rest should pass. A clause without match matches all routes. Policy changes apply after a soft clear.
First checks
show ip prefix-list detail <name> → entries and hit counts. show route-map <name> → clauses in order with match and set lines. show ip bgp neighbors <ip> routes → what survived inbound policy. Then clear ip bgp <ip> soft in (or out).
Commands
show ip prefix-list- Shows IPv4 prefix-list entries and counters.
show bgp ipv4 unicast prefix-list <name>ip prefix-list CUST permit 10.20.0.0/16show route-mapclear ip bgp <neighbor> soft in
Verify in this order
route → route-map clauses in sequence order → first clause whose match is true → permit: apply set, accept · deny: drop → no clause matches: implicit deny → soft clear → result visible in the BGP table
Where it usually breaks
physical/link dependency → local object state → peer/control state → policy → forwarding/adjacency → end-to-end result
Prefix-List & Route-Map Reference operational reference
| Boundary | Known-good for Prefix-List & Route-Map Reference | Suspicious signature | Next proof |
|---|---|---|---|
| Input/session | Correct peer, source, AF and route context | Session/source/input state disagrees | Exact peer/source/prefix detail |
| Policy/protocol | deterministic route policy built from ordered prefix-list matching and route-map sequence evaluation, with explicit direction, match/set behavior, implicit deny boundaries and before/after route evidence matches intended design | a prefix-list length operator matches a different set than intended, an earlier sequence shadows the expected rule, no sequence permits the route, the route map is attached in the wrong direction, a set action never runs because its match failed, or operators inspect only the policy configuration without proving the exact prefix traversed it | Compare policy/attributes/propagation |
| Route/forwarding | Expected result reaches RIB/FIB | Control-plane state exists but installed path disagrees | RIB/FIB/CEF + next-hop proof |
| Closure | Original workload passes for explained reason | Symptom moved, was bypassed or state was forced | Regression/failover test |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=216