Sub topic 11
Router Roles: Internal, ABR, and ASBR
This chapter assumes you know how OSPF areas and the backbone (area 0) are laid out, and that you have seen the LSA types 1 to 5 by name. Here you will learn how a router's role follows from where its interfaces sit and what it redistributes. You will also see which LSAs each role originates, and which mistakes cause silent routing failures.
Roles describe interfaces, not hardware
OSPF has no "role" setting. A router's role is a result of its configuration, and one router can hold several roles at once.
| Role | Defining condition | LSAs it originates |
|---|---|---|
| Internal router | All OSPF interfaces are in one area | Type 1 (plus Type 2 when it is a DR) |
| Backbone router | At least one interface is in area 0 | Same as above, depending on its other roles |
| ABR (Area Border Router) | Interfaces in two or more areas | Type 1 per area, Type 3, Type 4 |
| ASBR (Autonomous System Boundary Router) | Injects routes learned outside OSPF | Type 5 (Type 7 in an NSSA) |
"Backbone router" overlaps with the others. An internal router with every interface in area 0 is both internal and backbone. An ABR that touches area 0 is a backbone router too.
Internal routers
An internal router has all its OSPF interfaces in a single area. It keeps one link-state database (LSDB) and runs one SPF calculation. It floods its own Type 1 router LSA to the area. If it wins a DR election on a broadcast segment, it also originates a Type 2 network LSA.
Internal routers are the cheapest role. Their LSDB holds only what the area needs, plus Type 3 summaries and external routes injected by other routers. This is the main reason to split a large network into areas.
Area Border Routers
An ABR connects areas. It does three things:
- It keeps a separate LSDB for each area it belongs to and runs a separate SPF per area. Memory and CPU grow with the number of areas attached.
- It sets the B bit in the Type 1 LSA it originates into each area. Other routers use that bit to recognize it as an ABR.
- It converts topology into summaries. For each intra-area route in one area, it originates a Type 3 summary LSA into the other areas. It also originates Type 4 LSAs, which tell routers in other areas how to reach an ASBR.
Routers in other areas learn only the prefix and cost from a Type 3 LSA, and they never see the topology behind it. The ABR is therefore a point where link-state information becomes distance-vector-like. That is why inter-area paths must pass through area 0. Without a hub-and-spoke shape, Type 3 advertisements could loop.
The backbone rule and its edge cases
A router with interfaces in area 1 and area 2 but none in area 0 is not a working ABR. Cisco IOS follows the RFC 3509 "actively attached" behavior. It only advertises Type 3 LSAs between areas if it has an interface in area 0 that is up and has at least one fully adjacent neighbor. Without that, the router connects areas 1 and 2 physically, but neither area learns the other's prefixes through it.
The usual fixes are to attach the router to area 0, or to use a virtual link through a transit area as a temporary workaround. Virtual links patch a design problem and should not be a permanent answer.
Autonomous System Boundary Routers
An ASBR injects routes from outside the OSPF domain into it. The source can be a static route, another routing protocol such as BGP or EIGRP, or connected networks. The ASBR floods these as Type 5 external LSAs, and they reach every normal area unchanged. Routers in other areas cannot compute a path to the ASBR from their own LSDB, so the ABR advertises the ASBR's location with a Type 4 LSA.
Being an ASBR depends on redistribution, not on position in the topology. An ASBR can sit in area 0 or in any other area, and it can also be an ABR.
ip route 172.16.0.0 255.255.0.0 203.0.113.2
!
router ospf 1
router-id 5.5.5.5
redistribute static subnets metric-type 1 metric 20The subnets keyword is needed on IOS to redistribute classless prefixes. Without it, IOS only redistributes classful networks, so the 172.16.0.0/16 route above would still be included, but a /24 subnet would be silently skipped. The metric type decides how the cost is computed: type 2 (the default) carries only the external cost, while type 1 adds the internal cost to reach the ASBR.
Seeing the roles in a topology
In this topology, R1 floods only Type 1 LSAs inside area 1. R2 turns area 1's prefixes into Type 3 LSAs for area 0, and it turns area 0's prefixes into Type 3 LSAs for area 1. R4 originates Type 5 LSAs for the external prefixes. R3 originates a Type 4 LSA into area 0 so that R2 and R1 can find R4. R1's own LSDB has no router LSA for R4, so without that Type 4 LSA it could not resolve the next hop toward R4.
Configuring an ABR
An ABR needs no special command. Placing interfaces in different areas makes a router an ABR.
router ospf 1
router-id 2.2.2.2
!
interface GigabitEthernet0/0
ip address 10.0.12.2 255.255.255.252
ip ospf 1 area 1
!
interface GigabitEthernet0/1
ip address 10.0.23.2 255.255.255.252
ip ospf 1 area 0To confirm the roles, run show ip ospf and read the lines near the top:
Routing Process "ospf 1" with ID 2.2.2.2
It is an area border routerA router doing redistribution shows It is an autonomous system boundary router. If the router is both, both lines appear. show ip ospf border-routers lists the ABRs and ASBRs this router has computed paths to, which is what the Type 3 and Type 4 LSAs feed.
Design consequences
- Placement of ABRs. ABRs are where you can summarize, so put them where address blocks are contiguous. A later chapter covers summarization.
- Load. An ABR holds one LSDB and runs one SPF per area. A router in many areas can become a CPU bottleneck during instability, so limit the number of areas per ABR.
- ASBR failure. If an ASBR goes down, its Type 5 LSAs age out or are withdrawn. Routers will lose its external routes unless a second ASBR advertises them.
- Roles can stack. A router that is an ABR and an ASBR is common in small networks. It is correct, but it concentrates failure in one device.
Exercise
Router X has interface Gi0/0 in area 0 (up, with a Full neighbor), interface Gi0/1 in area 3, and a static default route that is redistributed into OSPF. Which roles does X hold, and which LSA types does it originate that routers in area 3 will see?
Show answer
X is a backbone router, an ABR (area 0 and area 3), and an ASBR (redistribution). It originates Type 1 LSAs into both areas, Type 3 LSAs between the areas, and a Type 5 LSA for the redistributed default route. Area 3 sees Type 3 and Type 5 LSAs from X. Whether area 3 also needs a Type 4 LSA for X depends on the location: X is an ABR on the area 3 border, so routers in area 3 find it directly through its Type 1 LSA, and no Type 4 is needed for them.
Exercise
Router Y has interfaces in area 1 and area 2 only, and its area 0 interface is shut down. Area 1 and area 2 both have working OSPF adjacencies with Y. Will hosts in area 1 reach prefixes in area 2 through Y?
Show answer
No. Y is not actively attached to area 0, so it does not originate Type 3 LSAs between areas. Both areas stay healthy internally but do not learn each other's prefixes through Y. Bring up the area 0 interface, or configure a virtual link through a transit area.