cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
13809
Views
30
Helpful
20
Replies

OSPF, Multiple default routes

avilt
Level 3
Level 3

I have the OSPF network setup as attached. OSPF is running ony on routers and L3 switch. I would like to inject 2 default routes into the Layer 3 switch.

Both routers C and D gets the default route as expected. But the L3 switch inserts default route as Router C only.

I would like to see 2 default routes on the switch as both the links have same cost. How can I troubleshoot this?

The command "SHOW IP OSPF DATABASE" shows the following output on the L3 switch.

Type-5 AS External Link States

Link ID ADV Router Age Seq# Checksum Tag

0.0.0.0 10.0.0.9 701 0x8000E7D4 0x5D24 65182

0.0.0.0 10.0.0.54 442 0x8000E7EB 0x4EEA 65182

But the show ip route command on the L3 switch shows only one default route.

Thank You

1 Accepted Solution

Accepted Solutions

Avil,

If you remove the network statement then you do not need to configure the interface as passive. Either way should work.

Can you do a show ip ospf border on L3-Switch to see if both ASBRs (Rtr-A and Rtr-B) are considered as equal cost.

Let me know if this solves your problem,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

View solution in original post

20 Replies 20

What you are seeing is the normal behavior. L3 switch prefers the default route via RouterC because it's intra-area route whereas the default route via RouterD is inter-area route. OSPF always prefers the intra-area route over inter-area route even if the cost is more via intra-area route. You can address this problem by making both the RTRC -->RTRA and RTRD-->RTRB connections to be either intra-area or inter-area links.

HTH

Sundar

Thank You very much for the update. Could you please tell me as how to configure this.

You can configure the link between RTRD and RTRB to be part of Area0 and that would make L3 switch see both default routes as intra-area route and if the cost is the same it would use both routes.

HTH

Sundar

That will put all the routers into single area Area0. Is it not possible to have multiple areas and still have multiple default routes?

Thank You

Sure, in that case you need to put the link between RTRA and RTRC in non-area0. This would make both routes show up as inter-area routes from L3 switch perspective.

HTH

Sundar

I have 2 ISP's(Red and Blue) each in separate area's connected to separate router. I cannot put RTRA and RTRC in non-area0. Kindly advise..

Thanks

I am thinking that none of the routers in the diagram is connected directly to the ISP and the ISP connections terminate on another router(s) sitting outside of your firewall, correct?

HTH

Sundar

Avil,

In order for both default routes to be installed in the RIB, the cost to the 2 ASBRs would need to be the same.

Hope this helps,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

I forgot. That is assuming the external metric and the metric type (E1 vs E2) are also the same, whic should be by default.

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Avil,

Sorry for the oversight on my part. Your first post clearly shows the default route is an external route and not intra or inter-area route as I had stated in my previous post.

As Harold stated if the L3 switch learns the default route from RTR-C and RTR-D with the same metric and type (E2) then it should use both default routes. Given the fact L3 switch uses only the route via RTR-C I suspect the metrics mayn't be the same.

Can you post the output 'show ip ospf database external 0.0.0.0'. This would show the metric and whether they are of the same type.

HTH

Sundar

L3SWITCH#show ip ospf database external 0.0.0.0

OSPF Router with ID (172.16.0.254) (Process ID 65182)

Type-5 AS External Link States

Routing Bit Set on this LSA

LS age: 1413

Options: (No TOS-capability, DC)

LS Type: AS External Link

Link State ID: 0.0.0.0 (External Network Number )

Advertising Router: 10.0.0.9

LS Seq Number: 8000E7FE

Checksum: 0x94E

Length: 36

Network Mask: /0

Metric Type: 2 (Larger than any link state path)

TOS: 0

Metric: 1

Forward Address: 10.0.0.1

External Route Tag: 65182

Routing Bit Set on this LSA

LS age: 1300

Options: (No TOS-capability, DC)

LS Type: AS External Link

Link State ID: 0.0.0.0 (External Network Number )

Advertising Router: 10.0.0.54

LS Seq Number: 8000E815

Checksum: 0xF816

Length: 36

Network Mask: /0

Metric Type: 2 (Larger than any link state path)

TOS: 0

Metric: 1

Forward Address: 10.0.0.1

External Route Tag: 65182

Note:

OSPF is running only on Routers A,B,C,D and L3switch. Routers A-C is connected to ISP "RED" area0 and Routers B-D connected to ISP "BLUE" area1. L3SWITCH is in area0. I would like to see 2 default routes on L3SWITCH.

As I stated in a previous posting, the metrics to the two ASBRs have to be equal for both routes to be installed in the RIB, which they probably are not.

You can do a show ip route for 10.0.0.9 and 10.0.0.54 to find out what the metric is to the each ASBR.

Hope this helps,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Actually, it is preferable to do a "show ip ospf border-routers" on the router where you expect the two default routes to be installed in the RIB. This will give you more valuable info.

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

I had overlooked one thing. The external routes both have a "forward address" of 10.0.0.1. When an external route has a "forward address" the internal distance to the external route is calculated via the metric to the "forward address" rather than the metric to the ASBR.

In your case the route to 10.0.0.1 via area 0 is better than the one via area 1 (intra area vs inter area) so the external route from ASBR 10.0.0.54 is therefore preferred.

One way to change that is to get rid of the "forward address" on both external routes. You can get rid of the "forward address by setting the interface towards the FW on RTR-A and RTR-B as passive. You will immediately see the "forward address" change to 0.0.0.0 and the decision will then be based on the distance to the ASBRs (seen in show ip ospf border-routers). Assuming the links from L3 Switch to RTR-A and RTR-b are equal costs, you should get the results you are expecting, meaning the two default routes being installed in the RIB on L3 Switch.

Hope this helps,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: