Thursday, October 13, 2011

notes: Clearing BGP Sessions

The Cisco IOS software command summary lists the following circumstances when a BGP connection should be reset:
 - Additions or changes to BGP-related access lists.
 - Changes to BGP-related weights/attributes.
 - Changes to BGP-related distribution lists.
 - Changes to BGP-related timers.
 - Changes to the BGP administrative distance.
 - Changes to BGP-related route maps.

Traditional clearing of BGP session (aka Hard Reset)
  - Completely tears down the BGP session and rebuilds the sessions. (Interruptive in production)
 -  A new session should be re-established within 30-60 seconds depending on the amount of routes
 - If dampening is enabled a hard reset will result in a penalty.
 - Processing the full internet table after a hard reset can take a long time.

Soft Reconfiguration: Outbound or Inbound (IOS 11.2+)
  - Outbound soft reconfiguration resends complete BGP table. It is not configurable and is always enabled
  - Inbound soft reconfiguration stores a complete BGP table of a neighbor in router memory. (Could be very resource demanding)
 - Inbound soft reconfiguration require configuration to be setup.

Route Refresh (Soft Reset) (IOS 12.1+)
 - Used to request a neighbor to resend routing info. Useful after config changes to update BGP table.
 - Route-refresh-capability is negotiated upon BGP peer session establishment.
 - Is also used with ORF when inbound prefix-list route refresh is required. (see ORF section)
 - BGP Dynamic Update Peer-Group Feature
 - Used to recalculate all BGP update-group member sessions.

commands:

 - Tears the BGP sessions down completely and establishes them again

clear ip bgp {*|ip|peer-group name}

Soft Reconfiguration
 - This only enables inbound soft reconfiguration on the router, so that all the routes are stored in memory before filters are applied.

router bgp {asn}
neighbor {ip} soft-reconfig [inbound]





- This takes all the routes in memory, reapplies the filters, before implementing the passed routes into BGP table.

clear ip bgp {ip} soft in 

 - This will resend the BGP table to a neighbor, for that neighbor to re-apply all his configured inbound filters

clear ip bgp {ip} soft out


Route Refresh
 - Requests a neighbor to resend routing information without terminating the session

clear ip bgp {*|ip|peer-group name} in



- Used to recalculate all BGP update-group member sessions

clear ip bgp update-group [index-group][peer-ip]

No comments:

Post a Comment