cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2360
Views
0
Helpful
2
Replies

OSPF External route selection

Shahzad Qadir
Level 1
Level 1

Hello,

I have got this lab setup where ospf is learning two routes via two different processes. But it is prefering the route with higher metric. can someone please explain why ospf is taking higher cost route.

My ospf database and routing table is as follows:

R2(config-if)#do sr

Gateway of last resort is not set

     3.0.0.0/24 is subnetted, 1 subnets

O E1    3.3.3.0 [110/378] via 10.10.10.1, 00:00:29, Serial0/0

     4.0.0.0/24 is subnetted, 1 subnets

O E1    4.4.4.0 [110/428] via 10.10.10.1, 00:00:29, Serial0/0

     10.0.0.0/30 is subnetted, 2 subnets

C       10.10.10.0 is directly connected, Serial0/0

C       10.10.10.4 is directly connected, Serial0/1

R2(config-if)#do sh ip ospf data ext 4.4.4.0
            OSPF Router with ID (10.10.10.2) (Process ID 2)
                Type-5 AS External Link States
  Routing Bit Set on this LSA
  LS age: 326
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 4.4.4.0 (External Network Number )
  Advertising Router: 10.10.10.5
  LS Seq Number: 80000001
  Checksum: 0xE75A
  Length: 36
  Network Mask: /24
        Metric Type: 1 (Comparable directly to link state metric)
        TOS: 0
        Metric: 250
        Forward Address: 0.0.0.0
        External Route Tag: 200
            OSPF Router with ID (10.10.10.6) (Process ID 1)
         
                Type-5 AS External Link States
  Routing Bit Set on this LSA
  LS age: 483
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 4.4.4.0 (External Network Number )
  Advertising Router: 10.10.10.9
  LS Seq Number: 80000001
  Checksum: 0xB5BA
  Length: 36
  Network Mask: /24
        Metric Type: 1 (Comparable directly to link state metric)
        TOS: 0
        Metric: 300
        Forward Address: 0.0.0.0
        External Route Tag: 100
There are 2 routes in database but router is selecting route with higher metric.
Thanks
Shahzad

1 Accepted Solution

Accepted Solutions

lgijssel
Level 9
Level 9

The OSPF route selection rule is that intra-area routes are preferred over inter-area routes, which are preferred over external routes. However, this rule should apply to routes learned via the same process. In other words, there is no preference between external routes from one process compared to internal routes of other process.

The preference rule between a given OSPF process and any other process (be it OSPF or another routing protocol) should follow the administrative distance rule. However, because different OSPF processes will have the same administrative distance by default, OSPF distance should be configured explicitly for different OSPF processes, to achieve the desired behavior.

http://www.cisco.com/en/US/tech/tk365/technologies_white_paper09186a0080531fd2.shtml#routepref

regards,

Leo

View solution in original post

2 Replies 2

lgijssel
Level 9
Level 9

The OSPF route selection rule is that intra-area routes are preferred over inter-area routes, which are preferred over external routes. However, this rule should apply to routes learned via the same process. In other words, there is no preference between external routes from one process compared to internal routes of other process.

The preference rule between a given OSPF process and any other process (be it OSPF or another routing protocol) should follow the administrative distance rule. However, because different OSPF processes will have the same administrative distance by default, OSPF distance should be configured explicitly for different OSPF processes, to achieve the desired behavior.

http://www.cisco.com/en/US/tech/tk365/technologies_white_paper09186a0080531fd2.shtml#routepref

regards,

Leo

Thanks. Good explaination, it solve the mystry for me.

Review Cisco Networking for a $25 gift card