In scenarios where we have multiple ABRs converting/translating same network from Type7 to Type5 LSA, then OSPF database need to act on only one of them. The other must withdraw its LSA. This is one of many loop avoidance techniques adopted in OSPF.

The RFC 2328 says “if two routers, both reachable from one another, originate functionally equivalent AS-external-LSAs (i.e., same destination, cost and non-zero forwarding address), then the LSA originated by the router having the highest OSPF Router ID is used. The router having the lower OSPF Router ID can then flush its LSA.”

The forwarding address is an important concept in the Type 7 LSA and when it gets converted to Type 5 LSA by NSSA-ABR.

Who sets the Forwarding address ABR or ASBR ?

The answer is NSSA-ASBR. As the NSSA-ASBR is the one who originates the Type-7 LSA, it fills the forwarding address field. When ABR translates the same to Type 5 LSA retains the FA address as such.

Let’s check in the below topology

OSPF-FA

IOU4 is acting as NSSA-ASBR.

Let’s check the ospf database for nssa-external routes in IOU4.

IOU4#show ip ospf database nssa-external 55.55.55.55
            OSPF Router with ID (4.4.4.4) (Process ID 1)
                 Type-7 AS External Link States (Area 1)
LS age: 52
Options: (No TOS-capability, Type 7/5 translation, DC, Upward)
LS Type: AS External Link
Link State ID: 55.55.55.55 (External Network Number )
Advertising Router: 4.4.4.4
LS Seq Number: 80000001
Checksum: 0xB7E1
Length: 36
Network Mask: /32
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 20
Forward Address: 4.4.4.4
External Route Tag: 0
IOU4#

IOU3 is acting as ABR.

Let’s check the ospf database for nssa-external and external routes in IOU3.

IOU3#show ip ospf database nssa-external 55.55.55.55

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

                Type-7 AS External Link States (Area 1)

  Routing Bit Set on this LSA in topology Base with MTID 0
  LS age: 185
  Options: (No TOS-capability, Type 7/5 translation, DC, Upward)
  LS Type: AS External Link
  Link State ID: 55.55.55.55 (External Network Number )
  Advertising Router: 4.4.4.4
  LS Seq Number: 80000001
  Checksum: 0xB7E1
  Length: 36
  Network Mask: /32
        Metric Type: 2 (Larger than any link state path)
        MTID: 0
        Metric: 20
        Forward Address: 4.4.4.4
        External Route Tag: 0

IOU3#show ip ospf database external 55.55.55.55

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

                Type-5 AS External Link States

  LS age: 145
  Options: (No TOS-capability, DC, Upward)
  LS Type: AS External Link
  Link State ID: 55.55.55.55 (External Network Number )
  Advertising Router: 3.3.3.3
  LS Seq Number: 80000001
  Checksum: 0x6A3D
  Length: 36
  Network Mask: /32
        Metric Type: 2 (Larger than any link state path)
        MTID: 0
        Metric: 20
        Forward Address: 4.4.4.4
        External Route Tag: 0
IOU3#

We can see IOU3 converts Type7 to Type5 (because it has higher RID 3.3.3.3 as compared to IOU2 2.2.2.2) and retains the forwarding address value of 4.4.4.4.

As all the path costs are default, in IOU1 we can see two equal cost paths available for 55.55.55.55.

Because IOU1 gets the external LSA for 55.55.55.55 as FA set to 4.4.4.4. Now IOU1 checks its database to reach 4.4.4.4 and finds two equal cost paths. Hence it installs both to reach 55.55.55.55.

IOU1#show ip ospf database external 55.55.55.55

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

                 Type-5 AS External Link States

Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 278
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 55.55.55.55 (External Network Number )
Advertising Router: 3.3.3.3
LS Seq Number: 80000001
Checksum: 0x6A3D
Length: 36
Network Mask: /32
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 20
Forward Address: 4.4.4.4
External Route Tag: 0

