Primary/backup area border router designs

From CT3

Jump to: navigation, search

By Ivan Pepelnjak

Cisco IOS allows you to influence the cost of the default route advertised from an ABR into an OSPF stub area or NSSA area. This feature could be used in redundant designs where you need tight control over exit point from a stub/NSSA area.


Typical Primary/Backup ABR design

The typical design scenario would require one of the ABRs to be used as the primary transit router regardless of the intra-area OSPF cost (which is usually based on interface bandwidth).

Figure 1: Primary/Backup ABR design with equal intra-area costs

You might encounter this scenario in the following designs:

Equal-bandwidth primary and backup links

If you have configured the stub area as a totally stubby area (no inter-area summaries are advertised into it), the total intra-area default route cost (the cost of the advertised default route summary + the path cost to the ABR) is the sole route selection criteria.

A totally stubby area is configured with the area number stub no-summary router configuration command.

If you want to ensure that one of the ABRs is used as the primary exit point from the area even though the intra-area cost to both ABRs is the same, you have to change the cost of the default route.

Suboptimal routing in a totally stubby area

The routers in a totally stubby area have no visibility of the overall network topology beyond the ABRs (routers in a stub area know the total cost toward OSPF prefixes and can select the optimum path to them). If there is a significant mismatch in the speed of the backbone links connected to the redundant ABRs, you might need to change the default route cost to minimize the amount of the transit traffic received by the ABR with slower backbone links.

Change in primary/backup link role

A well-controlled WAN migration project within an OSPF area would have the following steps:

  1. Establish the links using the new WAN technology (for example, IPSec-over-Internet tunnels)
  2. Test the OSPF routing across the new links while the traffic still flows over the old links (this requires a higher OSPF cost on the new links).
  3. Switch over from the old links to the new ones.
  4. Remove the old links (or retain them for backup purposes).

In a regular OSPF area, you have to change the OSPF cost of the WAN links on all site routers when you want to switch the traffic from the old WAN technology to the new one. In a totally stubby area you simply have to change the OSPF default cost on the ABR routers and the traffic will shift to toward the new ABR immediately.

Selecting default ABR for external destinations

In some cases, you might want to influence selection of the ABR used to reach external (non-OSPF) destinations. As the external prefixes (including the LSA type-5 default route used in regular OSPF areas) are not propagated within a stub or NSSA area, you have to change the cost of the default route to influence ABR selection within the area.

For example, an OSPF stub area might have a redundant design where the links to the core (backbone) router are faster than the links to the Internet gateway.

Figure 2: Internet gateway with higher intra-area cost

In this design, all Internet traffic will flow to the backbone router unless the core router advertises the default route with higher cost than the Internet gateway.

Primary/Backup ABR selection in stub or NSSA areas

The cost of the default route advertised into a stub area from an ABR is controlled with the area number default-cost cost router configuration command. The default route cost is an internal OSPF cost; each router in the stub area adds the intra-area cost to the ABR to the default route cost to get the total cost used in route selection process. For example, to make A2 from Figure 2 the default ABR for external destinations, use the following router configurations on A1 and A2:

A1#show run | section router ospf
router ospf 1
 area 11 stub
 area 11 default-cost 50000
A2#show run | section router ospf
router ospf 1
 area 11 stub
 area 11 default-cost 10

Although the path cost from S1 to A1 is lower than the path cost from S1 to A2, the default route advertised by A2 is used by S1 due to its lower total cost:

S2#show ip route
Routing entry for, supernet
  Known via "ospf 1", distance 110, metric 110, candidate default path, type inter area
  Last update from on Serial1/1, 00:05:47 ago
  Routing Descriptor Blocks:
  *, from, 00:05:47 ago, via Serial1/1
      Route metric is 110, traffic share count is 1
S2#show ip ospf border-routers | begin Codes
Codes: i - Intra-area route, I - Inter-area route

i [100] via, Serial1/1, ABR, Area 11, SPF 2
i [50] via, Serial1/0, ABR, Area 11, SPF 2
S2#show ip ospf database summary | exclude LS|Options|Check|OSPF

                Summary Net Link States (Area 11)

  Link State ID: (summary Network Number)
  Advertising Router:
  Length: 28
  Network Mask: /0
        TOS: 0  Metric: 50000

  Link State ID: (summary Network Number)
  Advertising Router:
  Length: 28
  Network Mask: /0
        TOS: 0  Metric: 10

Primary/Backup ABR selection in NSSA areas

ABRs can insert summary (LSA type-3) or external (LSA type-7) default route into an NSSA area (see the IP corner article The OSPF Default Mysteries for more details). If you configure totally-stubby area with the area nssa no-summary router configuration command, you can use the area default-cost router configuration command to set the cost of the summary (LSA type-3) default route. You can influence the cost of the external (type-7) default route with the default-information-originate metric parameter of the area nssa router configuration command. Sample primary/backup NSSA ABR router configurations can be found in the Not-so-stubby area section of the OSPF Default Mysteries article.

Additional Resources  

Personal tools


Main menu