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.