BGP Soft Reconfiguration

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Search...

Table of Contents
CCIE Routing & Switching

Unit 1: Preparation
Unit 2: Switching
Unit 3: IP Routing
Unit 4: RIP
Unit 5: EIGRP
Unit 6: OSPF
Unit 7: BGP
Introduction to BGP

eBGP (External BGP)

eBGP Multi-Hop

iBGP (Internal BGP)

How to read the BGP Table

How to advertise networks in BGP

iBGP Next Hop Self

BGP Auto-Summary

BGP Neighbor Adjacency States

BGP Messages

BGP Weight Attribute

BGP Local Preference

BGP AS Path and Prepending

BGP Origin Code

BGP MED (Metric) Attribute

BGP Communities

BGP Community No Advertise

BGP Community No Export

BGP Community Local AS

BGP Regular Expressions

BGP ltering with regular expressions

BGP Allow AS in

BGP AS Override

BGP IPv6 route ltering

BGP Transit AS
BGP Route Re ector

BGP Confederations

BGP Synchronization

BGP Backdoor Routes

BGP Peer Groups

MP-BGP (Multi-Protocol BGP)

BGP Private and Public AS Numbers

BGP Remove Private AS Numbers

BGP Soft Recon guration

BGP Route Refresh Capability

BGP Extended Access-List Filtering

Unit 8: Multicast
Unit 9: IPv6
Unit 10: Quality of Service
Unit 11: Security
Unit 12: System Management
Unit 13: Network Services
Unit 14: MPLS

You are here: Home » Cisco » CCIE Routing & Switching

BGP Soft Reconfiguration


13 votes 

When we change the BGP routing policy (changing the attributes or adding lters) we need to reset
the BGP session before the new policy takes e ect. This is no problem in a lab but it’s something
you don’t want to do in a production network. In fact, there are 3 methods how you can refresh
your BGP policies:

Hard reset
Dynamic Soft Reset (route refresh)
Soft reset with pre-stored information

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 pre xes from your
neighbor again. It works, but it’s cruel…

Dynamic soft reset is the most preferred method, it requires the route refresh capability. Simply
said, this feature lets your router request its BGP neighbor to send its pre xes again.

Routers that don’t support the route refresh capability will have to use the soft reset option. That’s
what this tutorial is about. You can read about dynamic soft reset / route refresh in my other
tutorial.
Normally I talk about “pre xes” or “routes” but technically the information that BGP
exchanges in update messages is called NLRI (Network Layer Reachability
Information). The NLRI eld contains the pre xes and length.

The soft reset option uses “pre-stored” information. Basically when we receive pre xes from a BGP
neighbor we will store this information in a new table and we don’t make any changes to it. Our
router will then apply its inbound BGP policy to this table and stores the end result as the BGP
table.

Since you are now storing another table for each neighbor instead of one BGP table you will have
some overhead, your router will require more memory. This is especially true when you enable soft
reset for all your BGP neighbors…keep this in mind before you con gure this.

The tables that I’m talking about have some special names, let me show you a picture and explain
this a bit more:

On the left side we see a table called adj-RIB-in. This is the unedited routing information from a
BGP neighbor. There’s a separate table for each BGP neighbor that you peer with. We apply our
inbound BGP policy to this information and the result is a table called the loc-RIB, this is the actual
BGP table.

BGP will select the best path from the BGP table and the router will install this in the routing table.
Also, the best paths can be advertised to other BGP neighbors. We can apply an outbound BGP
policy to outbound updates and when this is done we have a table called adj-RIB-out (per
neighbor). The adj-RIB-in table is actually stored in memory for each neighbor, the adj-RIB-out table
not.

Now you have an idea about the di erent tables and how soft recon guration works, let’s take a
look at this on some BGP routers.

Configuration
To demonstrate the soft reset we only need two routers. R1 has two loopback interfaces so that we
have a couple of networks to advertise:
First we will con gure BGP between the two routers:

R1(config)#router bgp 1
R1(config-router)#neighbor 192.168.12.2 remote-as 2
R1(config-router)#network 1.1.1.1 mask 255.255.255.255
R1(config-router)#network 11.11.11.11 mask 255.255.255.255

R2(config)#router bgp 2
R2(config-router)#neighbor 192.168.12.1 remote-as 1

Nothing special here, we run EBGP and R1 advertises its two loopback interfaces. By default the 
soft reset option is disabled, let’s con gure it on R2:

R2(config)#router bgp 2
R2(config-router)#neighbor 192.168.12.1 soft-reconfiguration inbound

The soft-recon guration inbound command tells R2 to save the routing information from R1
unmodi ed in the adj-RIB-in table. It will then apply the inbound BGP policy and store the
information in the BGP table.

