cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3295
Views
10
Helpful
18
Replies

Update BGP routing table after advertised new subnet?

tinhnho123
Level 2
Level 2

Hi Guys,

After I add a subnet 192.168.20.0/24 into BGP, should I use

clear ip bgp *

or

clear ip bgp * soft

to update the bgp route to the neighbors?

 

router bgp xxxx
  bgp log-neighbor-changes
  neighbor 10.0.0.1 remote-as 123
  neighbor 10.0.0.1 version 4
!
address-family ipv4
   network 192.168.20.0 mask 255.255.255.0
   network 172.16.0.0 mask 255.255.255.0
exit-address-family

 

Thanks.

 

 

2 Accepted Solutions

Accepted Solutions

the bgp is slow so you need to force bgp to advertise the new network 
do 


clear ip bgp 123 


and check the neighbor 

I run small lab show you that how bgp is slow, I add network but still neighbor is not receive it 
immeidate after clear the neighbor get the network. 

 

Screenshot (319).pngScreenshot (320).pngScreenshot (321).png

View solution in original post

@MHM Cisco World ,

It does not matter since the second route is a /16. What we want the original poster to investigate is why there is no 192.168.20.0/24 in the local RIB. Until that happens, the network statement is useless and the route will not be advertised to the peer in AS123 (10.0.0.1).

Regards,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

View solution in original post

18 Replies 18

I use usually 

clear ip bgp <123>  <<- I use 123 as your sharing config

 

this force bgp to re-establish and exchange the new BGP session and advertise new update. 

Harold Ritter
Spotlight
Spotlight

Hi @tinhnho123 ,

You should not have to. Just make sure that the subnet 192.168.20.0/24 is present in the RIB. This is a requirement for BGP to originate the route when you configure a network statement.

Regards,

 

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

Sorry for the newbie question; how do I ensure it is present in RIB?

Thanks.

Hi @tinhnho123 ,

show ip route 192.168.20.0

Regards,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

tinhnho123
Level 2
Level 2

I did a quick

show ip route

from the local router and it looks like the subnet 192.168.20.0/24 is advertised from my neighbor, i checked the neighbor's router, it doesn't advertise subnet 192.168.20.0/24.

R1#sh ip route 192.168.20.0/24
Routing entry for 192.168.20.0/24
Known via "bgp xxx", distance 20, metric 0
Tag 123, type external
Last update from 10.0.0.1 1w1d ago
Routing Descriptor Blocks:
* 10.0.0.1, from 10.0.0.1, 1w1d ago
opaque_ptr 0xxxxxxxxx
Route metric is 0, traffic share count is 1
AS Hops 1
Route tag 123
MPLS label: none

I want my local router to advertise this subnet 192.168.20.0/24, shall I run 'clear ip bgp 123' on my local router?

the bgp is slow so you need to force bgp to advertise the new network 
do 


clear ip bgp 123 


and check the neighbor 

I run small lab show you that how bgp is slow, I add network but still neighbor is not receive it 
immeidate after clear the neighbor get the network. 

 

Screenshot (319).pngScreenshot (320).pngScreenshot (321).png

Thanks!

Hi @tinhnho123 ,

Looking at the

show ip route

its appears this route is being learnt from neighbor 10.0.0.1 (as123) already. So why would you want to advertise to that same neighbor?

Regards, 

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

I just checked, the neighbor doesn't advertise that subnet.  My coworker probably advertised the subnet 192.168.20.0/24 from the neighbor to my local router and then removed it from the neighbor's router. 

I want to advertise this subnet 192.168.20.0/24 from my local router to the neighbor.

Can you post the

show ip route 192.168.20.0

output again?

Regards,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

R1#sh ip route 192.168.20.0
Routing entry for 192.168.0.0/16
Known via "bgp xxx", distance 20, metric 0
Tag 123, type external
Last update from 10.0.0.1 1w1d ago
Routing Descriptor Blocks:
* 10.0.0.1, from 10.0.0.1, 1w1d ago
opaque_ptr 0xxxxxxx
Route metric is 0, traffic share count is 1
AS Hops 1
Route tag 123
MPLS label: none
R1#

Hi @tinhnho123 ,

192.168.20.0/24 is resolvable via 192.16.0.0. The reason you are not advertising the subnet 192.168.20.0/24 to the neighbor is that you do not have the /24 present in the local RIB. For the BGP network statement to work, you need a matching route in the RIB. Do you have that subnet defined locally? If not how are you supposed to forward traffic to that subnet?

Regards,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

@Harold Ritter @tinhnho123 
why I see two route one with /24 and other with /16 are you using redistribute ?


R1#sh ip route 192.168.20.0/24
Routing entry for 192.168.20.0/24

R1#sh ip route 192.168.20.0
Routing entry for 192.168.0.0/16

Hi @MHM Cisco World ,

The /24 was seen when his colleague advertised from the peer. After his colleague removed it from the remote peer, they are left with the /16 in the local RIB. This is the reason his BGP network statement does not work.

Regards,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)