02-13-2014 04:26 AM - edited 03-07-2019 06:11 PM
Hi all,
we are dual homing with another AS and we have BGP routes being redistributed in to OSPF...
am I right in thinking that when looking at the type 5 LSA's for a particular prefix, I should see two of them? One type 5 LSA from each ASBR? How can I confirm that OSPF knows about the backup route for a particular prefix?
thanks
Mario
Solved! Go to Solution.
02-13-2014 06:41 AM
I'm going to take a good guess about what's going on.
I'm willing to bet, since you have a higher LOCAL_PREF value on the routes coming into R1, that this is being sent over to R1 in iBGP UPDATES, and R2 has this route in its BGP table. If you run 'show ip bgp' on R2, I'm sure youll see the paths with a *> with a next hop going to R1.
So when you redistribute BGP into OSPF, it's not going to include the backup path, because it's not the best path in BGP.
BTW Peter, that was my bad, I did a typo
You've made me feel stupid once again. hahaha
02-13-2014 07:19 AM
Mario
If it is because R2 prefers the IBGP route then it will not redistribute into OSPF unless you have configured under your BGP config -
bgp redistribute-internal
which allows the BGP process to redistribute IBGP routes into an IGP (they are not allowed by default).
Note that i am not saying you should go an ahead and do this without fully understanding how it will affect the IP routing table.
Jon
02-13-2014 04:33 AM
Hi,
try
show ip ospf database external A.B.C.D
This link may help too:-
http://www.cisco.com/c/en/us/support/docs/ip/open-shortest-path-first-ospf/25493-type5-lsa.html
Regards,
Alex.
Please rate useful posts.
02-13-2014 06:21 AM
right thats interesting then as I do not see 2 x Type 5 LSA's for a prefix being redistributed in to OSPF...
on an OSPF router in area 0 I only see one type 5 LSA for external E2 routes that are being redistributed from BGP in to OSPF...
I shall investigte the configs further.
thanks
Mario
02-13-2014 06:22 AM
Are you not seeing the other Type 5 LSA when you do 'show ip route ospf', 'show ip ospf database external' and or both?
Also, are they being redistributed into OSPF as E1 or E2 routes?
By default, they are redistributed as E2, so they will have a default cost of 20. When you redistributed as E2 routes, each router will take into consideration the redistributed cost (20 by default), as well as the cost to the ASBR. So it's possible that one route is preferred over the other.
*** Update due to Typo ****
02-13-2014 06:30 AM
Hi John,
By default, they are redistributed as E1, so they will have a default cost of 20. When you redistributed as E2 routes, each router will take into consideration the redistributed cost (20 by default), as well as the cost to the ASBR. So it's possible that one route is preferred over the other.
I am afraid it is the other way around: by default, routes are redistributed into OSPF as E2 routes, using the default metric of 20 and this metric never increases. If only E2 routes are available to a destination, routers will prefer the E2 route that was redistributed with the least metric. If there are multiple such routes, routers will prefer the path via the nearest ASBR (if there are multiple such ASBRs, routers will use all of them).
Redistribution into E1 routes has to be configured explicitly, and while the default redistribution metric is 20 as well, this metric is increased by the cost of the path to the ASBR. Routers will simply choose the path with the least total cost.
What I am thinking about here, though, is that perhaps both ASBRs are redistributing the route with the same metric, metric type and non-zero forward address. Such LSAs, although originated by different router, describe the very same destination and path towards it, and are called functionally equivalent LSAs. There is therefore no need to have multiple instances of the same LSA originated by multiple ASBRs. If this happens, the ASBR with the lower ID will flush its LSA5 from the domain, and only the ASBR with the highest RID will keep its LSA5.
We are perhaps facing a similar issue here.
Best regards,
Peter
02-13-2014 06:44 AM
Hi Peter,
from the routing table for prefix 10.0.0.0/14 we get this...
TH_DC_core_01#show ip route 10.4.0.0
Routing entry for 10.4.0.0/14
Known via "ospf 200", distance 110, metric 100000
Tag 5151, type extern 2, forward metric 105
Redistributing via eigrp 208
Last update from 10.129.1.6 on Vlan98, 01:09:03 ago
Routing Descriptor Blocks:
* 10.129.1.6, from 10.129.0.236, 01:09:03 ago, via Vlan98
Route metric is 100000, traffic share count is 1
Route tag 5151
TH_DC_core_01#
when looking at the OSPF DB, we get this...
Routing Bit Set on this LSA
LS age: 1968
Options: (No TOS-capability, DC)
LS Type: AS External Link
Link State ID: 10.4.0.0 (External Network Number )
Advertising Router: 10.129.0.236
LS Seq Number: 80000079
Checksum: 0xA53
Length: 36
Network Mask: /14
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 100000
Forward Address: 0.0.0.0
External Route Tag: 5151
When i look to see about any type 5 LSA's being advertised by the backup router i see nothing!
TH_DC_core_01#show ip ospf database external adv-router 10.131.0.246
OSPF Router with ID (10.129.0.252) (Process ID 200)
OSPF Router with ID (192.168.223.41) (Process ID 700)
OSPF Router with ID (192.168.0.252) (Process ID 800)
This is telling me that a) either the LSA's are being flushed (as you said) or b) the secondary router is not redistributing for some reason.
Any more advice on this would be very much appreciated.
thanks
Mario
02-13-2014 06:34 AM
OK,
we have two routers running BGP in the same AS with iBGP between them...
both routers also running OSPF in area 0...
primary router uses routemap to set a lower metric than the secondary router...
all routes are E2 routes...
when i look at the routing table i see the best route through the primary router.. which is good.
when looking at the OSPF database for external LSA's I only see type 5 LSA's for the primary route, not the backup...
Now, I have just noticed that in BGP, we use Local preference to ensure that routes learned through the primary routers eBGP neighbor are prefered over the routes learned via the secondary router's eBGP neighbor.
Could this be why I am only seeing one LSA type 5? Is it because the secondary router running BGP knows that itself is NOT the preferred route out so it will NOT redistribute routes in to OSPF unless the route via the primary router becomes unavailable?
Thanks
Mario
02-13-2014 06:41 AM
I'm going to take a good guess about what's going on.
I'm willing to bet, since you have a higher LOCAL_PREF value on the routes coming into R1, that this is being sent over to R1 in iBGP UPDATES, and R2 has this route in its BGP table. If you run 'show ip bgp' on R2, I'm sure youll see the paths with a *> with a next hop going to R1.
So when you redistribute BGP into OSPF, it's not going to include the backup path, because it's not the best path in BGP.
BTW Peter, that was my bad, I did a typo
You've made me feel stupid once again. hahaha
02-13-2014 06:51 AM
Hi John,
i think i agree with you... to add more in to the mix, the prefix 10.4.0.0 is an OSPF summary-address...
Below is a /24 prefix which falls within 10.4.0.0/14 and yes, LOCAL_PREF is 150 pointing to the primary router...
sdc-mgwan02#show ip bgp 10.4.6.0 255.255.255.0
BGP routing table entry for 10.4.6.0/24, version 31551
Paths: (3 available, best #3, table default)
Advertised to update-groups:
7
Refresh Epoch 1
2856 64553
172.17.20.173 from 172.17.20.173 (81.144.126.5)
Origin incomplete, localpref 100, valid, external
Refresh Epoch 1
2856 64553, (received-only)
172.17.20.173 from 172.17.20.173 (81.144.126.5)
Origin incomplete, localpref 100, valid, external
Refresh Epoch 1
2856 64553
172.17.17.241 (metric 1) from 10.129.0.236 (10.129.0.236)
Origin incomplete, metric 0, localpref 150, valid, internal, best
sdc-mgwan02#
So do we think its because the best path is through the primary router then?
thanks
Mario
02-13-2014 07:08 AM
It looks that way. You can see that the route coming from 172.17.17.241 which I'm assuming is R1 ha a LOCAL_PREF of 150.
It looks like you have soft-reconfiguration enabled as well, going to the BGP.
02-13-2014 07:14 AM
As rule of redistribution, only routes that are available in routing table will be redistributed.
If you see two routes in routing table shown as learned through BGP, then they will be redistributed in OSPF. If you see only one route learned through BGP, then only one route will be redistributed in OSPF.
Regards,
Ravindra
02-13-2014 07:19 AM
Mario
If it is because R2 prefers the IBGP route then it will not redistribute into OSPF unless you have configured under your BGP config -
bgp redistribute-internal
which allows the BGP process to redistribute IBGP routes into an IGP (they are not allowed by default).
Note that i am not saying you should go an ahead and do this without fully understanding how it will affect the IP routing table.
Jon
02-13-2014 07:46 AM
Thanks for all your help everyone!
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