Thursday, October 13, 2011

notes: BGP Peer Groups and Peer Templates

- Benefits
 Reduces the amount of system resources (CPU and memory) necessary in an update generation.
Mostly used to simplify large repeating BGP configurations.
- Individual parameters specified in a peer group can be overridden or removed, on a neighbor-by-neighbor basis.
- Configurable parameters include the following:
Community propagation.
Source interface for TCP session.
eBGP multihop sessions.
MD5 password.
Neighbor weight
Filter-lists and distribute-lists
Route-maps.


commands:

- Creates a BGP peer group
- Peer group names are case-sensitive
router bgp 1
neighbor {group-name} peer-group

- Specifies any BGP parameter for the peer group
neighbor {group-name} {any-bgp-parameter}


 - Assigns a BGP neighbor to a peer group, thus inheriting the peer-group parameters
neighbor {ip} peer-group {group-name}

 - Overrides a BGP parameter specified for the peer group with a neighbor parameter
neighbor {ip} {any-bgp-parameter} 

 - Removes a BGP parameter specified for the peer group with the neighbor parameter
no neighbor {ip} {any-bgp-parameter}

- Displays the specified peer group or all peer groups
 sh ip bgp peer-group [peer-group-name]

 - Displays summary status of all neighbors in the peer group
sh ip bgp peer-group [peer-group-name] summary

 - Clears BGP session with all peer group members
clear ip bgp [peer-group-name] [[soft] in|out]

 - Displays info about peer-group update-group calculation, the additions and the removals of members
- Displays info about peer groups, peer-policy, and peer-session templates
  debug ip bgp groups [index-group] [peer-ip]

There are two types of peer templates:

1.  Peer Session Templates: Are used to group and apply the configuration of general session commands to groups of neighbors that share common session configuration elements.

2.  Peer Policy Templates: Are used to group and apply the configuration of commands that are applied within specific NLRI

configuration mode.

- Creates a peer policy template, enter policy-template config-mode
- Specifies the client a RR-client
- Specifies a weight for all routes from a neighbor

 router bgp 6024
 template peer-policy POLICY 
 route-reflector-client 
 weight 300 
 exit-peer-policy
 !
- Creates a peer session template, enter session-template config-mode
- Configures peering ASN with a remote neighbor
- Use the Loopback interface for sourcing traffic

 template peer-session iBGP 
 remote-as 6024 
 update-source Loopback1 
 exit-peer-session
!
- Sends a peer session template to a neighbor to inherit
- Configures this peer session template to inherit the configuration
 neighbor 7.7.2.2 inherit peer-session iBGP
 neighbor 7.7.2.2 inherit peer-policy POLICY





No comments:

Post a Comment