07-16-2008 11:57 AM - edited 03-03-2019 10:45 PM
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
Solved! Go to Solution.
07-16-2008 12:03 PM
you can use both but keep in mind
http://www.cisco.com/en/US/tech/tk365/technologies_q_and_a_item09186a00800949e8.shtml#one
I preffer "route-map".
07-16-2008 12:03 PM
you can use both but keep in mind
http://www.cisco.com/en/US/tech/tk365/technologies_q_and_a_item09186a00800949e8.shtml#one
I preffer "route-map".
07-16-2008 12:10 PM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide