12-22-2022
02:07 PM
- last edited on
12-25-2022
09:42 PM
by
Translator
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.
Solved! Go to Solution.
12-22-2022
03:49 PM
- last edited on
12-25-2022
09:48 PM
by
Translator
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.
12-22-2022 04:31 PM - edited 12-22-2022 05:08 PM
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,
12-22-2022
02:25 PM
- last edited on
12-25-2022
09:45 PM
by
Translator
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.
12-22-2022 02:42 PM
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,
12-22-2022 03:29 PM
Sorry for the newbie question; how do I ensure it is present in RIB?
Thanks.
12-22-2022
03:43 PM
- last edited on
12-25-2022
09:46 PM
by
Translator
12-22-2022
03:44 PM
- last edited on
12-25-2022
09:47 PM
by
Translator
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?
12-22-2022
03:49 PM
- last edited on
12-25-2022
09:48 PM
by
Translator
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.
12-22-2022 04:05 PM
Thanks!
12-22-2022
03:58 PM
- last edited on
12-25-2022
09:49 PM
by
Translator
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,
12-22-2022 04:04 PM
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.
12-22-2022
04:08 PM
- last edited on
12-25-2022
09:50 PM
by
Translator
Can you post the
show ip route 192.168.20.0
output again?
Regards,
12-22-2022
04:13 PM
- last edited on
12-25-2022
09:51 PM
by
Translator
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#
12-22-2022 04:17 PM - edited 12-22-2022 04:19 PM
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,
12-22-2022
04:19 PM
- last edited on
12-25-2022
09:51 PM
by
Translator
@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
12-22-2022 04:23 PM - edited 12-22-2022 04:24 PM
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,
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide