03-27-2023 10:16 AM - last edited on 04-04-2023 11:48 PM by Translator
Hi, I am working on a design situation where I want to advertise the OSPF default-route towards the same router from where it was learnt but with a higher metric. The use case is if the site looses its site-local internet then it uses the cross site`s
default-route
This is only possible if the WAN router sends the
default-route
back to the local Core SW. I havent lab`d this yet, but does OSPF allow to advertise the DF back on the same interface from where it was learnt using a
route-map
with a higher metric?
Solved! Go to Solution.
03-28-2023 02:17 AM - last edited on 03-28-2023 11:18 PM by Translator
Hi,
in general OSPF does not advertise route, but sends LSAs. So, it is possible to receive and send LSA which matches the sam prefix/prefix-length.
In your case, taking into account that do you mutual redistribution between OSPF <> BGP, here is what normally happen:
Site1-RTR1 and Site2-RTR2 (WAN RTRs) should receive OSPF route which originated from FW and redistribute into BGP (locally originated BGP route). After they advertise this route to each other, but they prefer only its own locally originated (redistributed) route as best, so don't re-redistribute back to OSPF.
When failure happens on Site1 for example, Site1-RTR1 stops receiving default route from FW and stops redistributing it into BGP. In this case, on Site1-RTR1 only one
BGP 0.0.0.0/0 default route
should exists which is iBGP route received from Site2 and installs it into RIB.. If you configured
default-information originate
in OSPF, then Site1-RTR1 begins to redistribute BGP route into OSPF (actually, this is not redistribution, just advertisement of route when you have default route in RIB), so Site1-RTR2 (core) and fw received this OSPF default originated by Site1-RTR1.
03-27-2023 11:18 AM
R1-R2
R1 learn defualt route from other router inject it to R2
Here R2 learn defualt route from R1 and from where else?
03-27-2023 11:51 AM - last edited on 04-04-2023 11:49 PM by Translator
Refer attached sample topology. So in normal scenario this is how the
default-route
propagation happens in Site1 (Just explaining Site1 in here, Site2 will be same):
Site1EdgeFW -> Site1R2 -> Site1R1. Site1R1 and Site2R1
(the WAN rtrs) also exchange the
default-route
over iBGP vpnv4 address family but it is not installed in the routing table since each site prefers its local OSPF learnt
default-route.
Use case is if the
Site1EdgeFW
goes down or its local connectivity to internet goes down, everything in Site1 can dynamically route over Site2`s internet. This will only be possible if Site1R1 sends a default-route back again to Site1R2 with a higher metric using the same layer3 interface. Does OSPF allow this?
03-27-2023 12:20 PM - edited 03-27-2023 12:20 PM
But ibgp have AD=200 and opsf have AD=110/90 so sure ospf is more prefer than ibgp'
Site1 will use defualt route via opsf but in same time it bgp table contain defualt route with r failure because it have better path via opsf
If ospf is loss the route will dynmaic inject into rib from bgp table.
I will be sure by run lab and test failed conditions.
03-28-2023 03:36 AM - edited 03-28-2023 07:45 AM
PART1
as I mention before the router have OSPF 90/110 and iBGP with 200 and but the default route into "r"
and when the OSPF failed it will use default route via iBGP
03-29-2023 02:22 PM - last edited on 04-04-2023 11:39 PM by Translator
Part2
as I mention above I clarify why the default from OSPF prefer than route from iBGP
this Part I check the config,
if you want only default-route to advertise between two sites then no need
redistribute ospf
under bgp.
the neighbor R1/R2 default-information will be enough in this case
test done in this lab
R5-R4 is down network fine
R4-R2 is down network fine
03-28-2023 02:17 AM - last edited on 03-28-2023 11:18 PM by Translator
Hi,
in general OSPF does not advertise route, but sends LSAs. So, it is possible to receive and send LSA which matches the sam prefix/prefix-length.
In your case, taking into account that do you mutual redistribution between OSPF <> BGP, here is what normally happen:
Site1-RTR1 and Site2-RTR2 (WAN RTRs) should receive OSPF route which originated from FW and redistribute into BGP (locally originated BGP route). After they advertise this route to each other, but they prefer only its own locally originated (redistributed) route as best, so don't re-redistribute back to OSPF.
When failure happens on Site1 for example, Site1-RTR1 stops receiving default route from FW and stops redistributing it into BGP. In this case, on Site1-RTR1 only one
BGP 0.0.0.0/0 default route
should exists which is iBGP route received from Site2 and installs it into RIB.. If you configured
default-information originate
in OSPF, then Site1-RTR1 begins to redistribute BGP route into OSPF (actually, this is not redistribution, just advertisement of route when you have default route in RIB), so Site1-RTR2 (core) and fw received this OSPF default originated by Site1-RTR1.
03-28-2023 07:46 AM
PART2 how prevent Loop in mutual redistribute
since you select solution without consider the LOOP of mutual redistribute then I think you know how prevent this LOOP
thanks
MHM
03-28-2023 08:55 AM - last edited on 04-04-2023 11:41 PM by Translator
better to know technology then to write (I dont' say you are, but most VIP guys work only for "points" and do copy-paste, try to override others' answer which is very sad).
In the given topology there is no case for problems which happen in mutual redistribution. Look carefully, OSPF domains are not joined to each other. Between site1 and site2 there is no OSPF. Topology is like
OSPF_Site1 <> BGP <> OSPF_Site2
do you see loop here?)
My answer is quite enough and true.
03-28-2023 10:06 AM - last edited on 04-04-2023 11:43 PM by Translator
Are you run such as this topolgy before?
I dot think so
The LOOP can happened in this case
Without copy paste lol..
He inject defualt router recieve from internet via redistrubte so defualt route will be inject as E2
He then redistrubte the ibgp into opsf and inject as E2
Here if he not care and config
Metric type
Metric
Some prefix filter
The loop happened.
Note:- two way lsa for same prefix' this make ospf endless send receive lsa for same prefix that not correct
03-28-2023 10:51 AM - last edited on 04-04-2023 11:44 PM by Translator
@MHM Cisco World wrote:
Are you run such as this topolgy before?
I dot think so
The LOOP can happened in this case
Without copy paste lol..
He inject defualt router recieve from internet via redistrubte so defualt route will be inject as E2
He then redistrubte the ibgp into opsf and inject as E2
Here if he not care and config
Metric type
Metric
Some prefix filterThe loop happened.
Note:- two way lsa for same prefix' this make ospf endless send receive lsa for same prefix that not correct
Strange comment...Why do you think that I never run such or more advanced network?
Secondly, how Site1-RTR1 can inject iBGP based default route if AD of iBGP is 200 and OSPF external (AD 110) from firewall is preferred?
In normal case, neither Site1-rtr1 nor site2-rtr2 will inject OSPF route (via iBGP redistribution) , because they already have OSPF route within its site.
If you believe loop, explain how it may happen exactly in this case (again, this topology does not have mutual redistribution issues, because OSPF domains are not joined).
03-28-2023 11:56 AM
I am so glad to explain where is loop' check this link.
@SandevChopra07800 I will complete lab and check failure.
Thanks.
MHM
03-28-2023 12:22 PM - last edited on 04-04-2023 11:46 PM by Translator
Totally different case, where well-known
bgp redistribute internal
is used.
If you want to make loop, you can create anytime (even with static route). The purpose is to explain author his case, but not create loop in his topology, lol.
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