Understanding OSPF Forward Address

Rashmi Bhardwaj | Blog,BUZZ,Protocol,Routing & Switching
Advertisements

Introduction to OSPF Forward Address

OSPF External LSA contains a field called Forwarding Address. Based on the forwarding address the metrics of a particular route may vary.

Let us take the below example to study the effect of OSPF forwarding address on metrics:

 

ospf forward address

In this topology Router R1, R2 and R3 are in OSPF Area 1 configured as NSSA. Connected subnet 9.9.34.0/24 is redistributed on R3 and is received on R1 and R2 as a Type-7 LLSA in the NSSA area.

Advertisements

 

CONFIGURATIONS: OSPF Forward Address

R1:

router ospf 1area 1 nssa

network 9.9.13.0 0.0.0.255 area 1

R2:

router ospf 1area 1 nssa

network 9.9.23.0 0.0.0.255 area 1   

R3:

router ospf 1area 1 nssa

redistribute connected metric-type 1 subnets

network 9.9.13.0 0.0.0.255 area 1

network 9.9.23.0 0.0.0.255 area 1

Though R1 and R2 have same connectivity to R3, we see that route for 9.9.34.0 on R1 is learnt with a metric of 22, while on R2 it is 21.

R1#sh ip route 9.9.34.0 Routing entry for 9.9.34.0/24

Known via “ospf 1”, distance 110, metric 22, type NSSA extern 1

Last update from 9.9.13.3 on FastEthernet0/0, 00:02:21 ago

Routing Descriptor Blocks:

* 9.9.13.3, from 9.9.23.3, 00:02:21 ago, via FastEthernet0/0

Route metric is 22, traffic share count is 1

R2#sh ip route 9.9.34.0Routing entry for 9.9.34.0/24

Known via “ospf 1”, distance 110, metric 21, type NSSA extern 1

Last update from 9.9.23.3 on FastEthernet0/0, 00:03:14 ago

Routing Descriptor Blocks:

* 9.9.23.3, from 9.9.23.3, 00:03:14 ago, via FastEthernet0/0

Route metric is 21, traffic share count is 1

Now let us understand why there is a difference in metric on both R1 and R2 for the route to subnet 9.9.34.0/24.

We check the forward address for the external LSA on both R1 and R2 as highlighted below:

R1#sh ip ospf database nssa-external OSPF Router with ID (9.9.13.1) (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: 398

Options: (No TOS-capability, Type 7/5 translation, DC, Upward)

LS Type: AS External Link

Link State ID: 9.9.34.0 (External Network Number )

Advertising Router: 9.9.23.3

LS Seq Number: 80000002

Checksum: 0x4D3C

Length: 36

Network Mask: /24

Metric Type: 1 (Comparable directly to link state metric)

MTID: 0

Metric: 20

Forward Address: 9.9.23.3

External Route Tag: 0       

R2#sh ip ospf database nssa-external OSPF Router with ID (9.9.23.2) (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: 429

Options: (No TOS-capability, Type 7/5 translation, DC, Upward)

LS Type: AS External Link

Link State ID: 9.9.34.0 (External Network Number )

Advertising Router: 9.9.23.3

LS Seq Number: 80000002

Checksum: 0x4D3C

Length: 36

Network Mask: /24

Metric Type: 1 (Comparable directly to link state metric)

MTID: 0

Metric: 20

Forward Address: 9.9.23.3

External Route Tag: 0   

We see the forward address is Type-7 LSA for 9.9.23.3 which is directly connected on R2 but is one-hop away from R1. Hence there was a difference of metric on R1 & R2.

In case R3 would have chosen 9.9.13.3 as the forwarding address a reverse condition would have been seen i.e. metric 21 on R1 and 22 on R2.

Forwarding address is selected on ASBR using the following rules:

  • If there is a loopback configured in the area then IP address of loopback is selected as forwarding address.
  • If first condition is not met then IP address of first interface on the OSPF interface list is selected as forwarding address. You can see OSPF interface list by using “show ip ospf interface brief” command. The interface on top will be the last interface which was attached to OSPF.   

Since there was no loopback configured on R3 the second condition will prevail, so let us check the output of “sh ip ospf interface brief” to see which IP is listed first.

R3#sh ip ospf interface brief Interface   PID   Area           IP Address/Mask   Cost State Nbrs F/C

Fa1/0         1         1                 9.9.23.3/24                1     BDR   1/1

Fa0/0         1         1                 9.9.13.3/24                 1     BDR   1/1 

Continue Reading:

How to configure OSPF Virtual Link?

Configuring OSPF Multi-Area Adjacency : Example Scenario

Are you preparing for your next interview

If preparing for your next interview, please go through the list of  Top 100 OSPF Interview questions.

ABOUT THE AUTHOR

Advertisements

Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart
Select your currency
USD United States (US) dollar
Scroll to Top