cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
757
Views
5
Helpful
2
Replies

Doubts on OSPF route announcements

ThomasD86
Level 1
Level 1

ospf1.png

 

Hi,

I  was asked to make sense of this configuration and while I figured out the most I am not quite sure about some points, I hope you can help me understand.
Router C has also two equal cost links with A (.0 and .1) and B (.4 and .5). Router A and B have also a link between them (.2 and .3)


Router C has also a default route declared towards router A described as "OSPF BACKUP ROUTE" but, I am failing to see why is a backup. If the route has a value of 1, I am expecting that all traffic will go through there making it a primary rather than a backup.

However If go on router B and issue a "show ip route" command I will see that the networks router C announces are being learned from the interlink between B and C.

 

If the default route has priority, shouldn't router B learn the networks from C from router A, rather than the direct link it has with it?


Thanks for the help

 

1 Accepted Solution

Accepted Solutions

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello @ThomasD86 ,

a default route is used only when a more specific route for the destination does not exist. It has the lowest priority not the highest.

 

Actually unicast IP routing works using the concept of the longest prefix match = the most speciifc route that includes the destination address is used.

 

so 10.10.20.0/27  is preferred over 10.10.20./24 when sending traffic to 10.10.20.15 just to make an example.

 

In addition to this there are some specific aspects of OSPF implementation on Cisco routers that play a role here.

 

RC ha a default static route pointing to RA IP address but OSPF does not consider this static route when performing redistribution of static routes into OSPF

Note : I see you have a redistribute connected with a route-map and redistribution from another OSPF process with ID 5.

 

RB should not see an OSPF default route in OSPF because RC is missing the command unless it is RA to have it:

router ospf  x

default-information originate

 

Hope to help

Giuseppe

 

 

 

View solution in original post

2 Replies 2

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello @ThomasD86 ,

a default route is used only when a more specific route for the destination does not exist. It has the lowest priority not the highest.

 

Actually unicast IP routing works using the concept of the longest prefix match = the most speciifc route that includes the destination address is used.

 

so 10.10.20.0/27  is preferred over 10.10.20./24 when sending traffic to 10.10.20.15 just to make an example.

 

In addition to this there are some specific aspects of OSPF implementation on Cisco routers that play a role here.

 

RC ha a default static route pointing to RA IP address but OSPF does not consider this static route when performing redistribution of static routes into OSPF

Note : I see you have a redistribute connected with a route-map and redistribution from another OSPF process with ID 5.

 

RB should not see an OSPF default route in OSPF because RC is missing the command unless it is RA to have it:

router ospf  x

default-information originate

 

Hope to help

Giuseppe

 

 

 

Hi Giuseppe,

you're perfectly right, I apparently forgot overnight how a default route works.

The process OSPF 5 configured on the router seems to be a leftover of some ancient configuration. While we do have certain vlan interfaces configured to be under OSPF 5 I understand that configuring "redistribute connected subnets" under OSPF 1 will cause any and every interface to be advertised by the OSPF process under which that command was configured.

In fact it seems that all the networks configured under OSPF5, are still being advertised by OSPF1 because of that command:

 

interface Vlan999
 description ***VLAN_MGMT_WDM_ROADM***
 ip address 10.250.126.1 255.255.255.240
 ip ospf 5 area 0

If I then issue "show ospf 5 database":

       OSPF Router with ID (172.16.90.255) (Process ID 5)

                Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
172.16.90.255   172.16.90.255   397         0x800071B8 0x0070E2 2

Looks like the router is only advertising itself in that process.

 

If do the same for ospf 1:

ISR-01#sh ip ospf 1 database | i 10.250.126.0
10.250.126.0    172.16.0.70     689         0x8000B947 0x00E543 0

The prefix is shown as being advertised by .70 the router ID for OSPF 1. 
Additionally, checking on either router A or B the route has a metric of 20 instead of the 200 it should have if that configuration applied:

ASR-01#sh ip route 10.250.126.0
Routing entry for 10.250.126.0/28
  Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 1000
  Last update from 172.16.90.4 on GigabitEthernet0/9/7, 7w0d ago
  Routing Descriptor Blocks:
  * 172.16.90.4, from 172.16.0.70, 7w0d ago, via GigabitEthernet0/9/7
      Route metric is 20, traffic share count is 1

So my understanding is that the command "redistribute connected subnets" has priority over anything that is configured under the interfaces.


For my second point, I think what you said resolves it, OSPF announcements will ignore any static routing (if present) that is configured  however, traffic will be forwarded only from the link indicated in a static route.