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.


Examples:

prefix-list applied to neighbor:

http://www.cymru.com/Documents/secure-bgp-template.html


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

router bgp 1234

neighbor 1.2.3.4 remote as 2345

neighbor 1.2.3.4

version 4

neighbor 1.2.3.4 route-map recv in

neighbor 1.2.3.4 route-map announce out

no auto-summary

no synchronization

network 3.4.5.6

!

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 0.0.0.0/0

ip prefix-list Block RFC1918 seq 10 permit 10.0.0.0/8 le 32

!

ip prefix-list allowall seq 5 permit 0.0.0.0/0 le 32

!

route-map announce permit 10

match ip address prefix-list ASN1234

!

ip prefix-list ASN1234 seq 5 permit 1.2.3.0/24


Thanks!


-Jeff

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

Jeff,


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.


HTH


Sundar

Actions

This Discussion