The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This document describes the concepts used for the selection of forwarding address for an External LSA (Link State Advertisement) by an ASBR (Autonomous System Boundary Router) in OSPF (Open Shortest Path First) domain.
Readers of this document should have knowledge of these topics:
This document is not restricted to specific software and hardware versions.
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.
Following image would be used as a sample topology for rest of the document.
R3 is redistributing network 192.168.20.0/24 into OSPF NSSA (Not-So-Stubby Area) using route-map. You can use any method of redistributing route into OSPF domain.
Relevant configurtion of R3:
router ospf 1
router-id 192.168.3.3
area 1 nssa
redistribute connected metric-type 1 subnets route-map CONN
network 10.143.31.0 0.0.0.255 area 1
route-map CONN, permit, sequence 10
Match clauses:
interface Ethernet0/1
Set clauses:
Policy routing matches: 0 packets, 0 bytes
interface Ethernet0/1
ip address 192.168.20.1 255.255.255.0
OSPF neighborship between different routers:
R1#sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
192.168.3.3 0 FULL/ - 00:00:38 10.143.31.234 Ethernet0/2
R2#sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
192.168.3.3 0 FULL/ - 00:00:36 10.143.31.230 Ethernet0/0
R3#sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
192.168.1.1 0 FULL/ - 00:00:34 10.143.31.233 Ethernet0/2
192.168.2.2 0 FULL/ - 00:00:30 10.143.31.229 Ethernet0/0
If you look at the metric of the external route "192.168.20.0" on R1 and R2, you will find that it is seen with a metric of 30 on R1 and with a metric 40 on R2. There is difference even though they are connected to R3 in an identical fashion.
R1#sh ip route 192.168.20.0
Routing entry for 192.168.20.0/24
Known via "ospf 1", distance 110, metric 30, type NSSA extern 1
Last update from 10.143.31.234 on Ethernet0/2, 00:00:31 ago
Routing Descriptor Blocks:
* 10.143.31.234, from 192.168.3.3, 00:00:31 ago, via Ethernet0/2
Route metric is 30, traffic share count is 1
R2#sh ip route 192.168.20.0
Routing entry for 192.168.20.0/24
Known via "ospf 1", distance 110, metric 40, type NSSA extern 1
Last update from 10.143.31.230 on Ethernet0/0, 00:00:26 ago
Routing Descriptor Blocks:
* 10.143.31.230, from 192.168.3.3, 00:00:26 ago, via Ethernet0/0
Route metric is 40, traffic share count is 1
LSA information for this prefix on R1 and R2:
R1#sh ip ospf database nssa-external
OSPF Router with ID (192.168.1.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: 334
Options: (No TOS-capability, Type 7/5 translation, DC, Upward)
LS Type: AS External Link
Link State ID: 192.168.20.0 (External Network Number )
Advertising Router: 192.168.3.3
LS Seq Number: 80000003
Checksum: 0xA0E3
Length: 36
Network Mask: /24
Metric Type: 1 (Comparable directly to link state metric)
MTID: 0
Metric: 20
Forward Address: 10.143.31.234
External Route Tag: 0
R2#sh ip ospf database nssa-external
OSPF Router with ID (192.168.2.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: 352
Options: (No TOS-capability, Type 7/5 translation, DC, Upward)
LS Type: AS External Link
Link State ID: 192.168.20.0 (External Network Number )
Advertising Router: 192.168.3.3
LS Seq Number: 80000003
Checksum: 0xA0E3
Length: 36
Network Mask: /24
Metric Type: 1 (Comparable directly to link state metric)
MTID: 0
Metric: 20
Forward Address: 10.143.31.234
External Route Tag: 0
You can see forwarding address of Type-7 LSA is same on both R1 and R2. Also this forwarding address belongs to interface between R3 and R1. This forwarding address is directly connected for R1 but for R2 it is reachable via R3. This means forwarding address is one extra hop away for R2.
In case if R3 chooses IP address of link between R3 and R2 as forwarding address then similar situation will be seen on R1.
Forwarding address is selected on ASBR using the following rules:
R3#sh ip ospf interface brief
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Et0/2 1 1 10.143.31.234/30 10 P2P 1/1
Et0/0 1 1 10.143.31.230/30 10 P2P 1/1
Et0/2 shows on top of "show ip ospf interface brief" and this is the reason why its IP address was chosen as the forwarding address.
Changing the configuration of Et0/0 to default configuration will make it detach from OSPF. Adding the configuration again will attach it back to OSPF. After this Et0/0 will be listed on top of "show ip ospf interface brief" output.
R3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#
R3(config)#default interface e0/0
Interface Ethernet0/0 set to default configuration
*Aug 3 11:25:47.625: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.2.2 on Ethernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached
R3(config)#interface Ethernet0/0
R3(config-if)# ip address 10.143.31.230 255.255.255.252
R3(config-if)# ip ospf network point-to-point
R3(config-if)#end
R3#*Aug 3 11:26:03.995: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.2.2 on Ethernet0/0 from LOADING to FULL, Loading Done
R3#sh ip ospf interface brief
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Et0/0 1 1 10.143.31.230/30 10 P2P 1/1
Et0/2 1 1 10.143.31.234/30 10 P2P 1/1
This change would result in recalculation of forwarding address to that of IP address configured on Et0/0.
R1#sh ip ospf database nssa-external
OSPF Router with ID (192.168.1.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: 284
Options: (No TOS-capability, Type 7/5 translation, DC, Upward)
LS Type: AS External Link
Link State ID: 192.168.20.0 (External Network Number )
Advertising Router: 192.168.3.3
LS Seq Number: 80000004
Checksum: 0x6621
Length: 36
Network Mask: /24
Metric Type: 1 (Comparable directly to link state metric)
MTID: 0
Metric: 20
Forward Address: 10.143.31.230
External Route Tag: 0
R2#sh ip ospf database nssa-external
OSPF Router with ID (192.168.2.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: 303
Options: (No TOS-capability, Type 7/5 translation, DC, Upward)
LS Type: AS External Link
Link State ID: 192.168.20.0 (External Network Number )
Advertising Router: 192.168.3.3
LS Seq Number: 80000004
Checksum: 0x6621
Length: 36
Network Mask: /24
Metric Type: 1 (Comparable directly to link state metric)
MTID: 0
Metric: 20
Forward Address: 10.143.31.230
External Route Tag: 0
The output of "show ip route" will now show that metric to reach external route on R1 is 40 and on R2 is 30. This is reverse of the earlier outputs.
R1#sh ip route 192.168.20.0
Routing entry for 192.168.20.0/24
Known via "ospf 1", distance 110, metric 40, type NSSA extern 1
Last update from 10.143.31.234 on Ethernet0/2, 00:06:14 ago
Routing Descriptor Blocks:
* 10.143.31.234, from 192.168.3.3, 00:06:14 ago, via Ethernet0/2
Route metric is 40, traffic share count is 1
R2#sh ip route 192.168.20.0
Routing entry for 192.168.20.0/24
Known via "ospf 1", distance 110, metric 30, type NSSA extern 1
Last update from 10.143.31.230 on Ethernet0/0, 00:06:29 ago
Routing Descriptor Blocks:
* 10.143.31.230, from 192.168.3.3, 00:06:29 ago, via Ethernet0/0
Route metric is 30, traffic share count is 1
This change can be unpredictable and would result in network convergence so it is advisable to have a loopback IP address as forwarding address.
R3(config)#int lo0
R3(config-if)#ip address 192.168.3.3 255.255.255.255
R3(config-if)#router ospf 1
R3(config-router)#network 192.168.3.3 0.0.0.0 area 1
R3(config-router)#end
This also results in equal metric on both R1 and R2:
R1#sh ip ospf database nssa-external
OSPF Router with ID (192.168.1.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: 1
Options: (No TOS-capability, Type 7/5 translation, DC, Upward)
LS Type: AS External Link
Link State ID: 192.168.20.0 (External Network Number )
Advertising Router: 192.168.3.3
LS Seq Number: 80000005
Checksum: 0x872F
Length: 36
Network Mask: /24
Metric Type: 1 (Comparable directly to link state metric)
MTID: 0
Metric: 20
Forward Address: 192.168.3.3
External Route Tag: 0
R1#sh ip route 192.168.20.0
Routing entry for 192.168.20.0/24
Known via "ospf 1", distance 110, metric 31, type NSSA extern 1
Last update from 10.143.31.234 on Ethernet0/2, 00:01:27 ago
Routing Descriptor Blocks:
* 10.143.31.234, from 192.168.3.3, 00:01:27 ago, via Ethernet0/2
Route metric is 31, traffic share count is 1
R2#sh ip ospf database nssa-external
OSPF Router with ID (192.168.2.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: 6
Options: (No TOS-capability, Type 7/5 translation, DC, Upward)
LS Type: AS External Link
Link State ID: 192.168.20.0 (External Network Number )
Advertising Router: 192.168.3.3
LS Seq Number: 80000005
Checksum: 0x872F
Length: 36
Network Mask: /24
Metric Type: 1 (Comparable directly to link state metric)
MTID: 0
Metric: 20
Forward Address: 192.168.3.3
External Route Tag: 0
R2#sh ip route 192.168.20.0
Routing entry for 192.168.20.0/24
Known via "ospf 1", distance 110, metric 31, type NSSA extern 1
Last update from 10.143.31.230 on Ethernet0/0, 00:01:57 ago
Routing Descriptor Blocks:
* 10.143.31.230, from 192.168.3.3, 00:01:57 ago, via Ethernet0/0
Route metric is 31, traffic share count is 1
Note: Refer Common Routing Problem with OSPF Forwarding Address for more information about non-zero forwarding address of external LSA.