cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
12827
Views
9
Helpful
11
Replies

OSPF Default Route not working

sganpat
Level 1
Level 1

I have a problem with distributing my default-route in OSPF. Why is the default route not propogating? See details below.

My network topology is shown in the diagram.

Drawing1.jpg

I have the following config on RTR1

!

interface Loopback0

ip address 10.130.251.50 255.255.255.255

!

interface GigabitEthernet0/0

description connected to LAN

ip address 10.128.35.10 255.255.255.0

!

!

interface FastEthernet0/2/0

description 2nd WAN Link

bandwidth 900

ip address 10.130.249.1 255.255.255.240

!

interface FastEthernet0/2/1

description 1st WAN Link

bandwidth 10000

ip address 10.130.248.65 255.255.255.224

!

!

router ospf 1

log-adjacency-changes

area 100 range 10.128.0.0 255.255.128.0

network 10.128.0.0 0.0.255.255 area 100

network 10.130.248.65 0.0.0.0 area 0

network 10.130.249.1 0.0.0.0 area 0

!

ip route 0.0.0.0 0.0.0.0 10.128.35.1

!

On RTR2 I have

!

interface Loopback0

ip address 10.130.251.26 255.255.255.255

!

interface FastEthernet0/0

description Connected 1st WAN

bandwidth 1000

ip address 10.130.248.66 255.255.255.224

!

interface FastEthernet0/1

description Connected to LAN

ip address 192.168.8.1 255.255.255.0

!

interface FastEthernet0/0/0

description Connected 2nd WAN

bandwidth 900

ip address 10.130.249.10 255.255.255.224

!

router ospf 1

log-adjacency-changes

network 10.130.248.66 0.0.0.0 area 0

network 10.130.249.10 0.0.0.0 area 0

network 10.130.251.26 0.0.0.0 area 0

network 192.168.8.0 0.0.0.255 area 160

!

When I look at the routing table on RTR1 I see (truncated)

RTR1#sh ip route

Gateway of last resort is 10.128.35.1 to network 0.0.0.0

O IA 192.168.8.0/24 [110/11] via 10.130.248.66, 00:08:08, FastEthernet0/2/1

O       10.130.251.26/32

           [110/11] via 10.130.248.66, 00:08:08, FastEthernet0/2/1

S*   0.0.0.0/0 [1/0] via 10.128.35.1

However, when I look at the table on RTR2 I see (truncated)

RTR2#sh ip route

Gateway of last resort is not set

C    192.168.8.0/24 is directly connected, FastEthernet0/1

     10.0.0.0/8 is variably subnetted, 22 subnets, 6 masks

C       10.130.248.64/27 is directly connected, FastEthernet0/0

C       10.130.249.0/27 is directly connected, FastEthernet0/0/0

S       10.128.0.0/17 [1/0] via 10.130.248.65

O IA 192.168.3.0/24 [110/11] via 10.130.248.78, 01:20:05, FastEthernet0/0

The default route is not propogating.

A look at the database shows

RTR2#sh ip ospf data

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

                Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count

10.130.251.26   10.130.251.26   1328        0x80000C96 0x009BD8 3

10.130.251.50   10.130.251.50   1741        0x80002239 0x00623B 3

                Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum

10.130.248.65   10.130.251.50   749         0x800010EB 0x000908

10.130.248.149  10.130.251.50   749         0x80000A32 0x00DB5C

10.130.249.1    10.130.251.50   749         0x80000005 0x00E6CE

                Summary Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum

10.128.0.0      10.130.251.50   1257        0x80000002 0x000C69

192.168.8.0     10.130.251.26   324         0x80000C92 0x005337

                Router Link States (Area 160)

Link ID         ADV Router      Age         Seq#       Checksum Link count

10.130.251.26   10.130.251.26   324         0x80000C92 0x0021BB 1

                Type-5 AS External Link States

Link ID         ADV Router      Age         Seq#       Checksum Tag

0.0.0.0         10.130.251.50   1742        0x80000002 0x000543 1

A look at the 0.0.0.0 Link ID shows

