Network Implementation 20% Lesson 2 of 14

Lesson 2.1.2 — Dynamic Routing Protocols: OSPF, EIGRP & BGP

Avatar Of Asad IjazAsad Ijaz ·Sep 17, 2026 ·8 min read
14% through domain
Illustration Of A Mesh Network, A Pair Of Interlocking Gears, And A Globe With Connecting Arcs

Domain 2.0 | Network Implementation — 20% of exam

Learning Objectives

By the end of this lesson, you will be able to:

  • Distinguish interior gateway protocols (IGPs) from exterior gateway protocols (EGPs)
  • Classify routing protocols by algorithm type: link-state, distance-vector, and path-vector
  • Explain OSPF’s core characteristics, including areas, the DR/BDR election, and its cost metric
  • Explain EIGRP’s core characteristics, including its composite metric and hybrid classification
  • Explain BGP’s core characteristics, including autonomous systems, eBGP vs. iBGP, and its role on the internet

Key Terms

TermDefinition
Dynamic Routing ProtocolA protocol that automatically discovers, advertises, and updates routes between routers without manual configuration
IGP (Interior Gateway Protocol)A routing protocol designed to operate within a single autonomous system (OSPF, EIGRP)
EGP (Exterior Gateway Protocol)A routing protocol designed to exchange routes between different autonomous systems (BGP)
Autonomous System (AS)A network or group of networks under a single administrative authority, identified by a unique AS number
Link-State ProtocolA routing protocol (like OSPF) where every router builds a complete map of the network topology and calculates the best path itself
ConvergenceThe state where all routers in a network have consistent, up-to-date routing information after a topology change

Explanation

From Static to Dynamic: Why Automate Route Discovery

Lesson 2.1.1 covered static routing and the three-step route selection process — longest prefix match, administrative distance, and metric. That lesson mentioned dynamic routing only in passing. This one is where dynamic routing actually gets explained.

A dynamic routing protocol lets routers discover networks and exchange that information automatically, without an administrator typing in every path by hand. When a link fails, routers running a dynamic protocol detect the change and recalculate paths on their own — something a static route can never do. The tradeoff is complexity: dynamic protocols consume CPU and bandwidth for their calculations and advertisements, and they require an administrator who actually understands how the protocol behaves.

Network+ doesn’t expect you to configure these protocols the way a CCNA-level exam would — the objective here is to explain characteristics, not build configurations. That means the exam cares about what makes each protocol distinct, how they’re classified, and which one fits which situation.

Classifying Routing Protocols

Before looking at OSPF, EIGRP, and BGP individually, it helps to understand the two classification systems the exam expects you to know.

By scope — IGP vs. EGP:

  • An Interior Gateway Protocol (IGP) operates within a single autonomous system (AS) — one organization’s network, under one administrative authority. OSPF and EIGRP are both IGPs.
  • An Exterior Gateway Protocol (EGP) exchanges routes between different autonomous systems. BGP is the only EGP in wide use today, and it’s effectively the protocol that holds the entire internet together.

By algorithm — link-state, distance-vector, and path-vector:

  • A distance-vector protocol (like RIP) only knows what its directly connected neighbors tell it — “here’s what I can reach, and how far away it is.” It has no real picture of the broader topology.
  • A link-state protocol (like OSPF) has every router build a complete map of the entire network topology, then independently calculate the shortest path using that full picture.
  • EIGRP occupies its own category, often called advanced distance-vector or hybrid — it shares some distance-vector behavior but adds link-state-like features for much faster convergence.
  • BGP uses a path-vector approach — it tracks the entire sequence of autonomous systems a route has passed through, which is what makes it suited for internet-scale routing between organizations that don’t trust each other’s internal topology.
Diagram Showing Interior Gateway Protocols Operating Within An Autonomous System And Bgp Operating Between Autonomous Systems
How Interior And Exterior Gateway Protocols Divide Routing Responsibility

How Interior and Exterior Gateway Protocols Divide Routing Responsibility

OSPF: Link-State Routing Within an Autonomous System

OSPF (Open Shortest Path First) is the most widely deployed IGP in enterprise networks, and for good reason — it’s an open standard (not tied to one vendor), it scales well, and it converges quickly after a topology change.

OSPF routers exchange link-state information with each other and each build an identical topology database, then run the Dijkstra shortest-path-first algorithm independently to calculate the best route to every destination. Because every router does this calculation from the same complete picture, OSPF converges fast and avoids the routing loops that plague simpler protocols.

A few OSPF-specific characteristics show up often on the exam:

  • Areas. Large OSPF networks are divided into areas to limit the size of the topology database any one router has to maintain. Area 0 is always the backbone area, and every other area must connect back to it, either directly or through a virtual link.
  • DR/BDR election. On multi-access networks (like an Ethernet segment with several routers), OSPF elects a Designated Router (DR) and Backup Designated Router (BDR) to reduce the number of adjacencies that need to form, cutting down on unnecessary link-state traffic.
  • Cost metric. OSPF’s metric is cost, calculated from cumulative interface bandwidth along the path — lower cost is preferred, just as covered in the route selection lesson.
  • Administrative distance: 110.
Diagram Showing Ospf Area 0 As The Backbone With Other Areas Connected To It, And A Dr/Bdr Election On A Multi-Access Segment
How Ospf Divides A Network Into Areas And Elects A Designated Router

How OSPF Divides A Network Into Areas And Elects A Designated Router

EIGRP: Cisco’s Hybrid Routing Protocol

EIGRP (Enhanced Interior Gateway Routing Protocol) was originally a Cisco-proprietary protocol, later opened up in limited form, and it’s still primarily seen in Cisco-heavy environments. It’s classified as a hybrid or advanced distance-vector protocol because it borrows ideas from both worlds.

EIGRP’s defining features:

  • Composite metric. By default, EIGRP calculates its metric using a formula that factors in bandwidth and delay (and can optionally include load and reliability), producing a much more nuanced path calculation than a simple hop count.
  • DUAL algorithm. The Diffusing Update Algorithm lets EIGRP routers keep a backup route (a “feasible successor”) ready in advance, so when the primary path fails, EIGRP can often switch to the backup almost instantly instead of recalculating from scratch.
  • Two administrative distances. Routes learned from within the same EIGRP autonomous system use AD 90. Routes redistributed into EIGRP from an external source use AD 170 — a distinction worth remembering, since it’s the same “internal vs. external” pattern that shows up again with BGP.

Because EIGRP pre-computes backup paths before they’re needed, it typically converges faster than OSPF in many topologies, which is one of its main selling points in Cisco-centric designs.

BGP: Routing Between Autonomous Systems

BGP (Border Gateway Protocol) is in a category of its own. Where OSPF and EIGRP manage routing inside one organization’s network, BGP manages routing between organizations — it’s the protocol that connects internet service providers, large enterprises, and content networks to each other across the public internet.

Key BGP characteristics:

  • Runs over TCP port 179. Unlike OSPF and EIGRP, which operate directly over IP, BGP rides on top of TCP, benefiting from TCP’s built-in reliability for exchanging routing information between routers that may be many hops apart and don’t inherently trust each other.
  • AS numbers. Every organization participating in BGP is identified by an autonomous system number (ASN), distinguishing its network from every other network on the internet.
  • eBGP vs. iBGP. External BGP (eBGP) runs between routers in different autonomous systems — this is the classic “connect to your ISP” scenario. Internal BGP (iBGP) runs between routers within the same autonomous system, typically used when an organization has multiple internet-facing routers that need consistent routing information.
  • Administrative distance. eBGP routes default to AD 20 — more trusted than any IGP. iBGP routes default to AD 200 — less trusted than any IGP, reflecting that internally-learned BGP information is treated more cautiously than a route your own IGP already worked out.
Diagram Comparing Ebgp Sessions Between Autonomous Systems And Ibgp Sessions Within One Autonomous System
How External Bgp And Internal Bgp Peering Differ Within And Between Autonomous Systems

How External BGP And Internal BGP Peering Differ Within And Between Autonomous Systems

BGP’s path-vector approach means it doesn’t just track a metric — it tracks the actual list of autonomous systems a route has traversed (the AS path), which lets a router immediately reject any route that loops back through its own AS, and gives administrators a rich set of attributes to base routing policy decisions on, well beyond a simple “shortest path” calculation.

Comparing the Three Protocols

OSPFEIGRPBGP
ScopeIGPIGPEGP
Algorithm typeLink-stateHybrid / advanced distance-vectorPath-vector
MetricCost (bandwidth-based)Composite (bandwidth + delay)Path attributes / AS path
TransportDirectly over IPDirectly over IPTCP port 179
Administrative distance11090 (internal) / 170 (external)20 (eBGP) / 200 (iBGP)
Typical use caseEnterprise interior routing, vendor-neutralCisco-centric enterprise interior routingInternet backbone, ISP and large-enterprise edge routing

Notice how this table connects directly back to the route selection lesson: if a router somehow learned the same prefix from both OSPF and EIGRP, the lower AD (EIGRP’s 90) would win — but remember, that comparison only ever happens after longest prefix match has already been checked.

Where This Fits Into the Bigger Picture

Static routing, covered in the previous lesson, and these three dynamic protocols aren’t really competitors — they’re tools an organization mixes based on need. A branch office might run a simple static default route, an enterprise campus might run OSPF or EIGRP internally, and that same enterprise’s edge router might run BGP to peer with its internet service provider — sometimes all in the same network, at different points.

The next lesson moves into NAT and PAT, which is where these routing concepts start interacting directly with address translation at the edge of a network — often the exact same edge router running BGP toward the internet.

Recognition-Level Verification Concepts

A few patterns are worth recognizing on sight:

  • A routing protocol operating strictly within one organization’s network is an IGP (OSPF, EIGRP); one connecting separate organizations’ networks is an EGP (BGP).
  • A router with a complete topology map, calculating shortest paths independently, points to a link-state protocol like OSPF.
  • Traffic or configuration referencing “Area 0” is unmistakably OSPF.
  • A session established over TCP port 179 is BGP — the only major routing protocol that rides on TCP.
  • An AS path attribute listing a sequence of autonomous system numbers is a BGP-specific concept, not something OSPF or EIGRP track.

Common Exam Traps

  • IGP vs. EGP is a scope distinction, not a quality distinction. OSPF and EIGRP aren’t “worse” than BGP — they’re built for a completely different job (inside one network vs. between networks).
  • EIGRP is not a pure distance-vector protocol. Calling it “just like RIP” is a common mistake — its DUAL algorithm and composite metric put it in its own hybrid category.
  • OSPF and EIGRP have different default administrative distances, and EIGRP has two of its own (90 internal, 170 external). Don’t assume every IGP shares one AD.
  • BGP’s two administrative distances (20 for eBGP, 200 for iBGP) are easy to mix up — eBGP is more trusted than any IGP, while iBGP is less trusted than any IGP. That asymmetry is intentional and frequently tested.
  • BGP runs over TCP port 179; OSPF and EIGRP do not use TCP or UDP ports at all — they operate directly over IP. This contrast is a favorite exhibit-question setup.

Lesson 2.1.2 Practice Quiz — Dynamic Routing Protocols (OSPF, EIGRP & BGP)

17 questions covering IGP vs EGP, link-state/distance-vector/path-vector classification, and the specific characteristics of OSPF, EIGRP, and BGP.

N10-009 · Domain 2.1
Question 1Plain
Which classification best describes BGP?
BGP is the exterior gateway protocol used to exchange routes between different autonomous systems — effectively the routing protocol of the internet.
Question 2Plain
What is OSPF's default administrative distance?
OSPF's default administrative distance is 110.
Question 3Plain
Which algorithm allows EIGRP to pre-compute a backup route and converge almost instantly if the primary path fails?
EIGRP's DUAL algorithm keeps a feasible successor (backup route) ready in advance, enabling near-instant convergence when the primary path fails.
Question 4Choose Two
Which two statements about OSPF are correct? (Choose two.)
OSPF is link-state, and Area 0 is always its backbone area. Path-vector and TCP port 179 both describe BGP, not OSPF.
Question 5Choose Two
Which two administrative distances are associated with EIGRP? (Choose two.)
EIGRP uses AD 90 for routes learned within its own autonomous system and AD 170 for routes redistributed from an external source. 110 is OSPF; 120 is RIP.
Question 6Choose Two
Which two statements about BGP are correct? (Choose two.)
BGP is path-vector and runs over TCP port 179. It is not link-state (that's OSPF), and autonomous systems are central to how BGP identifies and routes between networks.
Question 7Scenario
A network engineer wants an interior routing protocol that pre-computes backup paths so that convergence after a link failure is nearly instantaneous. Which protocol characteristic best fits this need?
EIGRP's DUAL algorithm keeps a pre-computed feasible successor ready, giving it especially fast convergence compared to protocols that must recalculate from scratch.
Question 8Scenario
An enterprise's edge router needs to establish a routing relationship with its internet service provider's router, exchanging full internet routing tables between two separate organizations. Which type of session is this?
A BGP session between routers in two different autonomous systems (an enterprise and its ISP) is eBGP, external BGP.
Question 9Scenario
A large campus network is divided into multiple routing zones to limit the size of each router's topology database, with one zone designated as the mandatory backbone that every other zone must connect back to. Which protocol and feature does this describe?
This is OSPF's area design — Area 0 is always the mandatory backbone, and every other area connects back to it, directly or via a virtual link.
Question 10Scenario
An organization has two internet-facing edge routers within the same autonomous system that both need consistent, synchronized BGP routing information. Which type of session connects them?
Two routers within the same autonomous system exchanging BGP information use iBGP, internal BGP.
Question 11Scenario
A router learns a route to the same prefix from both OSPF and EIGRP, with no longer prefix match available to break the tie. Which route is installed?
Assuming the more common internal EIGRP AD of 90, EIGRP's lower AD beats OSPF's 110, so the EIGRP route wins — a direct application of the route selection order from the previous lesson.
Question 12Exhibit
Based on this session log, which routing protocol is in use?
Router# show ip sockets Proto Local Address Foreign Address State TCP 10.0.0.1:179 10.0.0.2:52210 ESTABLISHED
Port 179 over TCP is the signature of BGP — the only major routing protocol that establishes a TCP session rather than operating directly over IP.
Question 13Exhibit
Based on this OSPF interface output, what role does R1 hold on this multi-access segment?
R1# show ip ospf interface GigabitEthernet0/0 GigabitEthernet0/0 is up, line protocol is up Area 0, Process ID 1 Network Type BROADCAST, Cost: 1 Designated Router (ID) 10.0.0.1, Interface address 10.0.0.1 Backup Designated Router (ID) 10.0.0.2, Interface address 10.0.0.2
The Designated Router ID matches R1's own interface address (10.0.0.1), confirming R1 won the DR election on this broadcast segment in Area 0.
Question 14Exhibit
Based on the metric format shown in this routing table entry, which protocol most likely generated it?
D 172.16.4.0/24 [90/3072016] via 10.0.0.6, 00:02:11, GigabitEthernet0/1
The "D" route code is EIGRP's designation, AD 90 matches EIGRP's internal default, and the large metric value (3072016) reflects EIGRP's composite bandwidth-and-delay calculation rather than a simple cost or hop count.
Question 15Exhibit
Based on this BGP table entry, what does the bracketed sequence of numbers in the AS Path field represent?
Router# show ip bgp 203.0.113.0/24 BGP routing table entry for 203.0.113.0/24 Paths: (1 available) AS Path: 65010 65020 65030, path is valid, is best
BGP's AS Path attribute lists the autonomous systems a route has traversed — the defining feature of its path-vector approach, and something OSPF and EIGRP have no equivalent for.
Question 16Exhibit
Based on this pair of BGP neighbor entries, which one is the eBGP session and which is iBGP?
Neighbor AS State 203.0.113.5 65099 Established (local AS: 65010) 10.0.0.9 65010 Established (local AS: 65010)
The neighbor in AS 65099 differs from the local AS (65010), making it eBGP. The neighbor in the same AS (65010) is iBGP.
Question 17Exhibit
Given these two routing table entries for the identical prefix, which one is installed?
B 198.51.100.0/24 [20/0] via 203.0.113.5 (eBGP) B 198.51.100.0/24 [200/0] via 10.0.0.9 (iBGP)
eBGP's default AD of 20 is lower (more trusted) than iBGP's default AD of 200, so the eBGP-learned route wins.
📝

Summary

Dynamic routing protocols automatically discover and update routes; IGPs (OSPF, EIGRP) operate within one autonomous system, while the EGP BGP operates between autonomous systems.

OSPF is a link-state protocol using areas, a DR/BDR election on multi-access segments, and a bandwidth-based cost metric; its administrative distance is 110.

EIGRP is a hybrid/advanced distance-vector protocol using a composite bandwidth-and-delay metric and the DUAL algorithm for fast convergence; its administrative distances are 90 (internal) and 170 (external).

BGP is a path-vector protocol running over TCP port 179, using autonomous system numbers and an AS path attribute; eBGP (AD 20) connects different autonomous systems, while iBGP (AD 200) connects routers within the same one.

These protocols aren't competitors — real networks commonly combine static routes, an IGP, and BGP, each handling a different part of the routing picture.

Avatar Of Asad Ijaz

Lead Networking Architect and Editor at NetworkUstad. BS in Computer Networks and Security, CCNP and CCNA certified, with 11+ years of experience in enterprise network design, implementation, and troubleshooting. Writes practical tutorials on routing, IPv4 management, network automation, and security fundamentals.