prefix-list or route-map for bgp filters?

Answered Question
Jul 16th, 2008
User Badges:

I'm curious about best practices regarding the usage of route-maps or prefix-list in the bgp config.

Some examples i've seen apply a prefix-list directly to a neighbor, others use a route-map.

I can't tell if there is a benefit one way or another.


prefix-list applied to neighbor:

prefix-list applied to route-map applied to neighbor:

router bgp 1234

neighbor remote as 2345


version 4

neighbor route-map recv in

neighbor route-map announce out

no auto-summary

no synchronization



route-map recv deny 10

match ip address prefix-list Block_RFC1918

route-map recv permit 20

match ip address prefix-list allowall


ip prefix-list Block_RFC1918 seq 5 permit

ip prefix-list Block RFC1918 seq 10 permit le 32


ip prefix-list allowall seq 5 permit le 32


route-map announce permit 10

match ip address prefix-list ASN1234


ip prefix-list ASN1234 seq 5 permit



Correct Answer by a.alekseev about 8 years 11 months ago
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4 (1 ratings)
sundar.palaniappan Wed, 07/16/2008 - 12:10
User Badges:
  • Green, 3000 points or more


As the previous poster stated you can use either one to filter routes. However, route maps gives you more flexibility with configuration. You could have different attributes applied to different prefixes in addition to just plain filtering that a prefix list does. Think of route maps as something to similar to MQC (policy map & class maps ) for QOS and the flexibility that comes with it.




This Discussion