Pages

Saturday, June 9, 2012

Configuring BGP - Soft Reconfiguration Inbound

We live in a world filled with instant updates. Where you are going? What you are eating? What you did last night? Everything is instantly "updated", "tweeted", and "posted". So why is it that when we make a routing policy change to BGP we have to clear the entire state of the BGP neighbor and tear down BGP peering before it can take effect?

To keep up-to-date with the world we live in we can configure 'BGP Soft Reconfiguration' which will allow us to make routing policy changes to BGP without having to tear down the peering. 

Consider the simple topology below and let's get started. 
First, let's get the interfaces configured. 

  • Get R2 Fast1/0 configured with an IP. 
  • Configure a Loopback with 2 IP addresses. 
  • Get R3 Fast1/0 configured with an IP.
Now let's get BGP configured between R2 and R3 and advertised just one IP (2.2.2.2) from R2's Loopback to R3. 
  • Create a prefix-list to match the routes we want to advertise to R3. In this case, we are going to advertise just one route (2.2.2.2/32) over to R3. 
  • Create a new instance of BGP.
  • Get 2.2.2.2/32 into the BGP table with the network statement.
  • Create the peering with R3. 
  • Apply the prefix-list.  
Time to get the BGP configured on R3. 

  • Create a new instance of BGP and get the peer up. 
  • Notice that after BGP establishes you are only receiving one route as expected. 
Now let's try and advertise 2.2.2.3/32 to R3 and see what happens. 
  • Add the network statement so the route can get into the BGP table. 
  • Add it to the prefix-list so it can be allowed in the updates sent to the neighbor.
  • Notice that 2.2.2.3/32 is in the R2 BGP Table to be advertised to its neighbors. 

But how come R3 is not showing the routes? That is because BGP does not dynamically update routing policy changes. Cisco IOS automatically supports soft reconfiguration for sent updates however inbound updates must be explicitly set. 

  • Add soft-reconfiguration inbound to the neighbor statement in R3. This basically tells R3 to cache updates received from R2. 

Notice that 2.2.2.3/32 is now showing up after a quick 'clear ip bgp 1.1.1.1 (R2) soft'. This did not take down R3 BGP peering with R2 to take effect. 

Conclusion: 

Soft-reconfiguration inbound is very useful and I almost configure it pretty much everywhere. However, this does take up a lot of memory because the router stores all of the updates that it receives from the neighbor. So make sure the router has enough memory before turning it on. 

Many more articles to come so stay tuned. 

Please subscribe/comment/+1 if you like my posts. 

Thank you. 

5 comments:

  1. Hi,

    Thanks for the post.

    Does "soft-reco...." automatically update prefixes when added to the neighbor?

    Secondly, without soft-recon... i belieace one can do a "clear ip bgp 1.1.1.1 soft" and your prefixes will be updated.

    "DOES ONE REALLY HAVE TO ADD THIS COMMAND THEN", just checking!!!

    Regards,
    FM Dalu
    CCNP; CCIP

    ReplyDelete
    Replies
    1. 1) Soft-reconfiguration inbound does not automatically update the bgp table. Clear ip bgp soft will do the trick.

      2) Without soft-reconfiguration, clear ip bgp 1.1.1.1 soft will not have any effect.

      3) 'Show ip bgp ' should say "Inbound soft reconfiguration allowed" if you have soft-reco configured on the neighbor.

      Basically soft-reco stores all of your neighbor updates in memory and applies it when you issue the "clear ip bgp soft" which is why soft-reco consumes a lot of memory.

      Thank you for your comment.

      Arwin R.

      Delete
  2. Hi,

    I don't quite agree with you. Check configs from my routers below, i dont have soft-recon.. confugured, yet i issue the command and the prefixes refresh. I have doen this on several occasions yet it works.

    Please correct me if i missed something.

    DO WE REALLY NEED THE SOFT-RECON....

    R1#squeeze flash:
    Squeeze operation may take a while. Continue? [confirm]
    squeeze in progress...
    R9(config-router)#do sh ip bgp nei 192.168.1.254 ro
    BGP table version is 6, local router ID is 9.9.9.9
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
    r RIB-failure, S Stale
    Origin codes: i - IGP, e - EGP, ? - incomplete

    Network Next Hop Metric LocPrf Weight Path
    *> 155.155.1.0 192.168.1.254 0 120 0 156 1025 2356 ?
    *> 155.155.4.0 192.168.1.254 0 120 0 156 1025 2356 ?
    *> 155.155.5.0 192.168.1.254 0 120 0 156 1025 2356 ?

    Total number of prefixes 3
    R9(config-router)#do clear ip bgp * soft
    R9(config-router)#do sh ip bgp nei 192.168.1.254 ro
    BGP table version is 11, local router ID is 9.9.9.9
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
    r RIB-failure, S Stale
    Origin codes: i - IGP, e - EGP, ? - incomplete

    Network Next Hop Metric LocPrf Weight Path
    *> 155.155.1.0 192.168.1.254 0 120 0 156 1025 2356 ?
    *> 155.155.4.0 192.168.1.254 0 120 0 156 1025 2356 ?
    *> 155.155.5.0 192.168.1.254 0 120 0 156 1025 2356 ?
    *> 155.155.21.0 192.168.1.254 0 120 0 156 1025 2356 e
    *> 155.155.22.0 192.168.1.254 0 120 0 156 1025 2356 e

    Total number of prefixes 5
    R9(config-router)#

    ReplyDelete
  3. You do not need it as of IOS 12.0.

    http://www.cisco.com/en/US/products/ps6599/products_data_sheet09186a0080087b3a.html

    Previously, in order to perform a soft reset for inbound routing table updates, the neighbor soft-reconfiguration command directed the Cisco IOS software in the local BGP router to store all received (inbound) routing policy updates without modification. This method is memory-intensive and not recommended unless absolutely necessary. (Outbound updates have never required the extra memory and are not affected by this feature.)

    With this software release, the BGP Soft Reset Enhancement feature provides automatic support for dynamic soft reset of inbound BGP routing table updates that is not dependent upon stored routing table update information. The new method requires no preconfiguration (as with the neighbor soft-reconfiguration command) and requires much less memory than the previous soft reset method for inbound routing table updates.

    ReplyDelete
    Replies
    1. Appreciate the comment. I would like to point out a couple of things as well.

      1) BGP peers must support the route refresh capability to use dynamic inbound soft reset capability.
      2) It is only supported in these platforms.

      Cisco 1003
      Cisco 1004
      Cisco 1005
      Cisco 1600 series
      Cisco 2500 series
      Cisco 3600 series
      Cisco 3800 series
      Cisco 4000 series (Cisco 4000, 4000-M, 4500, 4500-M, 4700, 4700-M)
      Cisco 5200 series
      Cisco 7000 series
      Cisco 7200 series
      Cisco 7500 series

      Thank you for researching this.

      Delete