Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

external default routes in ospf database..

Untitled picture.png

R1 & R2 are injecting default routes, configs as follows:

R1#sh run |  b r o
router ospf 1
log-adjacency-changes
network 1.1.1.2 0.0.0.0 area 1
network 2.2.2.1 0.0.0.0 area 1
default-information originate
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 Null0

R2#sh run | b r o
router ospf 1
log-adjacency-changes
network 2.2.2.2 0.0.0.0 area 1
default-information originate
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 Null0

For example:

R0#sh ip ospf database external 0.0.0.0

            OSPF Router with ID (1.1.1.1) (Process ID 1)

                Type-5 AS External Link States

  Routing Bit Set on this LSA
  LS age: 2
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 0.0.0.0 (External Network Number )
  Advertising Router: 2.2.2.1
  LS Seq Number: 80000001
  Checksum: 0x5A6
  Length: 36
  Network Mask: /0
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 1
        Forward Address: 0.0.0.0
        External Route Tag: 1

  LS age: 214
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 0.0.0.0 (External Network Number )
  Advertising Router: 2.2.2.2
  LS Seq Number: 80000001
  Checksum: 0xFEAB
  Length: 36
  Network Mask: /0
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 1
        Forward Address: 0.0.0.0
        External Route Tag: 1

R0/R1/R2 have two default routes in ospf database ..... (all good)

----------------------------------

when AD of default-static route on R1 is changed to 120, higher than OSPF ... there is just one default routes in ospf database of R0/R1/R2

example :

R0#sh ip ospf database external 0.0.0.0

            OSPF Router with ID (1.1.1.1) (Process ID 1)

                Type-5 AS External Link States

  Routing Bit Set on this LSA
  LS age: 565
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 0.0.0.0 (External Network Number )
  Advertising Router: 2.2.2.2
  LS Seq Number: 80000001
  Checksum: 0xFEAB
  Length: 36
  Network Mask: /0
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 1
        Forward Address: 0.0.0.0
        External Route Tag: 1

and when the AD of default route on R1 is made lower than that of OSPF, R0/R1/R2 again have two default routes...

than whats going on when AD of static default route on R1 is made higher than 110...why is that LSA not in databases....

2 REPLIES
Cisco Employee

Re: external default routes in ospf database..

To answer your question why the second default route is not in the database, it is not advertised first of all.

default-information originate in OSPF injects a default route into the OSPF domain when the routing table already has a default route. To put it in simpler words, it injects the default route from the routing table into the OSPF domain.

Scenario 1:

Both R1 and R2 have 'ip route 0.0.0.0 0.0.0.0 Null0' or with any AD less than 110.

R2 will inject a default route into the OSPF domain with an AD of 110.

R1 will receive this route and add it to its database. But while updating the information in the routing table, it will add its static route (due to lower AD).

So R1 will inject this default route into the OSPF domain again with an AD of 110.

So all the databases in the area will have 2 default routes in the table.

Scenario 2:

Either R1 or R2, R1 in your case, changes its default route to 'ip route 0.0.0.0 0.0.0.0 Null0 120' or with any AD higher than 110.

R2 will inject a default route into the OSPF domain with an AD of 110.

Again, R1 will receive this route and add it to its database.

While updating the information in the routing table, it will choose this route learnt from R2 over the local static route (due to higher AD).

Since the same route learnt from R2 is in the routing table and the LSA database, R1 will never inject its own static route into OSPF.

So it just passes the same information that it received from R2 to R0 without updating the external database.

Thanks,

Shankar

Re: external default routes in ospf database..

just read this on cisco.com...this explains the phenomena

The easiest conditional default route origination is configured with the default-information originate router configuration command without the always option, which will advertise an external default route into the OSPF domain only if the advertising router has a non-OSPF default route in its routing table.

thankss...

689
Views
0
Helpful
2
Replies