Examples: Configuring Peer Policy Templates The following example creates a peer policy template that is named GLOBAL and enters policy-template configuration mode: router bgp 45000 template peer-policy GLOBAL weight 1000 maximum-prefix 5000 prefix-list NO_SALES in exit-peer-policy The following example creates a peer policy template that is named PRIMARY-IN and enters policy-template configuration mode: router bgp 45000 template peer-policy PRIMARY-IN prefix-list ALLOW-PRIMARY-A in route-map SET-LOCAL in weight 2345 default-originate exit-peer-policy The following example creates a peer policy template named CUSTOMER-A.
This peer policy template is configured to inherit the configuration from the peer policy templates that are named PRIMARY-IN and GLOBAL. router bgp 45000 template peer-policy CUSTOMER-A route-map SET-COMMUNITY in filter-list 20 in inherit peer-policy PRIMARY-IN 20 inherit peer-policy GLOBAL 10 exit-peer-policy The following example configures the 192.168.2.2 neighbor in address family mode to inherit the peer policy template named CUSTOMER-A.
Assuming this example is a continuation of the example above, because the peer policy template named CUSTOMER-A above inherited the configuration from the templates that are named PRIMARY-IN and GLOBAL, the 192.168.2.2 neighbor will also indirectly inherit the peer policy templates that are named PRIMARY-IN and GLOBAL. router bgp 45000 neighbor 192.168.2.2 remote-as 50000 address-family ipv4 unicast neighbor 192.168.2.2 inherit peer-policy CUSTOMER-A end Example: Configuring BGP Route Map next-hop self This section contains an example of how to configure BGP Route Map next-hop self.
In this example, a route map is configured that matches the networks where you wish to override settings for bgp next-hop unchanged and bgp next-hop unchanged allpath. Subsequently, next-hop self is configured. After this, the bgp route map priority is configured for the specified address family so that the previously specified route map takes priority over the settings for bgp next-hop unchanged and bgp next-hop unchanged Configuring BGP Examples: Configuring Peer Policy Templates Configuring BGP 55