cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3083
Views
30
Helpful
22
Replies

OSPF Path Selection 2

visitor68
Level 4
Level 4

An ASBR in AREA 2 redistributes a BGP route as a type 5 LSA E1 route.

A core ABR receives the tyoe 5 advertisement from two sources, one from a router connected to its AREA 2 interface and another from its AREA 0 interface.

Assuming the cost through the AREA 2 interface is higher than the cost through its AREA 0 interface, which path will the ABR take to get to the external network?

Thanks

22 Replies 22

REPOSTED BELOW.

lamav
Level 8
Level 8

Joe:

I dont know why my post is all crunched up the way it is and why it is that you need to use the scroll bar, but I advise you to copy and paste the post into a Word doc and fix the formatting yourself so you can read it easily.

Ever since they changed the NetPro forum, its been acting weird...

Victor

lamav wrote:

Joe:

I dont know why my post is all crunched up the way it is and why it is that you need to use the scroll bar, but I advise you to copy and paste the post into a Word doc and fix the formatting yourself so you can read it easily.

Ever since they changed the NetPro forum, its been acting weird...

Victor

Victor

Think they are looking into this. If you reply to the original post then you should be alright. If you reply to the last post it kind of indents it and the more posts there are in a thread the more it indents.

By the way, really good post on OSPF behaviour, rated.

Jon

Thanks, Jon....reposted it the way you said. And thanks for the Kudos....

Victor

lamav
Level 8
Level 8

Joe:

The OSPF forwarding address feature's behavior can actually be a little tricky. Its not as straightforward as one would think -- at least as far as Im concerned. In fact, the bible of TCP/IP routing, Doyle's book, as well as the CCIE written exam certification guide do not cover OSPF forward addresses for external routes with any real attention to detail.

This explanation is long, but necessary.

The behavior differs depending on whether the ASBR is redistributing external subnets into a "normal" OSPF area or an NSSA area.

In a regular area, the ASBR will set its router ID as the "advertising router" address when it creates the type 5 LSA. By default, the forwarding address is 0.0.0.0.

Switch1#sh run | be router ospf
router ospf 1
  router-id 1.1.1.1
  log-adjacency-changes
  redistribute bgp 1 metric 100 metric-type 1 subnets
network 1.1.1.10 0.0.0.0 area 1 <------------------interface facing Sw 2 -- OSPF 1 AREA 1.

Switch1#sh ip ospf data external 1.1.2.0

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

                Type-5 AS External Link States

  LS age: 253
   Options: (No TOS-capability, DC)
   LS Type: AS External Link
   Link State ID: 1.1.2.0 (External Network Number )
   Advertising Router: 1.1.1.1
   LS Seq Number: 80000002
   Checksum: 0xD4E7
   Length: 36
   Network Mask: /24
         Metric Type: 1 (Comparable directly to link state metric)
         TOS: 0
         Metric: 100
        Forward Address: 0.0.0.0  <--------------------forwarding address not set.
         External Route Tag: 2

Switch1#

On the other hand, the next hop address in the ASBR's routing table for the external subnets -- in the neighboring AS system -- will become the forwarding address IF:

  OSPF is enabled on the ASBR's next hop interface AND
¨ ASBR's next hop interface is non−passive under OSPF AND
¨ ASBR's next hop interface is not point−to−point AND
¨ ASBR's next hop interface is not point−to−multipoint AND
   ASBR's next hop interface address falls under the network range specified in the router ospf
   command.

Any other conditions besides these set the forwarding address to 0.0.0.0.

Switch1#sh run | be router ospf
router ospf 1
  router-id 1.1.1.1
  log-adjacency-changes
  redistribute bgp 1 metric 100 metric-type 1 subnets
  network 1.1.1.5 0.0.0.0 area 1   <---------ASBR interface that faces next hop for the external subnets.
  network 1.1.1.10 0.0.0.0 area 1 <-----------interface facing Sw 2 -- OSPF 1 AREA 1.

Switch1#sh ip ro bgp
      1.0.0.0/8 is variably subnetted, 6 subnets, 3 masks
