BGP applying route maps to prefixes

Route maps can be applied to manipulate BGP attributes when BGP peers advertise prefixes to each other. Route maps can be applied:

  • in the neighbor command - using the keyword route-map you can specify a route map to be applied to a neighbor. You must also specify the direction in which the route-map will apply. In such a scenario, the route map acts upon the BGP advertisements sent or received, depending upon the direction applied. The route map will be applied to the prefixes that match the route map statements. The following is an example of such a command applied in an inbound direction:

R1(config-router)#neighbor 10.10.10.1 route-map MY_RM in

  • in the network command - using the keyword route-map you can specify a route map to be applied to a particular network. THe route map acts upon the BGP advertisements sent from the local device for that particular prefix, and only if the conditions in the route map are met.

R1(config-router)#network 1.1.1.1 mask 255.255.255.255 route-map MY_RM

https://networklessons.com/bgp/how-to-configure-bgp-local-preference-attribute https://networklessons.com/cisco/ccnp-encor/introduction-to-route-maps