cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
1921
Views
5
Helpful
2
Replies
Highlighted

BGP order for prefix-lists AND route-maps

General question about BGP.

Taking this config:

neighbor 1.1.1.1 prefix-list MY_PREFIX_LIST in
neighbor 1.1.1.1 route-map MY_ROUTE_MAP in

route-map MY_ROUTE_MAP permit 10
 set local-pref 110

ip prefix-list MY_PREFIX_LIST seq 5 deny 2.2.2.2/32
ip prefix-list MY_PREFIX_LIST seq 10 permit 0.0.0.0/0 le 32

If 1.1.1.1 advertises the 2.2.2.2 prefix, it will be permitted (and local pref set to 110) because inbound route-maps are processed first (and of course the lack of a match statement indicates match-all). Correct?

Or am I misunderstanding this page?

Everyone's tags (4)
1 ACCEPTED SOLUTION

Accepted Solutions
Hall of Fame Cisco Employee

Hi Steven,

Hi Steven,

The BGP FAQ document you're referencing should be the authoritative guide. So for inbound routes, first the route-map, then the prefix-list are evaluated - that's correct. But my understanding is different: The route-map is the first filter, and whatever remains after passing through the route-map is additionally subjected to the prefix-list. A route will be accepted only if it is permitted both by the route-map and the prefix-list - it has to pass both.

So in this logic, the 2.2.2.2/32 should not be accepted because even though it has made it through the route-map, the prefix-list drops it explicitly.

Would that match your observations?

Best regards,
Peter

2 REPLIES 2
Hall of Fame Cisco Employee

Hi Steven,

Hi Steven,

The BGP FAQ document you're referencing should be the authoritative guide. So for inbound routes, first the route-map, then the prefix-list are evaluated - that's correct. But my understanding is different: The route-map is the first filter, and whatever remains after passing through the route-map is additionally subjected to the prefix-list. A route will be accepted only if it is permitted both by the route-map and the prefix-list - it has to pass both.

So in this logic, the 2.2.2.2/32 should not be accepted because even though it has made it through the route-map, the prefix-list drops it explicitly.

Would that match your observations?

Best regards,
Peter

Hi Peter,

Hi Peter,

Thanks for that. I just labbed this up and confirmed that the behavior is exactly as you've described.

Cheers,

Steve

CreatePlease to create content
Content for Community-Ad
July's Community Spotlight Awards