Chapter 4
Layer 3 Infrastructure — Routing
Routing is the chapter where the exam stops asking what a protocol is and starts asking what it does to a specific prefix on a specific topology. Every section here ends in the same place: a packet, a route, and a decision you can trace. Learn the decision procedures — the feasibility condition, the SPF tree, the BGP ladder — as procedures, not as lists.
4.1 EIGRP vs OSPF: advanced distance vector vs link state
DUAL and the feasibility condition
EIGRP's DUAL algorithm keeps, for each prefix, a successor (the best path, with its feasible distance, FD) and, when one exists, a feasible successor (a loop-free backup). The feasibility condition decides: a neighbour is a feasible successor if its reported distance (RD) — its own distance to the prefix — is strictly less than the current FD. That one inequality guarantees loop-freedom: a neighbour whose distance is already smaller than yours cannot be routing through you.

Example from the book: a successor route has FD 30,720. A neighbour advertises the same prefix with RD 28,160. 28,160 < 30,720, so it is a feasible successor — even though its own FD via that neighbour (33,280) is higher than the successor's FD. The comparison is RD against FD, not FD against FD. That is the exam's favourite EIGRP trap.
The metrics, side by side
| Property | EIGRP | OSPF |
|---|---|---|
| Type | Advanced distance vector (DUAL) | Link state (SPF / Dijkstra) |
| Metric | 256 × [(10,000,000 ÷ lowest bandwidth in kbps) + (total delay in tens of microseconds)] — default K-values use bandwidth and delay only | Cost = reference bandwidth ÷ interface bandwidth (default reference 100 Mbps, so 100 Mbps = cost 1) |
| Load balancing | Equal-cost by default; unequal-cost with variance | Equal-cost only |
| Convergence | Feasible successor: instant, no recomputation | SPF run after LSA flooding |
| Scaling | Good; query scope bounded by stub | Good; areas bound flooding scope |
EIGRP's variance permits unequal-cost load balancing: any feasible successor whose metric is within the variance multiplier of the successor's FD can carry traffic. Without variance, only equal-cost paths load-balance. OSPF has no equivalent — it load-balances equal-cost paths only.
A successor route has FD 30,720. A neighbour advertises the same prefix with RD 28,160 and an FD-via-neighbour of 33,280. Is it a feasible successor?
Answer: Yes. The feasibility condition compares the neighbour's reported distance (28,160) with the current feasible distance (30,720). 28,160 < 30,720, so it qualifies — the higher FD-via-neighbour is irrelevant to the test.
4.2 OSPFv2/v3 multi-area design
One map, one tree per router
OSPF is link state: every router builds the same map (the link-state database) and runs SPF (Dijkstra) to compute its own shortest-path tree. Two routers with the same map compute consistent trees — that is why OSPF converges cleanly and why a corrupted or filtered LSA breaks it in ways that are diagnosable from the database itself (show ip ospf database).
LSA types and flooding scope
| LSA | Originator | Describes | Scope |
|---|---|---|---|
| Type 1 — Router | Every router | Its own links and neighbours | Its area |
| Type 2 — Network | DR on a broadcast segment | The segment's routers | Its area |
| Type 3 — Summary | ABR | A prefix from another area | Into an area |
| Type 4 — ASBR Summary | ABR | How to reach the ASBR | Into an area |
| Type 5 — External | ASBR | Redistributed external prefix | Whole OSPF domain (except stubs) |
| Type 7 — NSSA External | ASBR in an NSSA | External prefix inside the NSSA | The NSSA only; ABR converts to Type 5 |
Scope is the examinable property: it decides which area types may receive which LSAs. A stub area admits no Type 5; a totally stubby area admits neither Type 3 nor Type 5 (only a default route from the ABR); an NSSA admits external routes as Type 7, which the ABR translates to Type 5 on the way out.