RTR2#sh ip ospf database external 0.0.0.0

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

                Type-5 AS External Link States

  LS age: 1763

  Options: (No TOS-capability, DC)

  LS Type: AS External Link

  Link State ID: 0.0.0.0 (External Network Number )

  Advertising Router: 10.130.251.50

  LS Seq Number: 80000002

  Checksum: 0x543

  Length: 36

  Network Mask: /0

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

        TOS: 0

        Metric: 1

        Forward Address: 10.128.35.1

        External Route Tag: 1

1 Accepted Solution

Accepted Solutions

Hello friends,

Interesting issue indeed. One observation:

On RTR2, the default route is learnt via LSA-5, and the forwarding address is set to 10.128.35.1. However, according to the show ip route output on RTR2, the best matching route for this forwarding address is not an OSPF-learned route but rather a static routing table entry:

RTR2#sh ip route

Gateway of last resort is not set

C    192.168.8.0/24 is directly connected, FastEthernet0/1

     10.0.0.0/8 is variably subnetted, 22 subnets, 6 masks

C       10.130.248.64/27 is directly connected, FastEthernet0/0

C       10.130.249.0/27 is directly connected, FastEthernet0/0/0

S       10.128.0.0/17 [1/0] via 10.130.248.65

O IA 192.168.3.0/24 [110/11] via 10.130.248.78, 01:20:05, FastEthernet0/0

Perhaps Cisco's OSPF implementation verifies whether the forwarding address to an external destination is handled by an OSPF-learned route itself. Would it be possible to remove the static route from the RTR2, let it learn about the appropriate route towards the forwarding address via OSPF from RTR1 and then verify whether the default route is finally installed into the routing table on RTR2?

Offtopic: Kishore, check your private messages here on CSC

Best regards,

Peter

View solution in original post

11 Replies 11

cadet alain
VIP Alumni
VIP Alumni

Hi,

to advertise a default-route in OSPF you must use the default-information originate command i OSPF process:

router ospf 1

default-information originate

On your topology you say area 160 is stub but I don't see any area 160 stub command under router 2 config.

Regards.

Alain.

Don't forget to rate helpful posts.

Oh, yes, you are quite right. Posed the wrong version. Please see the correct configs for the OSPF:

RTR1:

!

router ospf 1

log-adjacency-changes

area 100 range 10.128.0.0 255.255.128.0

network 10.128.0.0 0.0.255.255 area 100

network 10.130.248.64 0.0.0.31 area 0

network 10.130.248.144 0.0.0.7 area 0

network 10.130.249.0 0.0.0.31 area 0

default-information originate always

!

RTR2:

!

router ospf 1

log-adjacency-changes

area 160 stub

area 160 range 10.130.6.0 255.255.254.0

network 10.130.248.64 0.0.0.31 area 0

network 10.130.249.0 0.0.0.31 area 0

network 10.130.251.26 0.0.0.0 area 0

network 192.168.8.0 0.0.0.255 area 160

!

Hi,

This can't work with a stub area as default-information originates creates a type 5 LSA which is not permitted in a stub area.

Regards.

Alain.

Don't forget to rate helpful posts.

What you are saying is correct, and if RTR2 was totally in the stub area that would be true; however, RTR2 is also in the backbone area and should get the default route. Any routers in Area 160 would then have a summary route through RTR2, not the default route.

If you look at the OSPF database it clearly shows that it gets the LSA:

                Type-5 AS External Link States

Link ID         ADV Router      Age         Seq#       Checksum Tag

0.0.0.0         10.130.251.50   1658        0x80000002 0x000543 1

Hi ,

What IOS are you using? As long as the forwarding address is reachable via ospf , it should install that in the routing table.

RTR2#sh ip ospf database external 0.0.0.0

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

                Type-5 AS External Link States

   LS age: 1763

  Options: (No TOS-capability, DC)

  LS Type: AS External Link

  Link State ID: 0.0.0.0 (External Network Number )

  Advertising Router: 10.130.251.50

  LS Seq Number: 80000002

  Checksum: 0x543

  Length: 36

  Network Mask: /0

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

        TOS: 0

        Metric: 1

        Forward Address: 10.128.35.1

        External Route Tag: 1

