cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1978
Views
0
Helpful
2
Replies

prefix-list or route-map for bgp filters?

jcw009
Level 1
Level 1

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

1 Accepted Solution

Accepted Solutions
2 Replies 2

a.alekseev
Level 7
Level 7

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

Review Cisco Networking products for a $25 gift card