| Area type | Admits | Configuration note |
|---|---|---|
| Normal | Types 1, 2, 3, 4, 5 | Default |
| Stub | Types 1, 2, 3 + default route | area <n> stub — flag must match on every router in the area |
| Totally stubby | Types 1, 2 + default route only | area <n> stub no-summary — ABR only |
| NSSA | Types 1, 2, 3, 7 + default | area <n> nssa — ABR converts Type 7 to Type 5 |
| Totally NSSA | Types 1, 2, 7 + default only | area <n> nssa no-summary — ABR only |
The stub/NSSA flag must match on every router in the area — a mismatch breaks the adjacency, and the error is in the hello, not in the database. And no-summary is an ABR-only instruction: configuring it on an internal router does nothing. When an area "should be stubby but still receives Type 3s", check which router carries the no-summary keyword.
Adjacency: states, network types, and the DR/BDR
OSPF neighbours walk a state machine: Down → Init → 2-Way → ExStart → Exchange → Loading → Full. The exchange that matters is the database description (DBD) exchange in ExStart/Exchange — routers compare database summaries and request what they lack. On a broadcast segment, the DR/BDR election decides who originates the Type 2 LSA and who floods: highest priority wins, then highest router ID; a priority of 0 never becomes DR or BDR. ENCOR configures point-to-point and broadcast network types; the NBMA family is tested as concepts and troubleshooting. A virtual link crosses a transit area to connect a remote area to Area 0 — a repair, not a design.
OSPFv3: topology and prefixes travel separately
OSPFv3 separates the topology from the prefixes: router and network LSAs describe the topology, while intra-area prefix LSAs carry the addresses. It runs over IPv6 link-local addresses for neighbourship, supports multiple address families (IPv4 and IPv6 in one process), and otherwise follows the same area, cost, and adjacency rules as OSPFv2. The exam's OSPFv3 question is usually about that separation — or about the fact that OSPFv3 neighbours form over link-local addresses.
Summarization and filtering: the three honest places
There are three honest places to summarise or filter OSPF, and the exam asks you to pick between them: at the ABR (inter-area summarization with area <n> range), at the ASBR (external summarization with summary-address), and at the router (a distribute-list or prefix-list filtering what enters the RIB — which filters locally, without changing what the router advertises). A summary that is wider than its area is the classic fault: it swallows prefixes that belong elsewhere. Filter on the ABR for what leaves an area; filter on the ASBR for what enters the domain.
Build the two-area branch from the book's workshop: Area 0 at HQ, Area 1 at the branch, four /24s at the branch summarised to one /22 at the ABR. Verify with show ip route on the HQ router (one /22, not four /24s), then break it: widen the summary to a /21 and watch a neighbouring prefix disappear into it.
4.3 eBGP between directly connected neighbours
Session states and best-path selection
BGP sessions walk Idle → Connect → Active → OpenSent → OpenConfirm → Established. A session stuck in Active usually means TCP 179 never connected — check reachability and ACLs before anything else. Once established, BGP picks one best path per prefix by walking a ladder, first difference wins:

| Step | Rule |
|---|---|
| 1 | Highest Weight (Cisco-local; never leaves the router) |
| 2 | Highest Local Preference (carried inside the AS) |
| 3 | Locally originated (network/aggregate beats redistributed) |
| 4 | Shortest AS path |
| 5 | Lowest origin code (i < e < ?) |
| 6 | Lowest MED — only compared within the same neighbouring AS |
| 7 | eBGP over iBGP |
| 8 | Lowest IGP metric to the next hop |
| 9–10 | Oldest eBGP path, then lowest router ID |
Path attributes fall into categories that predict behaviour: well-known mandatory (AS path, next hop, origin — every BGP speaker understands and every update carries them), well-known discretionary (local preference, atomic aggregate), optional transitive (community, aggregator — carried even if not understood), and optional non-transitive (MED, originator ID — dropped if not understood). The category tells you whether an attribute survives a hop.
MED is the most misread step on the ladder. It is compared only between paths from the same neighbouring AS — a lower MED from AS 65001 never beats a path from AS 65002. And weight beats everything, but only on the router where it is set: it is the local administrator's override, invisible to every other router.
4.4 Policy-based routing
PBR forwards packets by policy instead of by the routing table: a route-map matches traffic (an ACL) and sets the next hop, the outgoing interface, or both. It sits before the routing table in the forwarding decision — a PBR match wins over the best route. The confusion is set ip default next-hop: it is weaker than the table, not stronger — it applies only when the routing table has no route for the destination. Plain set ip next-hop overrides the table; the default variant is a last resort. Verify with show route-map and show ip policy, and remember PBR applies on the ingress interface of the traffic it matches.
Deep Dive — the journey of 172.16.9.0/24
The chapter's Deep Dive follows one prefix — 172.16.9.0/24 — end to end across the reference enterprise: originated in an EIGRP branch, redistributed into OSPF at the ASBR as a Type 5 LSA, summarised at the ABR, carried across Area 0, and advertised to a provider via eBGP. At each boundary the prefix changes form — metric, LSA type, attribute — but it stays the same prefix. The lesson is that routing protocols do not move packets; they move information about prefixes, and every boundary re-describes the prefix in the new protocol's language.
Configuration Workshop — the two-area branch
- EIGRP feasibility. Configure three routers advertising one prefix with different reported distances. Predict the feasible successor from the RD/FD comparison before running
show ip eigrp topology, then shut the successor and watch the feasible successor take over without a query. - OSPF multi-area. Build Area 0 + Area 1 + a stub area. Verify the LSA types in each area's database, then convert the stub to totally stubby and confirm the Type 3s disappear.
- eBGP. Configure eBGP between two directly connected neighbours in different autonomous systems. Advertise one prefix each way, then walk the best-path ladder on a prefix received from two providers.
- PBR. Policy-route CertCrack.com's training-platform traffic out the MPLS link and everything else out the internet link, using a route-map with
set ip next-hop. Verify withshow route-mapcounters.
Common mistakes and exam traps — Routing
| Trap | Truth |
|---|---|
| Feasible successor needs the lowest FD | It needs RD < FD. FD-via-neighbour is not part of the test. |
| OSPF cost uses the interface's configured bandwidth | Cost = reference bandwidth ÷ bandwidth; raise the reference for links above 100 Mbps or they all cost 1. |
| A stub area still receives Type 5 LSAs | Stub admits no Type 5; the ABR injects a default route instead. |
| MED compares across different neighbour ASes | MED compares only within the same neighbouring AS. |
set ip default next-hop overrides the routing table | It is weaker than the table — it applies only when no route exists. |
End-of-chapter check questions (multiple choice)
Answer these without looking back, then check against the key. Each question has one correct answer. These questions are written fresh for this guide — they are not the book's mock-test questions.
An EIGRP successor route has a feasible distance of 40,000. A neighbour advertises the same prefix with a reported distance of 25,000, and the path through that neighbour would have a feasible distance of 44,000. Is that neighbour a feasible successor?
A) No, because 44,000 is higher than the successor's 40,000 B) Yes, because its reported distance (25,000) is lower than the current feasible distance (40,000) C) No, because a feasible successor must advertise the lowest feasible distance D) Yes, but only after variance is configured
Which EIGRP feature permits unequal-cost load balancing?
A) The feasibility condition B) The variance command C) Stub routing D) Route summarization
With the default reference bandwidth of 100 Mbps, what is the OSPF cost of a 10 Mbps link?
A) 1 B) 10 C) 100 D) 1,000
Which OSPF LSA type does an ABR generate to advertise a prefix from one area into another area?
A) Type 1, Router LSA B) Type 2, Network LSA C) Type 3, Summary LSA D) Type 5, External LSA
An area is configured as stub, but its routers still receive Type 5 LSAs. What is the most likely cause?
A) The stub flag does not match on every router in the area B) The ABR has no default route C) The area is actually a totally stubby area D) Type 5 LSAs are always flooded into stub areas
A BGP session is stuck in Active state. What does that most likely mean?
A) The BGP timers mismatch B) TCP port 179 never connected — check reachability and ACLs C) The AS numbers match D) The best-path ladder has no winner
Two BGP paths to the same prefix differ only in MED: 100 from AS 65001 and 50 from AS 65002. Which path wins, and why?
A) The MED 50 path, because lower MED always wins B) MED is not compared across different neighbouring ASes, so the decision falls to a later step C) The MED 100 path, because higher MED wins D) Neither — BGP rejects both
What is the first step of the Cisco BGP best-path selection algorithm?
A) Shortest AS path B) Highest local preference C) Highest weight D) Lowest MED
What does set ip default next-hop in a PBR route-map do differently from set ip next-hop?
A) It overrides the routing table unconditionally B) It applies only when the routing table has no route for the destination C) It sets the next hop for all traffic, including locally generated D) It is the same command with a different name
Which OSPFv3 fact distinguishes it from OSPFv2 in how routes are carried?
A) OSPFv3 has no areas B) OSPFv3 separates topology (router/network LSAs) from prefixes (prefix LSAs) C) OSPFv3 uses distance-vector logic D) OSPFv3 neighbours form over global unicast addresses only
Answer key
Chapter 4 — based on the Cisco 350-401 ENCOR v1.2 exam objectives for Domain 3.0 (objective 3.2). Unofficial study material — not affiliated with or endorsed by Cisco Systems, Inc.
Want the full CCNP Enterprise Core (350-401 ENCOR) package?
Read this guide free. Then prove you're ready with 900 original practice questions, instant explanations, 36 interactive PBQ labs, and 3 months of online access — plus the downloadable PDF of this guidebook.
Get CCNP ENCOR Full Access — $10