cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
584
Views
1
Helpful
6
Replies

Any way to apply new BGP admin distance with only soft reconfig (XR)?

hostasaurus
Level 1
Level 1

Hi all, IOS-XR 7.5.2 on NCS5501.  Was curious if anyone knows a command to allow a new administrative distance to apply without a hard BGP session reset?  I'm trying to prioritize OSPF on internet-facing edge routers that have numerous eBGP peering sessions, so I've added the appropriate command at:

router bgp XXX  address-family ipv4 unicast
    distance bgp 111 200 200

to raise eBGP from 20 to 111, leave the others at their defaults.  However, after a typical "clear bgp ipv4 uni 192.0.2.1 soft in" it does not appear any of the learned routes, or re-learned routes, are receiving the new distance.  I did hard clear a session with a peer that isn't consequential and see the new distances there, but clearing the other sessions would involve outages I'd like to avoid.

Thanks

1 Accepted Solution

Accepted Solutions

I was able to lab it although not on XR I would imagine the outcome is similar. 

The command you applied is a global command. It looks like you cant "apply" that command on a one by one basis (as in resetting neighbors individually for it to take affect) and also since the command isn't neighbor specific the Soft reconfiguration command where the router requests a route refresh from the neighbor generally only applies to policies inflicted on that neighbor specifically such as a route-map or other attribute configuration. After applying the BGP distance command with a debug it just did a route-refresh and saw nothing it needed to update since the route is already installed in the RIB and nothing had changed coming from the neighbor. When I added a weight command to the neighbor (effectively changing the inbound policy now), it did in fact also update the RIB as it had new parameters to apply from the neighbor. This also updated the Distance to the correct value I configured. 

So you COULD apply a generic weight command to the neighbor before doing the soft in configuration and then once its updated remove it. Seems tedious but could work

 

-David

View solution in original post

6 Replies 6

Hello,

Can you check if it allows the capability you're trying to use? I believe the route refresh capability needs too be exchanged in order for the "soft in/out command will work, see below:

R1#sh ip bgp neigh
BGP neighbor is 2.2.2.2, remote AS 100, internal link
BGP version 4, remote router ID 2.2.2.2
BGP state = Established, up for 1d23h
Last read 00:00:29, last write 00:00:51, hold time is 180, keepalive interval is 60 seconds
Neighbor sessions:
1 active, is not multisession capable (disabled)
Neighbor capabilities:
Route refresh: advertised and received(new)
Four-octets ASN Capability: advertised and received
Address family IPv4 Unicast: advertised and received
Enhanced Refresh Capability: advertised and received
Multisession Capability:
Stateful switchover support enabled: NO for session 1
Message statistics:
InQ depth is 0
OutQ depth is 0

Sent Rcvd
Opens: 1 1
Notifications: 0 0
Updates: 1 3

 

You could also try going to the remote neighbor and doing a "Soft out" command to see if it pushes it.  Run a debug of BGP packet to see if its being refreshed.

-David

hostasaurus
Level 1
Level 1

Yep looks good there:


Neighbor capabilities:
Route refresh: advertised (old + new) and received (old + new)
Graceful Restart (GR Awareness): received
4-byte AS: advertised and received
Address family IPv4 Unicast: advertised and received

I was able to lab it although not on XR I would imagine the outcome is similar. 

The command you applied is a global command. It looks like you cant "apply" that command on a one by one basis (as in resetting neighbors individually for it to take affect) and also since the command isn't neighbor specific the Soft reconfiguration command where the router requests a route refresh from the neighbor generally only applies to policies inflicted on that neighbor specifically such as a route-map or other attribute configuration. After applying the BGP distance command with a debug it just did a route-refresh and saw nothing it needed to update since the route is already installed in the RIB and nothing had changed coming from the neighbor. When I added a weight command to the neighbor (effectively changing the inbound policy now), it did in fact also update the RIB as it had new parameters to apply from the neighbor. This also updated the Distance to the correct value I configured. 

So you COULD apply a generic weight command to the neighbor before doing the soft in configuration and then once its updated remove it. Seems tedious but could work

 

-David

Thanks David, I tried that with one peer and it worked for me as well.  It will take some labor time to tinker with each peer and soft reset, but now I can avoid the interruption since this device is at an IXP with ~20 sessions, where backup would be across the internet with much higher latency / lower throughput.

hostasaurus
Level 1
Level 1

Huh?  That is the entire purpose of this thread.  I outlined that soft reconfig is not applying admin distance changes, and is there a workaround.  David reproduced and determined that a weight change on a per-peer basis causes a RIB replacement, allowing the distance change to take effect.

I am still alive LOL..
sorry confuse with something else 
anyway 
I see route-refresh advertise and receive
so it enable between two Peer 
no need anything accept add route-map for each neighbor and make route-map match ip prefix list 0.0.0.0/0.
this make router automatic send request to peer ask to resend all prefix.

MHM 

Review Cisco Networking for a $25 gift card