cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3849
Views
14
Helpful
4
Replies

Do i need to clear ip bgp neighbor out?

MichalKarika007
Level 1
Level 1

I have 2 sites A and B connected via bgp, we need to add a default route on site A and make sure the default route only propagate within site A and doesn't appear in site B bgp routing table. If I create a route map matching a default route only and apply in outbound direction towards the border router with site B first and then redistribute a default route do i stillneed to clear ip bgp out?  There is no route-map currently set up. 

4 Replies 4

Hello,

chances are that your routers support BGP dynamic route refresh. Do a 'show ip bgp neighboor x.x.x.x and check for the line in bold:

R1#sh ip bgp neighbors 192.168.1.2
BGP neighbor is 192.168.1.2, remote AS 1, internal link
BGP version 4, remote router ID 2.2.2.2
BGP state = Established, up for 00:05:07
Last read 00:00:12, last write 00:00:28, 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

If you see that line, all you need to do is issue a"

clear ip bgp x.x.x.x soft out

without the need to preconfigure the neighbor with:

neighbor x.x.x.x soft-reconfiguration outbound.

If dynamic refresh is not supported, you will need to preconfigure the neighbor with the 'soft-reconfiguration outbound' command.

That said, using a hard reset with 'clear ip bgp x.x.x.x out should actually never have to be used.

Hiya

thanks

i do understand how to clear/ refresh bgp session but I am more interested in finding out whether its still necessary  to issue "clear ip bgp x.x.x.x out"  even if you do a config in this order:

1. Create a route-map, match the default route only

2. Apply in outbound direction towards the border router 

3. Now configure the default route, redistribute into bgp

Basically,  before  the default route was redistributed into BGP, the filter/route-map was already applied outbound direction towards the bgp neighbor at site B, so is it still necessary to issue "clear ip bgp out " ? Wouldn't the default route update triggered after the default route was manually redistributed be automatically filtered as the filter/route-map was already active? 

Hi Michal,

No, it's not necessary to "clear" in/out BGP neighbor in your case.

As Paul wrote, bgp scanner will pick up your change in next run.

Actually you don't have to "clear" BGP neighbor in any case if you are willing to wait for bgp scanner to do the same tasks. "clear" BGP will just speed up the process.

Best Regards Please rate all helpful posts and close solved questions

Hello

After bgp scanner imitates which is every 60 seconds by default it should pick your changes anyway however it good that be a bit more deterministic of when it should propergate the rib hence you can manually force a refresh

Ip prefix-list Stan permit 0.0.0 0/0

route-map Fred 

match ip addrress prefix-list Stan 

set community no-advertise 

router bgp xx

neighbour x.x route-map Fred

clesr ip bgp * soft in

clesr ip bgp * soft out

res

paul


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card