Fundamentals 25 min read

Mastering Routing Protocols: OSPF, EIGRP, RIP, IS‑IS, and BGP Explained

This comprehensive guide explains the purpose, types, metrics, and convergence behavior of major routing protocols—including static, dynamic, distance‑vector, and link‑state protocols such as OSPF, EIGRP, RIP, IS‑IS, and BGP—while detailing their selection algorithms, administrative distances, and key configuration concepts.

Open Source Linux
Open Source Linux
Open Source Linux
Mastering Routing Protocols: OSPF, EIGRP, RIP, IS‑IS, and BGP Explained

Routing Protocol Overview

Routing protocols aim to provide end‑to‑end network‑layer connectivity, selecting a forward and reverse path for each session.

Routing tables consist of routes learned from various sources: connected, static, default, or dynamic. Connected and dynamic routes are learned automatically; static and default routes are manually configured.

Static vs Dynamic

Static, default, and connected routes are the most common. Static and default routes have administrative distance 1 and metric 0. Static routes have lower administrative distance than any dynamically learned route and are preferred.

Static routes are not advertised to neighbors unless redistributed by a dynamic protocol. Connected routes are generated automatically when an interface with an IP address is enabled, with administrative distance 0, outranking all other types.

Dynamic routing protocols exchange routing information with neighbors; administrators do not configure routes manually. Common protocols include OSPF, EIGRP, RIP, IS‑IS, BGP, supporting both IPv4 and IPv6.

“Each routing protocol differs in how it learns, updates, and advertises routes to neighbors.”

Distance‑Vector vs Link‑State

Dynamic protocols are classified as link‑state or distance‑vector. Distance‑vector protocols (e.g., RIP) periodically flood full routing tables to all neighbors, causing slower convergence in large networks. Link‑state protocols (e.g., OSPF, IS‑IS) send event‑triggered updates, resulting in faster convergence.

Distance‑vector protocols regularly broadcast entire routing tables, which can lead to routing storms and slower convergence as network size grows; link‑state protocols only send partial updates when topology changes occur, improving scalability.

Routing Selection Algorithm

Routers install routes from dynamic protocols (OSPF, EIGRP, IS‑IS, BGP), static routes, default routes, and connected routes. When multiple routes to the same destination exist, the route with the lowest administrative distance is installed; if distances are equal, the route with the lowest metric is chosen. Equal‑cost routes may be load‑balanced.

Longest‑match rule selects the route with the most specific prefix.

Install route = lowest administrative distance → multiple sources

Install route = lowest metric → same protocol

Select route = longest‑match rule → multiple routes and sources

If none, select default route

If no default, drop packet and send ICMP unreachable

Open Shortest Path First (OSPF)

OSPF is a link‑state IGP that builds a global topology database by exchanging LSAs. It supports multiple areas with a mandatory backbone area 0. OSPF routers are classified as backbone, normal, ABR, and ASBR.

LSA types include Router (type 1), Network (type 2), Summary (type 3), Summary ASBR (type 4), External (type 5), and NSSA (type 7).

OSPF runs Dijkstra’s SPF algorithm to compute shortest paths, uses event‑triggered updates, and supports load‑balancing across up to six equal‑cost paths.

router ospf 1
auto-cost reference-bandwidth 1000

Enhanced Interior Gateway Routing Protocol (EIGRP)

EIGRP is a Cisco‑proprietary advanced distance‑vector protocol with features of both distance‑vector and link‑state protocols. It uses the DUAL algorithm to calculate feasible distances and selects successors and feasible successors for backup routes.

Metrics are based on bandwidth and delay, with optional K‑values for other factors. EIGRP supports unequal‑cost load‑balancing across up to four paths by default.

Routing Information Protocol (RIP)

RIP is an early distance‑vector protocol designed for small networks, using hop count as its metric (maximum 15 hops). RIPv2 adds classless routing, subnet mask in updates, and authentication.

Intermediate System to Intermediate System (IS‑IS)

IS‑IS is a link‑state IGP used mainly in large service‑provider networks. It builds a complete topology database and uses Dijkstra’s algorithm for shortest‑path calculation. It supports multiple hierarchy levels (L1/L2) and uses administrative distance 115.

Border Gateway Protocol (BGP)

BGP is the de‑facto Internet routing protocol, an external gateway protocol (EGP) that operates as a path‑vector protocol. It exchanges AS‑path information, supports both IPv4 and IPv6, and uses attributes such as weight, local preference, and AS‑path length for best‑path selection.

BGP does not perform load‑balancing by default; policies can be applied to influence path selection.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

routingBGPOSPFEIGRP
Open Source Linux
Written by

Open Source Linux

Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.