
Basic configuration of all routers:
R1:
interface FastEthernet0/0
ip address 172.16.1.1 255.255.255.0
ip ospf 1 area 0
no shut
!
interface FastEthernet0/1
ip address 10.1.13.1 255.255.255.0
ip ospf 1 area 0
no shut
!
ip route 192.168.1.0 255.255.255.0
!
router ospf 1
router-id 1.1.1.1
redistribute static subnets
R2:
interface FastEthernet0/0
ip address 172.16.1.2 255.255.255.0
ip ospf 1 area 0
no shut
!
interface FastEthernet0/1
ip address 10.1.23.2 255.255.255.0
ip ospf 1 area 0
no shut
!
router ospf 1
router-id 2.2.2.2
R3:
interface FastEthernet0/0
ip address 10.1.13.3 255.255.255.0
ip ospf 1 area 0
no shut
!
interface FastEthernet0/1
ip address 10.1.23.3 255.255.255.0
ip ospf 1 area 0
no shut
!
router ospf 1
router-id 3.3.3.3
R4:
interface lo0
ip address 192.168.1.4 255.255.255.0
!
interface FastEthernet0/0
ip address 172.16.1.4 255.255.255.0
no shut
!
ip route 0.0.0.0 0.0.0.0 172.16.1.1
Only R1 has a static route toward 192.168.1.0 and redistribute it into ospf
as expected R2 learns this route as external E2:
A static route is configured on R1 to reach the prefix 192.168.1.0/24 and redistributed into OSPF domain.
R2 receives a Type-5 LSA with Forward Address 0.0.0.0 for the prefix 192.168.1.0/24.
R2#show ip ospf database external | include Forward Address|192.168.1.0
Link State ID: 192.168.1.0 (External Network Number )
Forward Address: 0.0.0.0
Per RFC 1583 in the following section:
16.4. Calculating AS external routes
Call the destination described by the advertisement N. N's
address is obtained by masking the advertisement's Link
State ID with the network/subnet mask contained in the body
of the advertisement. Look up the routing table entry for
the AS boundary router (ASBR) that originated the
advertisement. If no entry exists for router ASBR (i.e.,
ASBR is unreachable), do nothing with this advertisement and
consider the next in the list.
Else, this advertisement describes an AS external path to
destination N. Examine the forwarding address specified in
the AS external link advertisement. This indicates the IP
address to which packets for the destination should be
forwarded. If the forwarding address is set to 0.0.0.0,
packets should be sent to the ASBR itself. Otherwise, look
up the forwarding address in the routing table.[23] An
intra-area or inter-area path must exist to the forwarding
address. If no such path exists, do nothing with the
advertisement and consider the next in the list.
Cisco routers implements by default RFC 1583, the new RFC 2328 that replaces the old RFC 1583 specifies the same logic.
Per RFC 2328 in the following section:
16.4. Calculating AS external routes
If the forwarding address is set to 0.0.0.0, packets should
be sent to the ASBR itself. Among the multiple routing table
entries for the ASBR, select the preferred entry as follows.
If RFC1583Compatibility is set to "disabled", prune the set
of routing table entries for the ASBR as described in
Section 16.4.1. In any case, among the remaining routing
table entries, select the routing table entry with the least
cost; when there are multiple least cost routing table
entries the entry whose associated area has the largest OSPF
Area ID (when considered as an unsigned 32-bit integer) is
chosen.
If the forwarding address is non-zero, look up the
forwarding address in the routing table.[24] The matching
routing table entry must specify an intra-area or inter-area
path; if no such path exists, do nothing with the LSA and
consider the next in the list.
R2 lookup how to reach the ASBR R1 that originates the Type-5 LSA because the FA is set to 0.0.0.0. R1 is reachable through an intra-area route, as a result R1 installs successfully an OE2 external route to 192.168.1.0/24.
R2#show ip route | include 192.168.1.0
O E2 192.168.1.0/24 [110/20] via 10.1.23.3, 00:03:50, FastEthernet0/1
From R3’s perspective, the same logic is applied.
Below the Type-5 LSA received by R3.
R3#show ip ospf database external | include Forward Address|192.168.1.0
Link State ID: 192.168.1.0 (External Network Number )
Forward Address: 0.0.0.0
Below the routing table of R3 with an OE2 route installed successfully.
R3#show ip route ospf
O E2 192.168.1.0/24 [110/20] via 10.1.13.1, 00:00:15, FastEthernet0/0
Enable OSPF R1’s Fa0/0 interface:
R1(config-if)#ip ospf 1 area 0
Now the FA is 172.16.1.4 the ip address of R4 ,so after running fa0/0 R1 includes the FA in its LSA Type 5:
On R2 and R3 verify the Type-5 LSA advertised by the ASBR R1, the Forward Address now is set to a non-zero address 172.16.1.4.
R2#show ip ospf database external | include Forward Address|192.168.1.0
Link State ID: 192.168.1.0 (External Network Number )
Forward Address: 172.16.1.4
R3#show ip ospf database external | include Forward Address|192.168.1.0
Link State ID: 192.168.1.0 (External Network Number )
Forward Address: 172.16.1.4
Verify the routing table of R3, an OE2 route is installed successfully.
R3#show ip route 192.168.1.0
Routing entry for 192.168.1.0/24
Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 20
Last update from 10.1.13.1 on FastEthernet0/0, 00:00:57 ago
Routing Descriptor Blocks:
* 10.1.13.1, from 1.1.1.1, 00:00:57 ago, via FastEthernet0/0
Route metric is 20, traffic share count is 1
On R2, verify the routing table, the OE2 route is no longer present.
R2#show ip route 192.168.1.0
% Network not in table
Why R2 loses the external route?
Per RFC 1583 in the following section, you will find the answer:
16.4. Calculating AS external routes
Else, this advertisement describes an AS external path to
destination N. Examine the forwarding address specified in
the AS external link advertisement. This indicates the IP
address to which packets for the destination should be
forwarded. If the forwarding address is set to 0.0.0.0,
packets should be sent to the ASBR itself. Otherwise, look
up the forwarding address in the routing table.[23] An
intra-area or inter-area path must exist to the forwarding
address. If no such path exists, do nothing with the
advertisement and consider the next in the list.
R2#show ip ospf database external | include Forward Address|192.168.1.0
Link State ID: 192.168.1.0 (External Network Number )
Forward Address: 172.16.1.4
R3#show ip ospf database external | include Forward Address|192.168.1.0
Link State ID: 192.168.1.0 (External Network Number )
Forward Address: 172.16.1.4
By definition when a router receives a Type-5 LSA with a FA set to non zero in the LSA Type 5, the router lookup an intra-area route or inter-area route to reach the FA.
If we take a look at the routing table of R3, we can see an intra-area route exists to the prefix 172.16.1.0/24 therefore the Forward Address 172.16.1.4 listed in the Type-5 LSA’s R1 is reachable.
R3# show ip route 172.16.1.0
Routing entry for 172.16.1.0/24
Known via "ospf 1", distance 110, metric 20, type intra area
Last update from 10.1.13.1 on FastEthernet0/0, 00:23:12 ago
Routing Descriptor Blocks:
* 10.1.13.1, from 1.1.1.1, 00:23:12 ago, via FastEthernet0/0
Route metric is 20, traffic share count is 1
Since the Forward Address is reachable through an OSPF route as mentioned in the RFC 1583, the OE2 external route is valid and can be installed successfully in the routing table.
R3#show ip route 192.168.1.0
Routing entry for 192.168.1.0/24
Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 20
Last update from 10.1.13.1 on FastEthernet0/0, 00:26:15 ago
Routing Descriptor Blocks:
* 10.1.13.1, from 1.1.1.1, 00:26:15 ago, via FastEthernet0/0
Route metric is 20, traffic share count is 1
From R2’s perspective, we have seen previously that the External route is no longer present in the routing table.
Let’s verify if R2 has an OSPF route to reach the Forward Address per RFC 1583 section 16.4. Calculating AS external routes.
The routing table of R2 displays a connected route to 172.16.1.0/24. Since RFC 1583 specifies that An intra-area or inter-area path must exist to the forwarding address and R1 does not have an OSPF route to reach the Forward Address, it does not know how to reach the external prefix 192.168.1.0/24, this is why the external route is no longer available.
R2(config-if)#do show ip route 172.16.1.0
Routing entry for 172.16.1.0/24
Known via "connected", distance 0, metric 0 (connected, via interface)
Routing Descriptor Blocks:
* directly connected, via FastEthernet0/0
Route metric is 0, traffic share count is 1
The value of the forwarding address specified by the autonomous system boundary router (ASBR) can be either 0.0.0.0 or non-zero. The 0.0.0.0 address indicates that the originating router (the ASBR) is the next hop. The forwarding address is determined by these conditions:
The forwarding address is set to 0.0.0.0 if the ASBR redistributes routes and OSPF is not enabled on the next hop interface for those routes. This is true in this scenario before enabling OSPF on R1’s F0/0 interface.
These conditions set the forwarding address field to a non-zero address:
In this case, the F0/0 interface is not a point-to-point and a point-to-multipoint, the network type is broadcast. This is why the Forward Address is set the non-zero value.
The obvious solution, F0/0 interface should be either point-to-point or point-to-multipoint.
On R1, configure the F0/0 interface to operate in network type point-to-point.
R1(config-if)#int fa0/0
R1(config-if)#ip ospf network point-to-point
On R2, verify the Type-5 LSA advertised by the ASBR R1, the Forward Address is now 0.0.0.0
R2#show ip ospf database external | include Forward Address|192.168.1.0
Link State ID: 192.168.1.0 (External Network Number )
Forward Address: 0.0.0.0
Since the FA is 0.0.0.0, this means, to reach the external prefix 192.168.1.0/24 ,routes the packet to the ASBR R1.
R2#show ip route | include 192.168.1.0
O E2 192.168.1.0/24 [110/20] via 10.1.23.3, 00:01:10, FastEthernet0/1
To ensure the reachablity of the Forward Address without modifying the network type.
You should remember how a router evaluates routes in the following order:
*Prefix Length - The longest-matching route is preferred first. Prefix length trumps all other route attributes.
*Administrative Distance - In the event there are multiple routes to a destination with the same prefix length, the route learned by the protocol with the lowest administrative distance is preferred.
* Metric - In the event there are multiple routes learned by the same protocol with same prefix length, the route with the lowest metric is preferred.
Configure a secondary IP address 172.16.1.11 in Fa0/0 interface of R1 with a length prefix greater than 24:
R1(config-if)#int fa0/0
R1(config-if)#ip address 172.16.1.11 255.255.255.128 secondary
Verify the routing table of R2 using the show ip route 172.16.1.0 command. An intra-area route to reach 172.16.1.0/25 received from R1 because The longest-matching route /25 wins compared with the directly connected route with 172.16.1.0/24 :
R2(config)#do show ip route 172.16.1.0
Routing entry for 172.16.1.0/25
Known via "ospf 1", distance 110, metric 30, type intra area
Last update from 10.1.23.3 on FastEthernet0/1, 00:01:01 ago
Routing Descriptor Blocks:
* 10.1.23.3, from 1.1.1.1, 00:01:01 ago, via FastEthernet0/1
Route metric is 30, traffic share count is 1
Because now R2 has an intra-area to reach the Forward Address 172.16.1.4 , it installs the external OE2 route
R2(config)#do show ip route 192.168.1.0
Routing entry for 192.168.1.0/24
Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 30
Last update from 10.1.23.3 on FastEthernet0/1, 00:04:48 ago
Routing Descriptor Blocks:
* 10.1.23.3, from 1.1.1.1, 00:04:48 ago, via FastEthernet0/1
Route metric is 20, traffic share count is 1
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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: