Using route-map and BGP community to change AD distance
Hello. We are trying to use a route-map and a BGP community to change the admin distance on a certain BGP route with a defined community. In turn, we will use this as a tracking event to determine which vrid is active between two appliances. This setup worked on one appliance but for whatever reason the second appliance isn't changing the AD distance. Here is a sample config.
! Define BGP Community List
ip community-list standard LOW_PRIORITY permit 65000:100
! Define Route Map Matching the Community
route-map COMMUNITY_DISTANCE_MATCH permit 10
match community LOW_PRIORITY
! Configure BGP Process
router bgp 65000
bgp router-id 1.1.1.1
! Define eBGP neighbor
neighbor 192.0.2.1 remote-as 65001
neighbor 192.0.2.1 description Peer to ISP A
! Change administrative distance for matched routes
distance 200 100.0.0.1/24 route-map COMMUNITY_DISTANCE_MATCH
So if a route is learned via BGP on 100.0.0.1 then it should change the AD to 200.
Comments
Update. We determined at the other appliance we had an ACL that was named the same as the route-map and the distance was being altered since it had an ACL permitting all. We have determined that you cannot use a route-map to alter the distance of a route. This would be a nice feature so that we can then use the Admin distance as a route tracking mechanism to determine if the vrid should be active on that appliance or not.