Prefix-lists are a precise and scalable tool for filtering routes based on network prefix and prefix length – typically used in routing (especially BGP).

Facts (key topic)

Which problem does it solve?

Prefix-lists match both network and mask length, are readable and deterministic – perfect for BGP policy control.

Configuration (IOS / IOS-XE)

ip prefix-list PL-LOCAL permit 10.0.0.0/8
ip prefix-list PL-LOCAL seq 10 permit 10.0.0.0/8
! prefix-length range (CCNP important!):
ip prefix-list PL-LOCAL seq 20 permit 10.0.0.0/8 ge 16 le 24
! matches 10.0.0.0/16, 10.1.0.0/17, 10.2.3.0/24 – but NOT /25 or /15
! IPv6:
ipv6 prefix-list PL-V6 seq 10 permit 2001:db8::/32 le 64

Prefix-list + BGP (exam classic)

router bgp 65001
 neighbor 192.0.2.1 prefix-list PL-LOCAL in
 neighbor 192.0.2.1 prefix-list PL-LOCAL out

In a route-map (redistribution, BGP attribute manipulation):

route-map RM-FILTER permit 10
 match ip address prefix-list PL-LOCAL

Special considerations

ACL vs prefix-list

Feature ACL Prefix-list
Matches prefix length
Readable
Scalable ⚠️
Routing-focused ⚠️

CCNP exam tips 🔥