cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1727
Views
0
Helpful
6
Replies

OSPF external route

vishwancc
Level 3
Level 3

Hi all:

If ospf is getting external routes from 2 neighbor which route it will perfer and why?

eg.on router R2:

In routing table

O E2    10.10.10.0 [110/20] via 172.16.10.8, 00:21:54, FastEthernet0/0

In ospf Database

                Type-5 AS External Link States

Link ID         ADV Router      Age         Seq#       Checksum Tag
10.10.10.0      20.20.20.20     1771        0x80000001 0x00BEAE 0
10.10.10.0      172.16.10.8     1344        0x80000001 0x00753E 0

R2#show ip ospf database external 10.10.10.0

            OSPF Router with ID (2.2.2.2) (Process ID 10)

                Type-5 AS External Link States

  LS age: 1869
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 10.10.10.0 (External Network Number )
  Advertising Router: 20.20.20.20
  LS Seq Number: 80000001
  Checksum: 0xBEAE
  Length: 36
  Network Mask: /24
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 20
        Forward Address: 172.16.2.6
        External Route Tag: 0

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

Why it is choosing only one route even the metric and other value are same.

Chao

Vishwa

1 Accepted Solution

Accepted Solutions

rajatsetia
Level 1
Level 1

Refer to http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080124c7d.shtml

text from document

"When the metric of the redistributed route from multiple ASBRs are equal as illustrated in the document, the forwarding address changes the behavior of the type 5 LSA path selection. When a router receives two type 5 LSAs to the same destination with the forwarding addresses set on both LSAs, the router makes a comparison based on the metric to the forwarding addresses. The LSA with a forwarding address that offers the smaller metric is placed into the routing table."

LSA with 0.0.0.0 forward address, forwarding address is the router who has generated this LSA.

So now the tie breaker is  , metric to reach 172.16.2.6 and metric to reach 172.16.10.8 (advertising router for LSA with no forwarding address)

http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080124c7d.shtml

Hope this helps

Kind Regards

View solution in original post

6 Replies 6

rajatsetia
Level 1
Level 1

Refer to http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080124c7d.shtml

text from document

"When the metric of the redistributed route from multiple ASBRs are equal as illustrated in the document, the forwarding address changes the behavior of the type 5 LSA path selection. When a router receives two type 5 LSAs to the same destination with the forwarding addresses set on both LSAs, the router makes a comparison based on the metric to the forwarding addresses. The LSA with a forwarding address that offers the smaller metric is placed into the routing table."

LSA with 0.0.0.0 forward address, forwarding address is the router who has generated this LSA.

So now the tie breaker is  , metric to reach 172.16.2.6 and metric to reach 172.16.10.8 (advertising router for LSA with no forwarding address)

http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080124c7d.shtml

Hope this helps

Kind Regards

I see....thanks for the reply

Chao

Vishwa

consider a scenario in which a router OSPF LSDB has a type 5 and a type 7 LSA for the same route; does the router use the logic described also in this case ?

Thanks

Hello Carlo,

Per RFC 3101, Section 2.5, Step 6:

          Preference is defined as follows:

          (a) Intra-area and inter-area paths are always preferred over
              AS external paths.
              [OSPF]

          (b) Type 1 external paths are always preferred over type 2
              external paths.  When all paths are type 2 external paths,
              the paths with the smallest advertised type 2 metric are
              always preferred.
              [OSPF]

          (c) If the new AS external path is still indistinguishable
              from the current paths in N's routing table entry, and
              RFC1583Compatibility is set to "disabled", select the
              preferred paths based on the intra-AS paths to the
              ASBR/forwarding addresses, as specified in Section 16.4.1.
              Here intra-NSSA paths are equivalent to the intra-area
              paths of non-backbone regular OSPF areas.
              [NSSA]

          (d) If the new AS external path is still indistinguishable
              from the current paths in N's routing table entry, select
              the preferred path based on a least cost comparison.  Type
              1 external paths are compared by looking at the sum of the
              distance to the ASBR/forwarding addresses and the
              advertised type 1 metric (X+Y).  Type 2 external paths
              advertising equal type 2 metrics are compared by looking
              at the distance to the ASBR/forwarding addresses.
              ~[OSPF]

          (e) If the current LSA is functionally the same as an
              installed LSA (i.e., same destination, cost and non-zero
              forwarding address) then apply the following priorities in
              deciding which LSA is preferred:

                 1. A Type-7 LSA with the P-bit set.

                 2. A Type-5 LSA.

                 3. The LSA with the higher router ID.

Hence, if a router knows both LSA-7 and LSA-5 for the same route and they both provide the same total metric of the same type, the information from LSA-7 is preferred.

Note that the RFC 3101 is an upgraded version of OSPF NSSA functionality. The NSSA was first specified in (now obsolete) RFC 1587 which states a different preference (Section 3.5 Step 5):

         When a type-5 LSA and a type-7 LSA are found to have the
         same type and an equal distance, the following priorities
         apply (listed from highest to lowest) for breaking the tie.

                 a. Any type 5 LSA.
                 b. A type-7 LSA with the P-bit set and the forwarding
                    address non-zero.
                 c. Any other type-7 LSA.

         If the new path is shorter, it replaces the present paths
         in the routing table entry. If the new path is the same
         cost, it is added to the routing table entry's list of
         paths.

Hence, different RFC versions define different NSSA behavior. In Cisco IOS, the updated RFC 3101 behavior was implemented in 15.0SY, 15.1S and 15.2M onwards. You may therefore end up with differing route selections based on different IOS versions.

Best regards,

Peter

Hi Peter,

Just some clarification to better understand...

First: In both RFCs, if I understand correctly, intra-AS path's types that a router considers to AS-external ASBR/forwarder address are different for Type-5 and Type-7 external LSA:

Type-5 LSA: matching routing table entry must specify a path to the ASBR/forwarder address through a Type-5 capable area ;

Type-7 LSA: matching routing table entry must specify an intra-area path to the ASBR/forward address through the (same) NSSA-area;

Is that correct ?

Second: RFC 3101, Section 2.5, Step 6

After step (d) we may end up, for example, with a type-5 and type-7 LSA with same external path type (type-1 or type-2) and same metric to the ASBR/forwarding address. Step (e) seems to consider only "functionally the same" LSAs (same destination,cost and non-zero forwarding address)......

What if current LSA and installed LSA have different forwarding addresses (for instance current LSA has 0.0.0.0 (ASBR) while installed LSA has a non-zero forwarding address) ?

Thanks.

Any idea ?

Thanks.

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: