Prefix Lists – Examples
Deny default route
ip prefix-list Example deny 0.0.0.0/0
Permit the prefix 35.0.0.0/8
ip prefix-list Example permit 35.0.0.0/8
Deny the prefix 172.16.0.0/12, and all more-specific routes
ip prefix-list Example deny 172.16.0.0/12 ge 12
“ge 12” means “prefix length /12 or longer”. For example, 172.17.0.0/16 will also be denied.
In 192.0.0.0/8, allow any /24 or shorter prefixes
ip prefix-list Example permit 192.0.0.0/8 le 24
This will not allow any /25, /26, /27, /28, /29, /30, /31 or /32