I have labbed it for you and its workign without any issues.  I have tested this on a 7200 image.

R3#sh ip ospf  database external 0.0.0.0

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

                 Type-5 AS External Link States

   Routing Bit Set on this LSA

  LS age: 90

  Options: (No TOS-capability, DC)

  LS Type: AS External Link

  Link State ID: 0.0.0.0 (External Network Number )

  Advertising Router: 10.130.251.50

  LS Seq Number: 80000001

  Checksum: 0x742

  Length: 36

  Network Mask: /0

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

        TOS: 0

        Metric: 1

        Forward Address: 10.128.35.1

        External Route Tag: 1

R3#sh ip route

Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2

       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

       ia - IS-IS inter area, * - candidate default, U - per-user static route

       o - ODR, P - periodic downloaded static route

Gateway of last resort is 10.130.248.65 to network 0.0.0.0

     10.0.0.0/8 is variably subnetted, 3 subnets, 3 masks

C       10.130.248.64/27 is directly connected, GigabitEthernet1/0

C       10.130.251.26/32 is directly connected, Loopback0

O IA    10.128.0.0/17 [110/2] via 10.130.248.65, 00:00:45, GigabitEthernet1/0

O*E2 0.0.0.0/0 [110/1] via 10.130.248.65, 00:00:45, GigabitEthernet1/0

HTH,

I agree with you. This should be working. I tested this in my lab with 2600 series routers and it works.

RTR1 is:

3800 Software (C3825-ADVIPSERVICESK9-M), Version 12.4(24)T5

RTR2 is:

2800 Software (C2800NM-ADVIPSERVICESK9-M), Version 12.4(24)T5

can you run some debugs and see if that helps? Maybe remove the area range command  on RTR1 and see if that helps. We can just test and see if its a BUG or soemthing

Hello friends,

Interesting issue indeed. One observation:

On RTR2, the default route is learnt via LSA-5, and the forwarding address is set to 10.128.35.1. However, according to the show ip route output on RTR2, the best matching route for this forwarding address is not an OSPF-learned route but rather a static routing table entry:

RTR2#sh ip route

Gateway of last resort is not set

C    192.168.8.0/24 is directly connected, FastEthernet0/1

     10.0.0.0/8 is variably subnetted, 22 subnets, 6 masks

C       10.130.248.64/27 is directly connected, FastEthernet0/0

C       10.130.249.0/27 is directly connected, FastEthernet0/0/0

S       10.128.0.0/17 [1/0] via 10.130.248.65

O IA 192.168.3.0/24 [110/11] via 10.130.248.78, 01:20:05, FastEthernet0/0

Perhaps Cisco's OSPF implementation verifies whether the forwarding address to an external destination is handled by an OSPF-learned route itself. Would it be possible to remove the static route from the RTR2, let it learn about the appropriate route towards the forwarding address via OSPF from RTR1 and then verify whether the default route is finally installed into the routing table on RTR2?

Offtopic: Kishore, check your private messages here on CSC

Best regards,

Peter

Omg Peter, you have an eagle eye . your attention to detail is just amazing. When I labbed it I learned that /17 via ospf and hence it worked. But, you noticed that it was being learned via static in the original post.  5+ stars to you

Regards, Kishore

I will check my CSC inbox right now

Hmmm interesting thought; did not think of that.

Yes, I did add a static route in there to the 10.128.0.0/17 network so that the branch did not lose connectivity to the main site during the testing.

In my lab I configured static routes on the satellite routers and the default route still propogated. I will try it in production and see if makes any difference. I will also remove the area range if the removal of the static does not work.

Let you know how it goes later.

Thanks guys.

Ok, I deleted the default route without adding the backup route and it seems to work. I did not try to add back the backup route to see if the OSPF default route dissappears but so far everything seems to be working fine.

Thanks for all your help and thoughts guys.

Sachin

Review Cisco Networking for a $25 gift card