BGP Soft Reconfiguration

This topic is to discuss the following lesson:

Hello Rene, will enable soft-reconfiguration take a lot of memory from my router? And what happens if i want the adj-rib-in to sync again with the loc-rib? Do i have to remove the command and do hard reset?

Hi Mauro,

Yes but it depends on the number of prefixes that you receive from your neighbor. Since you are saving an extra copy of each table that you receive, you’ll need extra memory. 100 prefixes won’t make the difference but storing entire internet routing tables will.

It’s best to use “soft refresh” if your router supports it instead of soft reconfiguration.

I’m not sure if disabling soft reconfiguration is enough or if we also have to reset the BGP neighbor before it takes effect. I’d have to try that…

Rene

Hi Rene,

I’m a bit confused regarding the command

clear ip bgp soft

Is this command both applicable to Route Refresh Capability and Soft Reconfiguration? Thank you.

Hi Neldien,

That’s right, if route refresh is supported then the router will send a refresh request. When it’s not supported and you have enabled soft reconfiguration then the command will copy prefix from the adj-RIB-in to the loc-RIB.

Rene

Hi Rene,

Can i say that if i din’t enable the soft-configuration for the neighbor, when i do clear ip bgp x.x.x.x soft in, it will not take any effects?

Just clarify below is this correct?

  • Dynamic Soft Reset (route refresh) = clear ip bgp x.x.x.x soft in
  • Soft reset with pre-stored information = clear ip bgp x.x.x.x in
Davis

 

Hi Davis,

When you don’t have soft configuration configured then that command will use the route refresh:

R1#clear ip bgp 192.168.12.2 soft in

Here’s what you will see:

R1#
BGP: 192.168.12.2 sending REFRESH_REQ(5) for afi/safi: 1/1, refresh code is 0
BGP: 192.168.12.2 rcv message type 5, length (excl. header) 4
BGP: 192.168.12.2 rcvd REFRESH_REQ for afi/safi: 1/1, refresh code is 1
BGP: 192.168.12.2 rcv message type 5, length (excl. header) 4
BGP: 192.168.12.2 rcvd REFRESH_REQ for afi/safi: 1/1, refresh code is 2

About the commands:

  • clear ip bgp x.x.x.x in: Soft reconfig inbound updates
  • clear ip bgp x.x.x.x out: Soft reconfig outbound updates
  • clear ip bgp x.x.x.x soft: Soft reconfig inbound + outbound updates
  • clear ip bgp x.x.x.x soft in: Soft reconfig inbound updates
  • clear ip bgp x.x.x.x soft out: Soft reconfig outbound updates

When you don’t have soft reconfiguration enabled, it will use a route refresh instead.

Rene

Hi Rene,

Looks there’s no different clear ip bgp x.x.x.x soft in and clear ip bgp x.x.x.x in.

Means both command works like below

With Soft reconfiguration enable, both command will be use the existing table (before any policy apply) to apply the new policy if there is, without request from the neighbor

without the soft reconfiguration enable, both command will be request the new routing table from the neighbor and apply the policy from here if there is.

am i right?

Davis

Hi Davis,

That’s right. It’s a bit confusing but that’s how it works yes.

Rene

Ok. Thanks Rene.

Davis

I think your sentence “We apply our inbound BGP policy to this information and the result is a table called the adj-RIB-in” should read “We apply our inbound BGP policy to this information and the result is a table called the Loc-RIB”, correct? Also “seperate” should be “separate”. (Sorry to be picky, I’m a spelling-bee champion wanna-bee.)

Hi Paul,

You are 100% correct, just fixed these errors. Thanks!

Rene

Hi Rene and Team,

Is the adj-RIB-In-In table for each neighbor static, as in it doesn’t dynamically update once it is initially populated when neighbor first comes up?

If we want to repopulate the adj-RIB-In can this only be done with a hard reset?

Thanks

Hello Robert

The adj-RIB-In table will not be refreshed when using a soft reset. The table is static only in the sense that it will not change when implementing a soft reset. But this table isn’t static in general. If there are changes to routing that BGP neighbours send to the local router, these will go into the adj-RIB-In table and be updated.

A hard reset will repopulate the adj-RIB-In table, however, like Rene mentions, it is not preferred. If the router in question supports it, the most preferred method is the Dynamic Soft Reset option also known as Route Refresh. This will indeed refresh the table by requesting new information from the BGP neighbours however, this will occur without disruption. More about the Route Refresh option can be found in the following lesson:


I hope this has been helpful!

Laz

1 Like

Hello Rene and staff, I just went throught this lesson and I was wondering under what condition would i need to configure bgp soft-reconfiguration between my bgp neighbours? If there is an hq location and three branch offices running bgp between them and there is not any routing changes being made between them on a daily basis, why would i need to configure bgp soft-reconfiguration between hq and the branch odffices? Is there an advantage or disadvantage to have this running at all times since you said it takes resources form the router?

Thanks,
Doogle1b1

Happy holidays.

Hello Cecil

BGP Soft Reconfiguration is used in order to allow BGP routing policy changes that occur due to changes in the configuration to propagate between BGP peers. If you do not make configuration changes in BGP often, then this feature is not necessary. The alternative is to do a hard reset. Rene describes this in the lesson like so:

The hard reset is the most simple method (clear ip bgp command). It kills the TCP session with your BGP neighbor which forces it to restart and as a result you’ll receive all prefixes from your neighbor again. It works, but it’s cruel…

What you end up doing really depends on how often you make config changes. If you don’t do so very often, a hard reset may be sufficient. If you have a large network and a large BGP table, then you might want to consider using this feature even for few config changes.

I hope this has been helpful!

Laz

Hi, i am a new member and i don’t know if i have to create a new discussion (where ?) or create a reply to ask my question about soft-reconfiguration (this is what i do currently)

I want to talk about
"
The adj-RIB-in table is actually stored in memory for each neighbor, the adj-RIB-out table not.
"
I want to know if the way i understand this sentence is ok

For policies IN, you cannot ask to your peer to refresh updates (after policies IN are created), if your peer do not have this capabilitie…so you build your own specific table with soft-reconfiguration (adj-RIB stored in memory)…so you can make the job to apply policies IN by your own (via soft in)

But for policies OUT, you don’t have to store the routes in adj-rib-out because when you create policies OUT, you can generate updates to your peer by your own

So the final question is: when you create policies OUT, are updates to your peer created automatically by BGP just after you created these policies ?

(sorry about my english but my native langage is french)
Thanks

Hello Laz.
Thanks for the response. You cleared it up for me.

1 Like

Hello Dominique

First of all, it’s always great to have new members! Looking forward to answering your questions. As for where to ask your questions, you can find a lesson that is associated with what you want to ask, and post it there. If there is no lesson, feel free to open a new discussion. If necessary, we can re-categorize your post at a later time. More on using the forum can be found here:

Now on to your question, which is actually posted in the correct location! :sunglasses:

Referring back to what you said, for OUT policies, you don’t have to store the adj-rib-out tables, because they are actually sent out when they’re created. They’re not stored, but sent to peers immediately once generated. So yes you are correct, that updates to the peers are created and sent automatically just after the polices are created.

I hope this has been helpful!

Laz

Hi René,

1st Thank you for all the hard work and quality documentation that you provide.

Now my question,

Let say that i would like to soft reset bgp so it can take new policies/ configured but it doesnt have the “Neighbor x.x.x.x soft-reconfiguration inbound” configured.

Can i just add the command “Neighbor x.x.x.x soft-reconfiguration inbound” to my configuration 1st and then Soft Reset it ?

Or it need to be hard reset once to to save the routing information from the device unmodified in the adj-RIB-in table ?

Thank you in advance .