Configuration Examples for BGP The following sections provide configuration examples for BGP. Example: Configuring Conditional BGP Route Injection The following sample output is similar to the output that will be displayed when the show ip bgp injected-paths command is entered: Device# show ip bgp injected-paths BGP table version is 11, local router ID is 10.0.0.1 Status codes:s suppressed, d damped, h history, * valid, > best, i - internal Origin codes:i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 172.16.0.0 10.0.0.2 0 ? *> 172.17.0.0/16 10.0.0.2 0 ? Example:
Configuring Peer Session Templates The following example creates a peer session template that is named INTERNAL-BGP in session-template configuration mode: router bgp 45000 template peer-session INTERNAL-BGP remote-as 50000 timers 30 300 exit-peer-session The following example creates a peer session template named CORE1. This example inherits the configuration of the peer session template named INTERNAL-BGP. router bgp 45000 template peer-session CORE1 description CORE-123 update-source loopback 1 inherit peer-session INTERNAL-BGP exit-peer-session The following example configures the 192.168.3.2 neighbor to inherit the CORE1 peer session template.
The 192.168.3.2 neighbor will also indirectly inherit the configuration from the peer session template named INTERNAL-BGP. The explicit remote-as statement is required for the neighbor inherit statement to work. If a peering is not configured, the specified neighbor will not accept the session template. router bgp 45000 neighbor 192.168.3.2 remote-as 50000 neighbor 192.168.3.2 inherit peer-session CORE1 Configuring BGP Configuration Examples for BGP Configuring BGP 54