08-03-2005 03:28 AM - edited 03-03-2019 10:11 AM
I have an issue where routes known via OSPF are not being put into the routing table.Two routes are known to a remote LAN both have admin distance of 110, the first has a metric of 2048 the second a metric of 6000 but the second is put into the routing table. why ? and how do I get the first route in the table.
Details
Two core routers (1 & 2) and one remote router (3)
Router 1 3661 two relevant interfaces one LAN area 0 and one WAN area 1 subnet A
Router 2, 2851, the problem router.
Two relevant interfaces one LAN area 0 and one WAN area 2 subnet B cost 4000
Router 3, 1721, three relevant interfaces. Two WAN, one in area 1 subnet A and one in area 2 subnet B. One LAN interface (the remote LAN) which is not in a OSPF area. has "redistrubute connected metric 2000 metric-type 1 subnets"
Because of the deal with the ISP all traffic between the core LAN and the remote LAN has to go via subnet A unless it fails then reverts to subnet B. Router 1 & 3 are ok but router 2 insists on sending traffic via Subnet B.
08-03-2005 11:13 PM
Could you please post the following information about the remote LAN subnet:
show ip ospf database external
and
show ip route
Thanks,
M.
08-05-2005 12:46 AM
Thank you for your reply here is the info you requested
Output from Router 1
sh ip ospf database external 24.24.24.24
OSPF Router with ID (1.1.1.1) (Process ID 100)
Type-5 AS External Link States
Routing Bit Set on this LSA
LS age: 217
Options: (No TOS-capability, DC)
LS Type: AS External Link
Link State ID: 24.24.24.24 (External Network Number )
Advertising Router: 24.24.24.24
LS Seq Number: 80001F4D
Checksum: 0xE54B
Length: 36
Network Mask: /32
Metric Type: 1 (Comparable directly to link state metric)
TOS: 0
Metric: 2000
Forward Address: 0.0.0.0
External Route Tag: 0
sh ip route Remote LAN
Routing entry for Remote LAN/17
Known via "ospf 100", distance 110, metric 3562, type extern 1
Last update from subnet A on Serial1/0.124, 03:38:30 ago
Routing Descriptor Blocks:
* subnet A, from 24.24.24.24, 03:38:30 ago, via Serial1/0.124
Route metric is 3562, traffic share count is 1
Output from Router 2
sh ip ospf database external 24.24.24.24
OSPF Router with ID (2.2.2.2) (Process ID 100)
Type-5 AS External Link States
Routing Bit Set on this LSA
LS age: 409
Options: (No TOS-capability, DC)
LS Type: AS External Link
Link State ID: 24.24.24.24 (External Network Number )
Advertising Router: 24.24.24.24
LS Seq Number: 80001F4D
Checksum: 0xE54B
Length: 36
Network Mask: /32
Metric Type: 1 (Comparable directly to link state metric)
TOS: 0
Metric: 2000
Forward Address: 0.0.0.0
External Route Tag: 0
LM#sh ip route Remote LAN
Routing entry for Remote LAN/17
Known via "ospf 100", distance 110, metric 6000, type extern 1
Last update from subnet B on Serial0/3/0.124, 03:39:57 ago
Routing Descriptor Blocks:
* subnet B, from 24.24.24.24, 03:39:57 ago, via Serial0/3/0.124
Route metric is 6000, traffic share count is 1
Output from Router 3
sh ip ospf database external 24.24.24.24
OSPF Router with ID (24.24.24.24) (Process ID 100)
Type-5 AS External Link States
LS age: 533
Options: (No TOS-capability, DC)
LS Type: AS External Link
Link State ID: 24.24.24.24 (External Network Number )
Advertising Router: 24.24.24.24
LS Seq Number: 80001F4D
Checksum: 0xE54B
Length: 36
Network Mask: /32
Metric Type: 1 (Comparable directly to link state metric)
TOS: 0
Metric: 2000
Forward Address: 0.0.0.0
External Route Tag: 0
Fr#sh ip route Remote LAN
Routing entry for Remote LAN/17
Known via "connected", distance 0, metric 0 (connected, via interface)
Redistributing via ospf 100
Advertised by ospf 100 metric 2000 metric-type 1 subnets
Routing Descriptor Blocks:
* directly connected, via FastEthernet0
Route metric is 0, traffic share count is 1
Fr#sh ip route core LAN
Routing entry for core LAN/17
Known via "ospf 100", distance 110, metric 1563, type inter area
Redistributing via ospf 100
Last update from subnet A on Serial0.17, 03:42:22 ago
Routing Descriptor Blocks:
* subnet A , from 1.1.1.1, 03:42:22 ago, via Serial0.17
Route metric is 1563, traffic share count is 1
08-04-2005 04:29 AM
Hi,
I think the problem is that OSPF prefers intra-area routes over inter-area routes. Router B will hence prefer the route learned from area 2 rather than the route learned from area 0. In your setup it should suffice to keep all interfaces in one area, and achieve the primary/backup setup by just using the OSPF costs on the serial interfaces.
hth
08-05-2005 12:54 AM
Thank you for your reply, I have posted some further info in response to marikakis. In response to your suggestion I have confirmed that you are correct router 2 does consider the route to the remote LAN as intra but router 1 does not. I think this is the heart of the problem.
Your second suggestion of making them one area, would'nt each core router treat its route to the remote LAN as intra and the route via the other router as inter (going via area 0) thus defeating the primary/backup requirement ?
08-04-2005 04:41 AM
One frequent reason for the OSPF external routes not being installed in the RIB is if these external routes have a forward address that is not reachable via OSPF.
To see whether the external routes have a forward address, do a show ip ospf database external
R1#sh ip ospf database external 192.168.101.0
OSPF Router with ID (1.1.1.1) (Process ID 1)
Type-5 AS External Link States
LS age: 25
Options: (No TOS-capability, DC)
LS Type: AS External Link
Link State ID: 192.168.101.0 (External Network Number )
Advertising Router: 1.1.1.1
LS Seq Number: 80000002
Checksum: 0x223D
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 20
Forward Address: 192.168.1.3
External Route Tag: 0
R1#
Hope this helps,
08-05-2005 01:24 AM
Thank you for your reply, I have posted some further info in response to marikakis and tcordier. It would appear from that info that there is a forwarding address of 0.0.0.0 in each case. Is this a problem? if so how do I correct it?
With the info my other replies on this topic the fact that the 2851 is treating the redistributed connected route as intra area and therefore puts that route in ahead of the lower cost route via router 1 seems to be the core problem. I was wondering why and how do I correct this.
08-05-2005 03:14 AM
You have edited the output, and that makes it harder for me to understand,
so I am sorry in advance if I didn't understand it correctly.
I think the database output you posted is not for the Remote LAN subnet.
It has a /32 mask (it should have a /17 mask).
It seems to me you posted database output of the external resulting from
redistribution of Router 3's loopback.
Please post the database output for the remote LAN.
I believe you should have 2 external routes in each of Routers 1,2.
BTW: Redistribution will result in OSPF externals (neither intra-area, nor inter-area).
[If forwarding address is set to 0.0.0.0, packets will be sent to the advertising ASBR.
There is a rule (similar to the one mentioned by Thomas) stating that
non-backbone intra-area paths to the ASBR have the highest preference
when the same ASBR is reachable from 2 different areas.
However, this is RFC2328 specific (sections 16.4, 16.4.1),
and I think Cisco has by default RFC1583 Compatibility regarding this situation.]
Could you please also post the following output from Routers 1,2 :
show ip ospf database asbr-summary
show ip ospf border-routers
Thanks,
M.
08-05-2005 05:54 AM
Again thank you for your reply, in answer to your points
As the loopback address has been set that becomes the router id so 24.24.24.24 is the router id I confirmed this with sh ip ospf on the remote router.
/32 is all it says under subnet mask.
Router 2 does know about both routes because if I disable the route between router 2 and router 3 the alternate route via router 1 immediatley takes over.
I have included the outputs you requested below. To save confusion I have removed a lot of the result (many irrelavant interfaces) but I would note under sh ip ospf border-routers on router 2 all were intra-area routes where as on router 1 there was a mixture.
08-05-2005 11:28 AM
First of all, I'm sorry to put you in so much trouble posting output.
Since you say that the backup takes over when it should, I believe the external routes are ok.
So, it seems to me the intra-area path to the ASBR is preferred on each router.
(I guess that if you wanted to use subnet A as backup, then Router 1 would
become the problem router.) Thomas and you have already suggested something
like that in previous posts. I just couldn't find the theory behind it, because I got confused
with the ASBR in two different areas story. I think it's clear now.
In RFC 2328, Section 16.2. Calculating the inter-area routes:
" (5) Next, look up the routing table entry for the destination N. (If N is
an AS boundary router, look up the "router" routing table entry associated
with Area A). If no entry exists for N or if the entry's path type is "type
1 external" or "type 2 external", then install the inter-area path to N (6)
Else, if the paths present in the table are intra-area paths, do nothing
with the LSA (intra-area paths are always preferred)."
The above is also in RFC 1583 Section 16.2 .
BTW: "router" routing table above is an internal OSPF routing table that we viewed with:
"show ip ospf border-routers". In the output you attached, both routers have
chosen to reach the ASBR Router 3 using intra-area routes (noted by i).
I guess when backup via subnet B takes over as you described,
Router 1 will have an I for the ASBR. Also, note in the asbr-summary output you posted
that the ABRs originate into their attached areas only their preferred path to the ASBR (distance vector logic).
In response to your question:"Your second suggestion of making them one area,
would'nt each core router treat its route to the remote LAN as intra and the route via the other router as inter (going via area 0) thusdefeating the primary/backup requirement ?"
I believe yes. Just one comment:
The route to the ASBR is seen as intra or inter (not the external route to the remote LAN).
Perhaps you could add a static route on Router 2:
ip route
with next_hop being Router 1's IP address on subnet A.
It's a hack, and not as good as dynamic routing, but I can't think of anything better right now.
(I guess extending your backbone area up to Router 3 is worse!)
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