What is the advantage of matching the policy-list instead of prefix-list in the route-map?

Hello Team,

 

I've come across few scenarios where I see it is configured in a way that a prefix-list (with a bunch of entries) is calling under an 'ip policy-map' and that policy-list is used to mach inside the route-map and to set the community attributes for the matching prefixes. My question is what is the advantage of doing this way comparing to the way where the prefix-lists are used to match the prefixes inside the route-maps (instead of policy-lists)?

 

Example:

 

 

ip prefix-list ALLOW_PREFIX1 permit 169.125.3.78/32

ip prefix-list ALLOW_PREFIX1 permit 10.25.33.0/24

ip prefix-list ALLOW_PREFIX1 permit 192.16.124.240/29

ip prefix-list ALLOW_PREFIX1 permit 191.33.172.240/29

ip prefix-list ALLOW_PREFIX1 permit 220.175.240/29

ip prefix-list ALLOW_PREFIX2 permit 44.3.113.0/24

ip prefix-list ALLOW_PREFIX2 permit 10.26.53.66/32

!

ip policy-list XYZ permit

match ip address prefix-list ALLOW_PREFIX1

!

ip policy-list YWX permit

match ip address prefix-list ALLOW_PREFIX2

!

route-map ABC permit 20

  match policy-list YWX

  match policy-list XYZ

set community 200:70 230:150 300:170 320:1

!

route-map ABC permit 20

  match policy-list XYZ

set community 200:70 230:150 300:170

!

router bgp 100

neighbor 192.168.10.10 remote-as 250

neighbor 192.168.10.10 route-map ABC out

 

Regards,

George

Comments

Sign In or Register to comment.