B       1.1.2.0/24 [20/0] via 1.1.1.6, 00:37:31
B       1.1.3.0/24 [20/0] via 1.1.1.6, 00:37:31
B       1.1.4.0/24 [20/0] via 1.1.1.6, 00:37:31
Switch1#
Switch1#
Switch1#
Switch1#sh ip ospf data external 1.1.2.0

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

                Type-5 AS External Link States

  LS age: 253
   Options: (No TOS-capability, DC)
   LS Type: AS External Link
   Link State ID: 1.1.2.0 (External Network Number )
   Advertising Router: 1.1.1.1
   LS Seq Number: 80000002
   Checksum: 0xD4E7
   Length: 36
   Network Mask: /24
         Metric Type: 1 (Comparable directly to link state metric)
         TOS: 0
         Metric: 100
        Forward Address: 1.1.1.6  <-----------Forwarding address set to ASBR's next hop for external subnets.
         External Route Tag: 2

Switch1#

==============================================================================================================

If the ASBR is in an OSPF NSSA and the P-bit (propagate bit) in the Type 7 LSA Options field is set to 1, that means the NSSA ABR should translate the type 7 LSA into a type 5 LSA and inject it into the backbone area. This is the default behavior for type 7 LSAs. In this case, the forwarding address MUST be set to non-zero.

Unlike in the situation where the ASBR sits in a regular OSPF area, where a 0.0.0.0 forwarding address is allowed to cross the ABR boundary in a type 5 LSA, a 0.0.0.0 forwarding address is not allowed to cross the ABR boundary in an NSSA if the type 7 LSA is to be translated into a type 5 LSA and propagated into the rest of the OSPF domain. Simply put, Type-7 LSAs that are to be translated into Type-5 LSAs must have their forwarding address set.

I have converted OSPF area 1 into an NSSA and I have also stopped running OSPF on the external AS-facing interface.

Switch1#sh run | be router ospf
router ospf 1
  router-id 1.1.1.1
  log-adjacency-changes
  area 1 nssa
  redistribute bgp 1 metric 100 metric-type 1 subnets
  network 1.1.1.10 0.0.0.0 area 1

Notice below how the forwarding address is NOT 0.0.0.0. The ASBR in the NSSA MUST select a forwarding address since the P-bit is set. The address it chose is the highest of all active OSPF IP interface addresses.

Switch1#sh ip ospf data nssa-external 1.1.2.0

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

                Type-7 AS External Link States (Area 1)

  LS age: 244
   Options: (No TOS-capability, Type 7/5 translation, DC)  <------------ P-bit is set
   LS Type: AS External Link
   Link State ID: 1.1.2.0 (External Network Number )
   Advertising Router: 1.1.1.1
   LS Seq Number: 80000002
   Checksum: 0x7836
   Length: 36
   Network Mask: /24
         Metric Type: 1 (Comparable directly to link state metric)
         TOS: 0
         Metric: 100
         Forward Address: 1.1.1.10 <--------Router must select forwarding address according to the rules stated above.
         External Route Tag: 2

Switch1#


HTH

Victor

Hello Victor,

excellent explanation of  OSPF forwarding address rated as it deserves.

Side note: an effect of OSPF NSSA forwarding address is that the converted to type 5 regular external LSA are accepted outside the original NSSA area if the forwarding address is known.

if an OSPF area filter-list is used tha doesn't allow the ip subnet of the external route forwarding address  to reach the backbone the game is over.

And of course someone faced this issue having made wide use of NSSA areas and with strict inter-area filtering.

Joe:

the case you have described where ASBR1 injects an LSA type 5 with a forwarding address that is that of ASBR2 is rare.

I cannot check here from the office, but there was a big issue years ago and a workaround applied by colleagues was:

ASBR1 had failed its own link to external network A

ASBR2 was connected but not able to generate its own external LSA (because the next-hop was under redistribute connected another external route and the network was behind a firewall so it was a a static route )

the fix they used was:

on ASBR1 they configured a static router for external nework A with next-hop = ASBR2 router-id loopback ip address.

But I would consider this not a clean design

Hope to help

Giuseppe

Victor:

Wow! Thanks a lot for that. You're right about the lack of clarity and detail involving forwarding addresses. I haven't been able to find a document that lays it all out the way you did. I rated your entry, of course.

Giuseppe/Jon:

Thanks a lot for your time and help, too...

Joe, Glad I could help.

Giuseppe, interesting stuff...thanks for the rating....

Review Cisco Networking for a $25 gift card