Let’s take a look at these tables, a good way to do this is by changing some of the BGP attributes. I’ll
change the local preference for the pre xes we receive from R1:

R2(config)#route-map LOCALPREF permit 10


R2(config-route-map)#set local-preference 200

R2(config-route-map)#router bgp 2
R2(config-router)#neighbor 192.168.12.1 route-map LOCALPREF in

This will set the local preference to 200 for all incoming pre xes from R1. Instead of clearing the
TCP session, we’ll do a soft reset:

R2#clear ip bgp 192.168.12.1 soft in


Use the soft in parameter to do a soft reset. Now look at the BGP table rst:

R2#show ip bgp
BGP table version is 3, local router ID is 192.168.12.2
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal,
r RIB-failure, S Stale, m multipath, b backup-path, x best-
external, f RT-Filter
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path


*> 1.1.1.1/32 192.168.12.1 0 200 0 1 i
*> 11.11.11.11/32 192.168.12.1 0 200 0 1 i

The BGP table (loc-RIB) was modi ed as expected, now take a look at the adj-RIB-in table:

R2#show ip bgp neighbors 192.168.12.1 received-routes


BGP table version is 3, local router ID is 192.168.12.2
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal,
r RIB-failure, S Stale, m multipath, b backup-path, x best-
external, f RT-Filter
Origin codes: i - IGP, e - EGP, ? - incomplete 
Network Next Hop Metric LocPrf Weight Path
* 1.1.1.1/32 192.168.12.1 0 0 1 i
* 11.11.11.11/32 192.168.12.1 0 0 1 i

Total number of prefixes 2

Above you see the raw routing information from R1 before we applied the inbound BGP policy. You
can see that no changes were made to the local preference of my pre xes.

Another nice experiment is to lter some of the pre xes:

R2(config)#access-list 1 permit host 1.1.1.1

R2(config)#router bgp 2
R2(config-router)#neighbor 192.168.12.1 distribute-list 1 in

I’ll use a distribute-list so that 11.11.11.11 /32 is not allowed anymore. Before I do another soft
reset I’ll enable a debug, this allows you to see what the router is doing with the BGP updates:
R2#debug ip bgp updates
BGP updates debugging is on for address family: IPv4 Unicast

Let's do the soft reset:

R2#clear ip bgp 192.168.12.1 soft in

Here's what you will see:

R2#
BGP(0): start inbound soft reconfiguration for
BGP(0): process 1.1.1.1/32, next hop 192.168.12.1, metric 0 from
192.168.12.1
BGP(0): process 11.11.11.11/32, next hop 192.168.12.1, metric 0 from
192.168.12.1
BGP(0): Prefix 11.11.11.11/32 rejected by inbound distribute/prefix-list.
BGP(0): update denied
BGP(0): complete inbound soft reconfiguration, ran for 0ms

The router starts the soft recon guration, rejects the 11.11.11.11 /32 pre x and completes the soft
recon guration. Take a look at the BGP table:

R2#show ip bgp
BGP table version is 4, local router ID is 192.168.12.2
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal,
r RIB-failure, S Stale, m multipath, b backup-path, x best-
external, f RT-Filter
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path


*> 1.1.1.1/32 192.168.12.1 0 200 0 1 i

As expected it's gone but you will still nd it in the adj-RIB-in table:

R2#show ip bgp neighbors 192.168.12.1 received-routes


BGP table version is 4, local router ID is 192.168.12.2
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal,
r RIB-failure, S Stale, m multipath, b backup-path, x best-
external, f RT-Filter
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path


* 1.1.1.1/32 192.168.12.1 0 0 1 i
* 11.11.11.11/32 192.168.12.1 0 0 1 i

Total number of prefixes 2

Those are two good examples that show the di erence between the adj-RIB-in and Loc-RIB tables.
Of course we can also view the adj-RIB-out table, I'll show you an example of R1:

R1#show ip bgp neighbors 192.168.12.2 advertised-routes


BGP table version is 5, local router ID is 192.168.12.1
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal,
r RIB-failure, S Stale, m multipath, b backup-path, x best-
external, f RT-Filter
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path


*> 1.1.1.1/32 0.0.0.0 0 32768 i
*> 11.11.11.11/32 0.0.0.0 0 32768 i

Total number of prefixes 2

Use the show ip bgp neighbors advertised-routes command to view the adj-RIB-out table. These
are all the pre xes that you advertise to each BGP neighbor. 

Configurations

Want to take a look for yourself? Here you will nd the con guration of each device.

