Saturday, June 28, 2014

BGP Soft-Reconfiguration and Route-Refresh

Background Information

  1. When we create new policies such as route-maps, we need a fresh unaltered copy of the updates that we received from the neighbors.
  2. We cannot use what we have in the BGP tables because we may have already modified those and we cannot trust it to be the originals that were sent.
  3. A long time ago, the only way we can get the new policies applied is to reset the peer connection with clear ip bgp.  This will force the peer to resend all the prefixes, allowing us to apply the policies in the new route-map.  However, this causes packet loss while the prefixes are being learned.
  4. Then, Cisco came out with the soft-reconfiguration feature.  The way this works is that the router would maintain a copy of all the original received prefixes.  Now, to apply the new policy, we can just clear ip bpg soft and the original received prefixes that were stored would be used and we don't have to reset the peer connection anymore.
  5. Another newer solution to this problem is the route-refresh capabilities feature.  A router that is capable of this will inform its peer in its open message sent when establishing adjacency.
  6. The route-refresh allows a peer to "ask" another peer to resend its prefixes.  This way, traffic is not blackholed and a whole copy of all the prefixes do not need to be maintained.

Summary

  1. neighbor soft-reconfiguration inbound to store a copy of the neighbor's prefixes.
  2. bgp soft-reconfig-backup to store a copy of the neighbor's prefix if the neighbor does not support route-refresh.
  3. clear ip bgp * soft in to "ask" the peer to resend its prefixes.  When used on a neighbor that has the soft-reconfiguration inbound feature configured, we will use the stored copy instead.  If the soft-reconfiguration feature is not configured for the neighbor, we will send a "route-refresh" request.
  4. show ip bgp neighbor received-routes to view the stored copy of the neighbor's prefixes if using the soft-reconfiguration feature instead of the route-refresh capabilities.
  5. show ip bgp neighbor to see if the neighbor has the route-refresh capabilities.
router bgp 1
  address-family ipv4
    neighbor 10.1.1.1 soft-reconfiguration inbound