BGP Templates on MPLS VPN PE-routers

From CT3

Jump to: navigation, search

By Ivan Pepelnjak

The BGP templates introduced in Cisco IOS releases 12.3T, 12.4, 12.2S and 12.2SBC allow you to group session-specific and routing-policy-specific BGP settings into templates with a hierarchical inheritance structure. The peer-session templates define all session-specific parameters (for example, update-source, ebgp-multihop, password, remote-as or local-as), while the peer-policy templates define parameters that influence routing policies, route filters, community propagation and generation of BGP updates (for example, route-map, filter-list, send-community and route-reflector-client).

The Cisco IOS documentation does not tell you how to apply BGP templates to multiple address families:

  • The peer-session template is applied to the global neighbor definition.
  • The peer-policy template needs to be applied to a neighbor for each address family in which the neighbor is activated.

For example, to configure two PE-routers (using both IPv4 and VPNv4 address families) as route-reflector clients on a route reflector, use the following configuration:

The address-family ipv4 unicast router configuration command was used to create the explicit IPv4 address family, resulting in a nice separation of global neighbor definition and IPv4 neighbor parameters. The send-community extended option is automatically configured on VPNv4 neighbors.
router bgp 65000
 template peer-policy Internal
  route-reflector-client
  send-community both
 exit-peer-policy
 !
 template peer-session Internal
  remote-as 65000
  update-source Loopback0
 exit-peer-session
 !
 bgp log-neighbor-changes
 neighbor 10.0.1.1 inherit peer-session Internal
 neighbor 10.0.1.1 description PE-A
 neighbor 10.0.1.2 inherit peer-session Internal
 neighbor 10.0.1.2 description PE-B
 !
 address-family ipv4
  no synchronization
  neighbor 10.0.1.1 activate
  neighbor 10.0.1.1 inherit peer-policy Internal
  neighbor 10.0.1.2 activate
  neighbor 10.0.1.2 inherit peer-policy Internal
  no auto-summary
 exit-address-family
 !
 address-family vpnv4
  neighbor 10.0.1.1 activate
  neighbor 10.0.1.1 send-community extended
  neighbor 10.0.1.1 inherit peer-policy Internal
  neighbor 10.0.1.2 activate
  neighbor 10.0.1.2 send-community extended
  neighbor 10.0.1.2 inherit peer-policy Internal
 exit-address-family

Additional Resources  

Implementing Cisco MPLS (MPLS) course:

Configuring BGP on Cisco Routers (BGP) course:

Other links

Did you know?

  • NIL developed the first commercially available MPLS/VPN traning.
  • This training was for several years the only course available to Cisco's internal audiences and its Service Provider customers in Europe.
  • The MPLS/VPN course developed by NIL later became part of Cisco's Service Provider training curriculum and the basis for the Implementing Cisco MPLS (MPLS) course that is part of the CCIP curriculum.
  • NIL's experts have worked as part of Cisco's Professional Services team supporting early adopters of MPLS VPN technology in Europe.
  • NIL has provided several large Service Providers with MPLS/VPN design and deployment support.
Personal tools

CT3

Main menu