103
• Configure Router D as the ASBR to redistribute static routes.
• Configure Area 1 as a stub area to reduce advertised LSAs without influencing reachability.
Figure 25 Network diagram
Configuration procedure
1. Configure IP addresses for interfaces. (Details not shown.)
2. Enable OSPF (see "Basic OSPF configuration example")
.
3. Configure route redistribution:
# Configure Router D to redistribute static routes.
<RouterD> system-view
[RouterD] ip route-static 3.1.2.1 24 10.5.1.2
[RouterD] ospf
[RouterD-ospf-1] import-route static
[RouterD-ospf-1] quit
# Display ABR/ASBR information on Router C.
<RouterC> display ospf abr-asbr
OSPF Process 1 with Router ID 10.4.1.1
Routing Table to ABR and ASBR
Type Destination Area Cost Nexthop RtType
Intra 10.2.1.1 0.0.0.1 3 10.2.1.1 ABR
Inter 10.5.1.1 0.0.0.1 7 10.2.1.1 ASBR
# Display OSPF routing information on Router C.
<RouterC> display ospf routing
OSPF Process 1 with Router ID 10.4.1.1
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
10.2.1.0/24 3 Transit 10.2.1.2 10.2.1.1 0.0.0.1
10.3.1.0/24 7 Inter 10.2.1.1 10.2.1.1 0.0.0.1
10.4.1.0/24 3 Stub 10.4.1.1 10.4.1.1 0.0.0.1
10.5.1.0/24 17 Inter 10.2.1.1 10.2.1.1 0.0.0.1
Area 0
Area 1
Stub
Area 2
Router C
Eth1/1
10.1.1.2/24
Eth1/1
10.1.1.1/24
Eth1/2
10.4.1.1/24
Eth1/1
10.2.1.2/24
Router B
Eth1/2
10.3.1.1/24
Eth1/1
10.3.1.2/24
Router A
Eth1/2
10.2.1.1/24
Eth1/2
10.5.1.1/24
Router D
ASBR