IOU1#
IOU1#show ip route 4.4.4.4
Routing entry for 4.4.4.4/32
Known via "ospf 1", distance 110, metric 21, type inter area
Last update from 10.12.12.2 on Ethernet0/0, 00:04:35 ago
Routing Descriptor Blocks:
* 10.13.13.3, from 3.3.3.3, 00:04:47 ago, via Ethernet0/1
Route metric is 21, traffic share count is 1
10.12.12.2, from 2.2.2.2, 00:04:35 ago, via Ethernet0/0
Route metric is 21, traffic share count is 1
IOU1#
IOU1#show ip route 55.55.55.55
Routing entry for 55.55.55.55/32
Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 21
Last update from 10.12.12.2 on Ethernet0/0, 00:04:36 ago
Routing Descriptor Blocks:
* 10.13.13.3, from 3.3.3.3, 00:04:52 ago, via Ethernet0/1
Route metric is 20, traffic share count is 1
10.12.12.2, from 3.3.3.3, 00:04:36 ago, via Ethernet0/0
Route metric is 20, traffic share count is 1
IOU1#
IOU1#traceroute 55.55.55.55 numeric
Type escape sequence to abort.
Tracing the route to 55.55.55.55
VRF info: (vrf in name/id, vrf out name/id)
  1 10.12.12.2 4 msec
    10.13.13.3 4 msec
    10.12.12.2 4 msec
  2 10.34.34.4 4 msec
    10.24.24.4 4 msec
    10.34.34.4 5 msec
  3 100.4.5.5 6 msec 5 msec 5 msec
IOU1#

Now the question arises which IP address will be used for the forwarding address.

The RFC 3101 says “When a router is forced to pick a forwarding address for a Type-7 LSA, preference should be given first to the router’s internal addresses (provided internal addressing is supported). If internal addresses are not available, preference should be given to the router’s active OSPF stub network addresses. These choices avoid the possible extra hop that may happen when a transit network’s address is used.  When the interface whose IP address is the LSA’s forwarding address transitions to a Down state, the router must select a new forwarding address for the LSA and then re-originate it. If one is not available the LSA should be flushed.”

Now in our example the internal address is the loopback address 4.4.4.4.

Let’s see if we remove that equation and force the router to choose another interface as FA how that affects the route selection.

The IP address 4.4.4.4 belongs to interface loopback4 on IOU4. I will shut the interface down.

IOU4(config)#int loop
IOU4(config)#int loopback 4
IOU4(config-if)#shut
IOU4(config-if)#end

IOU4#show ip ospf database nssa-external 55.55.55.55

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

               Type-7 AS External Link States (Area 1)

LS age: 45
Options: (No TOS-capability, Type 7/5 translation, DC, Upward)
LS Type: AS External Link
Link State ID: 55.55.55.55 (External Network Number )
Advertising Router: 4.4.4.4
LS Seq Number: 80000003
Checksum: 0xE66E
Length: 36
Network Mask: /32
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 20
Forward Address: 10.34.34.4
External Route Tag: 0

IOU4#

The FA has now been changed to 10.34.34.4. This address belongs to interface eth 0/3 connected to IOU3.

Why 10.34.34.4 not 10.24.24.4?

Because Cisco IOS follows below sequence

  1. Newest OSPF enabled loopback interface IP address
  2. Newest OSPF enabled non-loopback interface IP address that is connected to a transit stub network
  3. Newest OSPF enabled non-loopback interface IP address that is connected to a non-transit stub network

Now we have shut down the loopback4 interface and there is no other loopback interface available, the Cisco IOS will look for newest interface IP address in the transit network.

IOU4#show ip ospf interface brief
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Lo4          1     1               4.4.4.4/32         1     DOWN  0/0
Et0/3        1     1               10.34.34.4/24      10    DR    1/1
Et0/2        1     1               10.24.24.4/24      10    DR    1/1
IOU4#

Now let’s check how it influenced the routing decision on IOU1.

IOU1#show ip ospf database external 55.55.55.55

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

               Type-5 AS External Link States

Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 280
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 55.55.55.55 (External Network Number )
Advertising Router: 3.3.3.3
LS Seq Number: 80000003
Checksum: 0x99C9
Length: 36
Network Mask: /32
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 20
Forward Address: 10.34.34.4
External Route Tag: 0

IOU1#
IOU1#show ip route 10.34.34.4
Routing entry for 10.34.34.0/24
Known via "ospf 1", distance 110, metric 20, type inter area
Last update from 10.13.13.3 on Ethernet0/1, 01:10:22 ago
Routing Descriptor Blocks:
* 10.13.13.3, from 3.3.3.3, 01:10:22 ago, via Ethernet0/1
Route metric is 20, traffic share count is 1
IOU1#
IOU1#show ip route 55.55.55.55
Routing entry for 55.55.55.55/32
Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 20
Last update from 10.13.13.3 on Ethernet0/1, 00:59:43 ago
Routing Descriptor Blocks:
* 10.13.13.3, from 3.3.3.3, 00:59:59 ago, via Ethernet0/1
Route metric is 20, traffic share count is 1
IOU1#
IOU1#traceroute 55.55.55.55 numeric
Type escape sequence to abort.
Tracing the route to 55.55.55.55
VRF info: (vrf in name/id, vrf out name/id)
1 10.13.13.3 5 msec 5 msec 5 msec
2 10.34.34.4 5 msec 5 msec 4 msec
3 100.4.5.5 6 msec 5 msec 5 msec
IOU1#

Now IOU1 doesn’t do multi-pathing and only sends the traffic to IOU3.

What changed the routing decision of IOU1?

We neither changed any path cost nor anything in the redistribution to influence the path cost.

Because the FA is set to 10.34.34.4, IOU1 has the shortest path via IOU3 (metric 10) vs IOU2 (metric 20).

IOU1#show ip ospf database summary 10.34.34.0

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

             Summary Net Link States (Area 0)

LS age: 475
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
Link State ID: 10.34.34.0 (summary Network Number)
Advertising Router: 2.2.2.2
LS Seq Number: 80000001
Checksum: 0x8250
Length: 28
Network Mask: /24
MTID: 0 Metric: 20

Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 1580
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
Link State ID: 10.34.34.0 (summary Network Number)
Advertising Router: 3.3.3.3
LS Seq Number: 80000003
Checksum: 0xFBDA
Length: 28
Network Mask: /24
MTID: 0 Metric: 10

IOU1#

 

Another doubt may arise that the IOU4 chose 10.34.34.4 as FA because that is the interface which is connected to IOU3 and converting Type7 to Type5 LSAs because of higher router ID (IOU3 – 3.3.3.3 vs IOU2 – 2.2.2.2).

But this is not true. IOU4 (NSSA-ASBR) is independent in choosing the FA.

Let’s remove and add interface eth 0/2 (connected to IOU2) from OSPF process in IOU4, so that eth 0/2 (10.24.24.4) will be treated as the newest interface to join OSPF.

IOU4(config-router)#do show run | sec r o
router ospf 1
router-id 4.4.4.4
area 1 nssa
redistribute eigrp 100 subnets
network 4.4.4.4 0.0.0.0 area 1
network 10.24.24.4 0.0.0.0 area 1
network 10.34.34.4 0.0.0.0 area 1
IOU4(config-router)#no network 10.24.24.4 0.0.0.0 area 1
IOU4(config-router)#do show ip ospf int bri
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Lo4 1 1 4.4.4.4/32 1 DOWN 0/0
Et0/3 1 1 10.34.34.4/24 10 DR 1/1
IOU4(config-router)#
IOU4(config-router)#network 10.24.24.4 0.0.0.0 area 1
IOU4(config-router)#
IOU4(config-router)#do show ip ospf int bri
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Lo4 1 1 4.4.4.4/32 1 DOWN 0/0
Et0/2 1 1 10.24.24.4/24 10 BDR 1/1
Et0/3 1 1 10.34.34.4/24 10 DR 1/1
IOU4(config-router)#

Let’s verify IOU1 for the Type5 route.

IOU1#show ip ospf database external 55.55.55.55

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

                Type-5 AS External Link States

Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 151
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 55.55.55.55 (External Network Number )
Advertising Router: 3.3.3.3
LS Seq Number: 80000003
Checksum: 0x9ED8
Length: 36
Network Mask: /32
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 20
Forward Address: 10.24.24.4
External Route Tag: 0

IOU1#

Did you notice that ? The advertising router is IOU3 (3.3.3.3) but the Forwarding address is now showing as 10.24.24.4. This is the interface connected between IOU2 and IOU4. So now the Type5 LSA is generated by IOU3 but the traffic from IOU1 will go via IOU2.

IOU1#traceroute 55.55.55.55 numeric
Type escape sequence to abort.
Tracing the route to 55.55.55.55
VRF info: (vrf in name/id, vrf out name/id)
  1 10.12.12.2 5 msec 5 msec 4 msec
  2 10.24.24.4 4 msec 4 msec 6 msec
  3 100.4.5.5 4 msec 5 msec 4 msec
IOU1#

 

Hope this article have helped you in understanding the Forwarding Address in OSPF Type 7 & Type 5 LSAs and how it influences the path selection.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s