Static vs Dynamic Routing
Before diving into protocols, understand the fundamental choice every network uses:
| Type | How It Works | Best For | Drawback |
|---|---|---|---|
| Static Routing | Admin manually configures every route on every router | Small networks, stub networks with one path, point-to-point WAN links | Does not adapt to failures — if a link goes down, traffic stops until admin updates routes manually |
| Dynamic Routing | Routers automatically exchange routing information and update their tables | Medium and large networks, networks with redundant paths | Uses bandwidth and CPU; adds protocol complexity; must be secured against route injection |
| Default Route | A catch-all route (0.0.0.0/0) that matches any destination not in the routing table | Edge routers sending unknown traffic to the ISP | Sends all unknown traffic one direction — can mask routing problems |
Administrative Distance — How Routers Choose Between Protocols
When a router learns the same route from multiple sources (static config, OSPF, and EIGRP all know about 192.168.1.0/24), it uses Administrative Distance (AD) to decide which route to prefer. Lower AD = more trusted = preferred. This is one of the most tested routing concepts on the Network+ exam.
| Route Source | Administrative Distance | Exam Note |
|---|---|---|
| Directly Connected | 0 | Most trusted — the router is directly on this network |
| Static Route | 1 | Admin-configured — trusted almost as much as directly connected |
| EIGRP (Internal) | 90 | Cisco proprietary — preferred over OSPF when both present |
| OSPF | 110 | Open standard — preferred over RIP |
| RIP | 120 | Legacy — least preferred of the common IGPs |
| EIGRP (External) | 170 | Routes redistributed into EIGRP from another protocol |
| BGP (External) | 20 | eBGP is trusted more than most IGPs — internet routes are precious |
Remember: lower AD wins. "0 = connected, 1 = static, 90 = EIGRP, 110 = OSPF, 120 = RIP." The exam often asks "A router has a route to 10.0.0.0/8 learned from both OSPF and RIP — which route goes in the table?" Answer: OSPF (AD 110) beats RIP (AD 120).
Distance-Vector vs Link-State — The Two Routing Approaches
| Property | Distance-Vector | Link-State |
|---|---|---|
| How it works | Each router shares its entire routing table with directly connected neighbours — "routing by rumour" | Each router shares the state of its own links with ALL routers in the area — builds a complete topology map |
| What routers know | Direction and distance (hop count or metric) to each destination | Complete map of the network topology — runs SPF algorithm to find shortest path |
| Convergence speed | Slow — updates only sent periodically; susceptible to routing loops | Fast — triggered updates sent immediately when topology changes |
| CPU/memory use | Low | Higher — maintains link-state database and runs SPF calculations |
| Loop prevention | Split horizon, route poisoning, holddown timers | Complete topology knowledge prevents loops |
| Examples | RIP, EIGRP (hybrid) | OSPF, IS-IS |
The Routing Protocols — In Depth
RIP is the oldest and simplest dynamic routing protocol. It uses hop count as its only metric — the number of routers a packet must pass through to reach the destination. Maximum hop count is 15 — any destination more than 15 hops away is considered unreachable. This hard limit makes RIP unsuitable for large networks.
RIP routers broadcast their entire routing table to all neighbours every 30 seconds. This wastes bandwidth and causes slow convergence — it can take minutes for the entire network to learn about a topology change. RIPv2 added subnet mask support (VLSM) and multicast updates; RIPng added IPv6 support.
OSPF is the dominant IGP in enterprise networks. It uses cost as its metric — calculated as 100 Mbps ÷ interface bandwidth. A 1 Gbps link has a cost of 1; a 100 Mbps link has a cost of 1 (same, which is why the reference bandwidth is often adjusted). OSPF runs the Dijkstra SPF algorithm to calculate the shortest path to every destination.
OSPF organises routers into areas to limit the scope of topology updates and SPF recalculations. Area 0 (backbone area) is required — all other areas must connect to Area 0. This hierarchical design makes OSPF scalable to very large networks. OSPF only sends updates when topology changes (not every 30 seconds like RIP), making convergence fast.
EIGRP is Cisco's proprietary protocol that combines characteristics of both distance-vector and link-state protocols — making it a "hybrid" or "advanced distance-vector" protocol. It uses a composite metric based on bandwidth and delay (load and reliability can also be included but rarely are). EIGRP's DUAL algorithm (Diffusing Update Algorithm) maintains a backup path (the "feasible successor") so that if the primary path fails, EIGRP can switch to the backup without recalculating.
EIGRP only sends updates for changed routes (not full table updates), uses multicast, and achieves very fast convergence. It's a popular choice in all-Cisco environments. An open version of EIGRP was published in 2016 but adoption outside Cisco environments is minimal.
BGP is the routing protocol of the internet. While IGPs (RIP, OSPF, EIGRP) route traffic within an organisation, BGP routes traffic between organisations (Autonomous Systems). Every ISP, cloud provider, and large enterprise uses BGP to exchange routes with each other. BGP runs on TCP port 179.
BGP is a path-vector protocol — it selects routes based on policies and path attributes rather than simple metrics. The primary attribute is the AS-PATH — the list of Autonomous System numbers a route has traversed. BGP prefers shorter AS paths, but operators can influence routing through a large set of attributes. BGP convergence is intentionally slow to prevent route flapping from destabilising the global routing table.
eBGP (External BGP) runs between different Autonomous Systems. iBGP (Internal BGP) runs between routers within the same AS to distribute externally learned routes internally.
Quick Comparison — All Four Protocols
| Protocol | Type | Metric | AD | Port/Transport | Use Case |
|---|---|---|---|---|---|
| RIP v2 | Distance-vector IGP | Hop count (max 15) | 120 | UDP 520 | Legacy, small networks |
| OSPF | Link-state IGP | Cost (100M ÷ bandwidth) | 110 | IP protocol 89 | Enterprise standard |
| EIGRP | Hybrid IGP (Cisco) | Bandwidth + Delay | 90 | IP protocol 88 | Cisco networks |
| BGP | Path-vector EGP | Path attributes | 20 (eBGP) | TCP 179 | Internet, ISPs, multi-homing |
IGP (Interior Gateway Protocol) — routes traffic within a single Autonomous System (one organisation's network). RIP, OSPF, and EIGRP are all IGPs.
EGP (Exterior Gateway Protocol) — routes traffic between Autonomous Systems. BGP is the only EGP in use today. An Autonomous System (AS) is a network under a single administrative control, identified by an AS number (ASN). Every ISP has one or more ASNs. Large enterprises that connect to multiple ISPs (multi-homed) also have their own ASN.
Exam Scenarios
Preparing for Network+?
See the best study guides and practice exams for the N10-009 exam.