R1
hostname R1
!
interface Loopback 0
ip address 1.1.1.1 255.255.255.255
!
interface Loopback 1
ip address 11.11.11.11 255.255.255.255
!
interface fastEthernet0/0
ip address 192.168.12.1 255.255.255.0
!
router bgp 1
neighbor 192.168.12.2 remote-as 2
network 1.1.1.1 mask 255.255.255.255
network 11.11.11.11 mask 255.255.255.255
neighbor 192.168.12.1 distribute-list 1 in
!
access-list 1 permit host 1.1.1.1
!
end

R2
hostname R2
!
interface fastEthernet0/0
ip address 192.168.12.2 255.255.255.0
!
router bgp 2
neighbor 192.168.12.1 remote-as 1
neighbor 192.168.12.1 soft-reconfiguration inbound
neighbor 192.168.12.1 route-map LOCALPREF in
!
route-map LOCALPREF permit 10
set local-preference 200
!
end

I hope this lesson has been helpful to understand the soft recon guration feature. Make sure you

also take a look at my route refresh tutorial! If you have any questions, feel free to leave a
comment.

Rate this Lesson:

« Previous Lesson
BGP Remove Private AS Numbers
Next Lesson
BGP Route Refresh Capability »
Home › Forums › BGP Soft Recon guration

This topic contains 11 replies, has 5 voices, and was last updated by   Rene Molenaar 10 months,
2 weeks ago.

Viewing 11 posts - 1 through 11 (of 11 total)


Author
Posts  | Subscribe
May 1, 2015 at 19:49 #11416 Reply

Mauro P
Participant
Hello Rene, will enable soft-recon guration 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?

May 4, 2015 at 10:45 #11417 Reply

Rene Molenaar
Keymaster
Hi Mauro,

Yes but it depends on the number of pre xes 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 pre xes won’t
make the di erence but storing entire internet routing tables will.

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

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

Rene

June 22, 2015 at 12:43 #11418 Reply

Neldien M
Member
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 Recon guration? Thank you.

June 22, 2015 at 14:49 #11419 Reply

Rene Molenaar
Keymaster
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 recon guration then the command will copy pre x from the
adj-RIB-in to the loc-RIB.
Rene

January 16, 2016 at 08:12 #20997 Reply

Davis W
Participant
Hi Rene,

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

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

January 19, 2016 at 13:02 #21123 Reply


Rene Molenaar
Keymaster
Hi Davis,

When you don’t have soft con guration con gured 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 recon g inbound updates


clear ip bgp x.x.x.x out: Soft recon g outbound updates
clear ip bgp x.x.x.x soft: Soft recon g inbound + outbound updates
clear ip bgp x.x.x.x soft in: Soft recon g inbound updates
clear ip bgp x.x.x.x soft out: Soft recon g outbound updates

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

January 20, 2016 at 13:45 #21153 Reply

Davis W
Participant
Hi Rene,

Looks there’s no di erent 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 recon guration 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 recon guration 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

January 22, 2016 at 12:58 #21197 Reply

Rene Molenaar
Keymaster
Hi Davis,

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

Rene

January 23, 2016 at 10:48 #21209 Reply

Davis W
Participant
Ok. Thanks Rene.

Davis

January 25, 2016 at 07:12 #21252 Reply

Paul B
Participant
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.)

January 28, 2016 at 16:58 #21823 Reply

Rene Molenaar
Keymaster
Hi Paul,

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

Rene

Author
Posts

Viewing 11 posts - 1 through 11 (of 11 total)


Reply To: BGP Soft Recon guration
b i link b-quote del img ul ol li code close tags ¶

Please put con gurations in between `backticks` or use the CODE button.
To place inline images, please use a image share service (such as TinyPic or Imgur) and use the IMG
button!

Notify me of follow-up replies via email

Maximum le size allowed is 2048 KB.

Attachments:
Choose File No file chosen

Add another le

Submit

About NetworkLessons.com
Hello There! I'm René Molenaar (CCIE #41726), Your Personal Instructor of
Networklessons.com. I'd like to teach you everything about Cisco, Wireless and
Security. I am here to Help You Master Networking!

Read my story

Social Fans

  
14,351 8,732 1,589
FANS FOLLOWERS SUBSCRIBERS

Highest Rated Lessons

MPLS Layer 3 VPN Con guration


(35 votes)

Cisco Portfast Con guration


(27 votes)

Introduction to DMVPN
(21 votes)

EIGRP Router ID 
(20 votes)

How to con gure OSPF Virtual Link


(19 votes)

New Lessons

Voice VLAN
Introduction to Wireless LAN
Network Topologies
Broadcast Domain
Collision Domain

Disclaimer
Privacy Policy
Support

BGP Soft Recon guration written by Rene Molenaar average rating 4.7/5 - 13 user ratings
© 2013 - 2016 NetworkLessons.com 7656

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy