Book an info sessionInfo session

Routing protocols: RIP, OSPF, EIGRP, BGP — purpose and characteristics

CompTIA Network+ Preparation · lesson 13 of 30 · 25 min

Routing Fundamentals

A router forwards packets between networks based on its routing table. The routing table contains network prefixes and the next-hop or exit interface to reach them.

Route sources: Directly connected (C), Static routes (S), Dynamic routing protocols (R=RIP, O=OSPF, D=EIGRP, B=BGP).

Administrative Distance (AD) — trustworthiness of a route source. Lower AD = more trusted. When multiple sources advertise the same network, the route with the lowest AD wins.

Metric — cost of a route within a routing protocol. Lower metric = preferred path. Each protocol uses a different metric (hop count, bandwidth, composite).

Dynamic Routing Protocols

RIP (Routing Information Protocol) — distance-vector protocol. Metric: hop count (max 15 — 16 = unreachable). Sends full routing table every 30 seconds. RIPv2 supports CIDR and authentication. Slow convergence. Used only in small/legacy networks.

OSPF (Open Shortest Path First) — link-state protocol. Metric: cost (based on bandwidth — higher bandwidth = lower cost). Builds a complete topology map (LSDB). Uses Dijkstra’s SPF algorithm. Fast convergence. Scales well. Uses areas (Area 0 = backbone). Open standard — supported by all vendors.

EIGRP (Enhanced Interior Gateway Routing Protocol) — Cisco proprietary (now open). Advanced distance-vector (hybrid). Metric: composite (bandwidth + delay by default). Very fast convergence using DUAL algorithm. Supports unequal-cost load balancing.

BGP (Border Gateway Protocol) — the routing protocol of the internet. Path-vector protocol. Used between autonomous systems (ISPs, large enterprises). Metric: path attributes (AS path, local preference, MED). Extremely scalable but slow convergence. eBGP (between ASes) vs iBGP (within an AS).

Exam Tip

OSPF AD=110, EIGRP AD=90, RIP AD=120. Lower AD wins. OSPF uses cost (bandwidth-based). RIP uses hop count with max 15. BGP is the internet routing protocol. OSPF requires Area 0 (backbone area).

Key Terms

Key Terms

Knowledge Check — 10 Questions

Network+ — Routing Protocols

Which routing protocol has the lowest Administrative Distance (most trusted)?

  • OSPF (110)
  • RIP (120)
  • EIGRP (90)
  • Static route (1)

Answer: Static route (1)
Static routes have AD=1 (only directly connected routes at AD=0 are more trusted). EIGRP=90, OSPF=110, RIP=120.

RIP uses which metric?

  • Cost (bandwidth)
  • Hop count (max 15)
  • Delay
  • Path attributes

Answer: Hop count (max 15)
RIP metric = hop count. Maximum is 15 — a hop count of 16 means unreachable. This limits RIP to small networks.

OSPF calculates the best path using:

  • Bellman-Ford algorithm
  • Dijkstra’s SPF algorithm
  • DUAL algorithm
  • Distance-vector
  • Answer: Dijkstra’s SPF algorithm

OSPF uses Dijkstra’s Shortest Path First (SPF) algorithm on its Link-State Database to calculate the best routes. BGP is used for:

  • Routing within a single company network
  • Routing between autonomous systems on the internet
  • Small office networks
  • Wireless routing
  • Answer: Routing between autonomous systems on the internet

BGP is the internet’s routing protocol — it routes between autonomous systems (ISPs, large enterprises). It carries the global routing table.

OSPF requires which area to exist?

  • Area 1
  • Area 0 (backbone)
  • Area 255
  • No areas required

Answer: Area 0 (backbone)
OSPF Area 0 is the backbone area — all other areas must connect to Area 0 directly or via a virtual link.

EIGRP is primarily associated with which vendor?

  • Juniper
  • Cisco
  • HP
  • Aruba

Answer: Cisco
EIGRP was originally Cisco proprietary (now open standard). It is most commonly deployed in Cisco environments.

Which protocol has the fastest convergence?

  • RIP
  • BGP
  • EIGRP
  • They are all equal

Answer: EIGRP
EIGRP uses the DUAL algorithm with pre-computed backup routes — convergence is nearly instant. OSPF is also fast. RIP is slow (30-second updates).

OSPF metric (cost) is based on:

  • Hop count
  • Bandwidth — higher bandwidth = lower cost
  • Delay
  • Reliability
  • Answer: Bandwidth — higher bandwidth = lower cost

OSPF cost = reference bandwidth / interface bandwidth. Higher bandwidth interfaces have lower cost and are preferred.

If OSPF and RIP both advertise the same network, which route is installed?

  • RIP (120)
  • OSPF (110) — lower AD wins
  • Both are installed
  • Neither — conflict

Answer: OSPF (110) — lower AD wins
Administrative Distance determines which route wins when multiple protocols advertise the same network. OSPF AD=110 beats RIP AD=120.

BGP routes between _____ systems (ASes).

Answer: autonomous
BGP = Border Gateway Protocol — routes between Autonomous Systems. Each AS has a unique AS number (ASN).


Previous lesson: Network devices: switches, routers, firewalls, IDS/IPS, load balancers, VPN concentrators, NAS/SAN
Back to CompTIA Network+ Preparation
Next lesson: Spanning Tree Protocol: STP, RSTP, port roles, port states, BPDU