04-01-2023 03:39 AM - last edited on 04-04-2023 11:25 PM by Translator
Hello,
I configured BGP between directly connected routers, as below:
R1 --eBGP-- R2 --iBGP-- R3 --eBGP --R4 --eBGP-- R1
(also image attached).
Maybe it's a silly question, but it is unclear for me why R4's loopback (14.0.x.0/24) is received via eBGP by R2, but not advertised to the iBGP neighbor R3. I was expecting to receive R4's loopback (14.0.x.0/24) on R3 twice, but in the BGP table is just received via R4.
R3#sh ip bgp
-----------------
*> 14.0.0.0/24 3.3.3.2 0 0 700 i
Network Next Hop Metric LocPrf Weight Path
*> 14.0.1.0/24 3.3.3.2 0 0 700 i
*> 14.0.2.0/24 3.3.3.2 0 0 700 i
*> 14.0.3.0/24 3.3.3.2 0 0 700 i
-----------------
R2#sh ip bgp neighbors 2.2.2.2 advertised-routes | include 14.
R2#
R2#
Solved! Go to Solution.
04-01-2023 05:32 AM - edited 04-01-2023 05:43 AM
OK
what path BGP advertise ? best path correct
now image what best path R2 will advertise to R3. the R2 have best path via R3 so it no sense to -advertise it again to R3.
as I mention this is normal in iBGP with multi homed.
04-01-2023 03:48 AM
Can you share the topolgy
04-01-2023 03:56 AM
04-01-2023 04:18 AM - last edited on 04-04-2023 11:26 PM by Translator
are you config
next-hop self
in R2 ?
04-01-2023 04:28 AM - last edited on 04-04-2023 11:27 PM by Translator
Yes, it is configured. Also, when I tear down the peering between R4 & R3, R2 starts advertising 14.0.x.0/24 networks to his iBGP neigh R3 with next hop being R1.
R2#sh ip bgp neighbors 2.2.2.2 advertised-routes
Network Next Hop Metric LocPrf Weight Path
*> 1.0.0.0 0.0.0.0 0 32768 i
*> 2.0.0.0 0.0.0.0 0 32768 i
*> 4.0.0.0 1.1.1.1 0 0 500 i
*> 10.0.0.0 1.1.1.1 0 0 500 i
*> 12.0.0.0/24 0.0.0.0 0 32768 i
*> 12.0.1.0/24 0.0.0.0 0 32768 i
*> 12.0.2.0/24 0.0.0.0 0 32768 i
*> 12.0.3.0/24 0.0.0.0 0 32768 i
*> 14.0.0.0/24 1.1.1.1 0 500 700 i
*> 14.0.1.0/24 1.1.1.1 0 500 700 i
*> 14.0.2.0/24 1.1.1.1 0 500 700 i
*> 14.0.3.0/24 1.1.1.1 0 500 700 i
*> 20.0.0.0 0.0.0.0 0 32768 i
*> 40.0.0.0 1.1.1.1 0 500 700 i
04-01-2023 04:32 AM - edited 04-01-2023 04:47 AM
OK,
remove all direct connect subnet from BGP config
i.e. for R2
remove net 1.0.0.0 and net 2.0.0.0
this can lead to routing loop where the prefix to connect to neighbor is learn via BGP itself, it must be direct connect or learn via IGP.
04-01-2023 04:59 AM
I removed on all routers the direct conn advertisements, then performed a soft reset but the routes are still not advertised by R2
04-01-2023 05:07 AM - edited 04-01-2023 05:16 AM
in R2 we see two path so your config is correct 100%
R2 advertise the R4LO to R3
R3 advertise the R4LO to R2
this two path path in two router must in one of then one path win (to block loop)
R2 advertise the R4LO to R3 with path 500-700
R3 advertise the R4LO to R2 with path 700
so R3 will not use path via R2 but use it direct connect path
and R2 will have two path one via direct and other via R3
this normal happened in iBGP peers
04-01-2023 05:26 AM - last edited on 04-04-2023 11:29 PM by Translator
Thank you!
R2(2.2.2.1) do not advertise R4LO to R3(2.2.2.2), but R3 indeed advertises R4LO to R2. I understand why R3 will not use the path via R2 but use it direct connect path, as this one will appear in the routing table. But why isn't 14.0.x.0/24 advertised by R2 to R3 and present in R3's ip bgp table as valid, but not preferred?
R2#sh ip bgp neighbors 2.2.2.2 advertised-routes | inc 14.
R2#
R2#sh ip bgp neighbors 2.2.2.2 advertised-routes
BGP table version is 225, local router ID is 20.1.1.1
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0 1.1.1.1 0 0 500 i
*> 12.0.0.0/24 0.0.0.0 0 32768 i
*> 12.0.1.0/24 0.0.0.0 0 32768 i
*> 12.0.2.0/24 0.0.0.0 0 32768 i
*> 12.0.3.0/24 0.0.0.0 0 32768 i
*> 20.0.0.0 0.0.0.0 0 32768 i
R3#sh ip bgp neighbors 2.2.2.1 advertised-routes | inc 14.
*> 14.0.0.0/24 3.3.3.2 0 0 700 i
*> 14.0.1.0/24 3.3.3.2 0 0 700 i
*> 14.0.2.0/24 3.3.3.2 0 0 700 i
*> 14.0.3.0/24 3.3.3.2 0 0 700 i
R3#
04-01-2023 05:32 AM - edited 04-01-2023 05:43 AM
OK
what path BGP advertise ? best path correct
now image what best path R2 will advertise to R3. the R2 have best path via R3 so it no sense to -advertise it again to R3.
as I mention this is normal in iBGP with multi homed.
04-01-2023 05:43 AM
Of course, yes. Thanks a lot!
04-01-2023 05:11 AM
add LO to R1 (500) and see the same effect but this time in R3 not in R2
04-01-2023 05:31 AM
Yes, it is the same effect.
04-01-2023 03:56 AM
I'm sorry, I attached the topology now.
04-02-2023 12:45 PM - edited 04-02-2023 12:47 PM
Hello
@rabbit2 wrote:
but it is unclear for me why R4's loopback (14.0.x.0/24) is received via eBGP by R2, but not advertised to the iBGP neighbor R3. I was expecting to receive R4's loopback (14.0.x.0/24) on R3 twice, but in the BGP table is just received via R4.
Its down to BGP path path selection (prefer the external (EBGP) path over the internal (IBGP) path) so R3 selects the Prefix from R4
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