Every few months someone on the team asks me the same question: which routing protocol should we run? The honest answer is that it's rarely a single choice. Most networks I've worked on end up running two of these protocols, sometimes all three, each doing the job it was designed for. The trouble starts when someone picks a protocol because it's familiar, not because it fits the problem.
This runbook walks through OSPF, EIGRP and BGP the way I'd explain them to a colleague about to design a new site. We'll cover what each one is, how it actually works under the hood, why the differences matter in production, some real examples, and the misconceptions I keep running into.
What These Protocols Actually Are
All three are dynamic routing protocols, but they solve different problems and belong to different families.
OSPF (Open Shortest Path First) is a link-state interior gateway protocol defined in RFC 2328 for IPv4 and RFC 5340 for IPv6. Every router in an area builds an identical map of the topology, then independently runs Dijkstra's shortest path algorithm to calculate routes. It's an open standard and every vendor supports it.
EIGRP (Enhanced Interior Gateway Routing Protocol) is an advanced distance-vector protocol, sometimes called a hybrid. It was Cisco proprietary for years. Cisco published a basic version of it as RFC 7868 in 2016, but in practice you'll still mostly find it in Cisco-heavy shops. It uses the Diffusing Update Algorithm (DUAL) to compute loop-free paths and pre-computes backup routes called feasible successors.
BGP (Border Gateway Protocol, RFC 4271) is a path-vector protocol and the only exterior gateway protocol in common use. It's what holds the internet together. BGP doesn't care about link speeds or topology maps. It cares about policy: which paths you prefer, which you advertise, and to whom.
The first mental shift is this. OSPF and EIGRP answer the question what's the fastest way to get there inside my network? BGP answers what path am I willing to use, and what am I willing to tell other people about? Those are different questions.
How Each Protocol Works
OSPF: Everyone Has the Same Map
OSPF routers discover neighbors with Hello packets, form adjacencies, and exchange Link State Advertisements (LSAs). Each router stores these in a link-state database (LSDB). When the databases match across an area, every router runs SPF against it and builds its routing table. Cost is derived from interface bandwidth, by default reference bandwidth divided by link speed.
Scale is handled through areas. Area 0 is the backbone, and every other area must connect to it. Area Border Routers summarize routes between areas, which keeps LSDBs small and SPF runs fast. On broadcast segments, a Designated Router and Backup DR cut down on adjacency sprawl.
router ospf 1
router-id 10.0.0.1
auto-cost reference-bandwidth 100000
passive-interface default
no passive-interface GigabitEthernet0/0
network 10.10.0.0 0.0.255.255 area 0
network 10.20.0.0 0.0.255.255 area 1
area 1 range 10.20.0.0 255.255.0.0That
auto-cost reference-bandwidthline matters more than people think. The default reference is 100 Mbps, which makes a 1G link and a 10G link look identical to OSPF. I've seen traffic take a 1G path across a campus for months because nobody changed it.
EIGRP: Neighbors Tell You What They Know
EIGRP routers form neighbor relationships, then share routes with their neighbors rather than flooding a full topology. Each router keeps a topology table containing every path its neighbors have advertised. DUAL picks the best path (the successor) using a composite metric, and by default that's built from bandwidth and delay. If another neighbor's reported distance is lower than the current best path's feasible distance, that neighbor qualifies as a feasible successor and can take over instantly if the primary fails.
That's EIGRP's real party trick. When a successor dies and a feasible successor exists, convergence is nearly immediate and nobody sends a query. If there's no feasible successor, the router goes active and queries its neighbors, which is where EIGRP can get ugly in big, poorly summarized networks.
router eigrp INFRA
address-family ipv4 unicast autonomous-system 100
af-interface default
passive-interface
exit-af-interface
af-interface GigabitEthernet0/0
no passive-interface
summary-address 10.30.0.0 255.255.0.0
exit-af-interface
topology base
exit-af-topology
network 10.30.0.0 0.0.255.255
exit-address-familyBGP: Policy Over Topology
BGP runs over TCP port 179. Peers are configured manually, not discovered. There's no automatic neighbor finding, and that's deliberate. Between different autonomous systems you have eBGP, within one you have iBGP. Each route carries attributes such as AS_PATH, LOCAL_PREF, MED and communities, and the best-path algorithm walks through them in a fixed order.
Roughly, it prefers highest weight (on Cisco), then highest LOCAL_PREF, then locally originated routes, then shortest AS_PATH, then lowest origin type, then lowest MED, then eBGP over iBGP, then lowest IGP metric to the next hop. You don't need to memorize it, but you do need to know that you steer traffic by manipulating those attributes, not by tweaking interface costs.
router bgp 65001
bgp router-id 10.0.0.1
bgp log-neighbor-changes
neighbor 172.16.0.2 remote-as 65002
neighbor 172.16.0.2 description upstream-peer-a
neighbor 172.16.0.2 route-map FROM-UPSTREAM in
neighbor 172.16.0.2 route-map TO-UPSTREAM out
neighbor 172.16.0.2 maximum-prefix 1000 80
address-family ipv4
network 10.50.0.0 mask 255.255.0.0
route-map FROM-UPSTREAM permit 10
set local-preference 200Notice the
maximum-prefixline. That's a safety net, and I'd put it on every external peer. More on why in a moment.
Why the Differences Matter
Convergence, scale, vendor lock-in and control. Those four things drive nearly every decision.
Convergence. OSPF with tuned timers or BFD converges in well under a second. EIGRP with a feasible successor is just as fast, and sometimes faster. BGP is the slow one by design. Default keepalive is 60 seconds, hold time 180, and the minimum route advertisement interval throttles updates. You can tune it with BFD and lower timers, but BGP is built for stability across large and often unreliable domains, not for speed.
Scale. BGP carries the entire internet routing table, over a million IPv4 prefixes at the time of writing. OSPF will struggle if you throw thousands of routers into a poorly designed area. EIGRP scales well when summarized properly, but it's the protocol most likely to surprise you with stuck-in-active events when it isn't.
Vendor lock-in. If you run a mixed vendor environment with Juniper, Arista, and Linux boxes running FRR, OSPF is the safe interior choice. EIGRP support outside Cisco is limited, even with the RFC. If the whole network is Cisco and will remain so, EIGRP is perfectly reasonable and operationally simple.
Control. This is where BGP wins outright. Want to prefer one upstream for outbound traffic, prepend your AS path to discourage inbound traffic on another link, tag routes with communities so a provider drops traffic for you? That's BGP. Neither OSPF nor EIGRP gives you that kind of inter-organization policy.
Here's a quick way I think about it:
- Single administrative domain, multi-vendor: OSPF.
- Single administrative domain, all Cisco, want simplicity and fast failover: EIGRP.
- Between autonomous systems, multihoming, or very large fabrics with policy needs: BGP.
Real-World Examples
Example 1: The Campus and Branch Network
A manufacturing client had about forty branch sites connected back to two data centers over MPLS and VPN. They'd inherited a mess of static routes. We went with OSPF, with the data center core in area 0 and each region as its own area with summarization at the ABR. The branches ran a stub area configuration so they only received a default route plus a few specifics. LSDB size stayed tiny, and a flapping link in one region never triggered SPF recalculations elsewhere.
Could EIGRP have done it? Absolutely. But they had Juniper firewalls doing routing at several sites, and that settled it.
Example 2: The Data Center Fabric
This one surprises people. In modern leaf-spine data centers, I now default to eBGP for the underlay. Each leaf gets its own private ASN, spines share one, and every link is a point-to-point eBGP session. It sounds like overkill until you've operated one. Failure domains are small, policy is granular, there's no flooding of topology information, and the same protocol carries EVPN overlay routes. The design follows RFC 7938.
router bgp 65101
bgp router-id 10.1.1.11
bgp bestpath as-path multipath-relax
neighbor 192.168.10.0 remote-as 65100
neighbor 192.168.10.2 remote-as 65100
maximum-paths 4
address-family ipv4
redistribute connectedExample 3: Connecting to the Internet
A small hosting provider I worked with had two upstream transit providers and wanted to stop depending on one of them. They obtained their own ASN and a /22 of provider-independent space, and brought up eBGP to both upstreams. We set LOCAL_PREF higher on the cheaper provider for outbound, and prepended our AS path twice toward it so inbound traffic favored the other. When one upstream had an outage, traffic shifted within a couple of minutes without anyone touching a config. Static routes could never have done that.
Inside their network, the edge routers ran OSPF between themselves and iBGP carried the external routes. That's the classic pairing, and it's popular for a reason: the IGP provides reachability to loopbacks, BGP carries the prefixes.
Checking What's Happening
Whichever protocol you pick, the first thing you do during an incident is check adjacency and route state. From sw-infrarunbook-01, as infrarunbook-admin, these are the commands I reach for:
sw-infrarunbook-01# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
10.0.0.2 1 FULL/DR 00:00:33 10.10.0.2 Gi0/0
sw-infrarunbook-01# show ip eigrp neighbors
H Address Interface Hold Uptime SRTT RTO Q Seq
0 10.30.0.2 Gi0/1 12 02:14:33 4 100 0 58
sw-infrarunbook-01# show ip bgp summary
Neighbor V AS MsgRcvd MsgSent Up/Down State/PfxRcd
172.16.0.2 4 65002 48213 48190 3d04h 812If OSPF is stuck in EXSTART, suspect an MTU mismatch. If EIGRP neighbors won't form, check the AS number and K-values. If BGP sits in Active, the TCP session isn't establishing, so look at reachability, ACLs, and whether the peer is actually configured for you.
Common Misconceptions
"BGP is only for ISPs." Not anymore. Anyone multihoming, running a large data center fabric, or doing hybrid cloud connectivity to AWS, Azure or GCP is using BGP. Cloud direct-connect products practically require it.
"EIGRP is dead." It isn't. It's less fashionable, and Cisco's attention has shifted, but there are plenty of healthy EIGRP networks out there. I wouldn't start a greenfield multi-vendor design with it, but I wouldn't rip out a stable one just to follow a trend either.
"OSPF is always faster than BGP, so use it everywhere." Speed isn't the only criterion. Scale, policy, and failure-domain isolation matter too, and that's exactly why large fabrics lean toward BGP. A single OSPF area with thousands of routers is a bad day waiting to happen.
"You must choose one." Almost nobody runs just one. Redistribution between protocols is common, from an OSPF core into BGP at the edge, or EIGRP at an acquired site feeding OSPF. Just be careful. Mutual redistribution at more than one point without route tags and filters is how you build a routing loop. I've seen this happen after a merger, where two engineers each added redistribution at their own border and the result was a loop that took down both sites. Tag your routes, filter on the tag, and never trust a default.
"BGP convergence is slow, so it's unreliable." It's slow by default, not by nature. With BFD and tuned timers, BGP failover in a data center can be sub-second. The defaults suit the internet, not your fabric.
"If it works, don't summarize." That's a time bomb in all three protocols. Without summarization, a flapping subnet in one corner of the network can ripple through every router. Summarize at area borders in OSPF, at distribution boundaries in EIGRP, and aggregate in BGP where it makes sense.
One more thing I tell every junior engineer: always filter BGP. An unfiltered eBGP session will happily accept whatever the other side sends, and I've watched a leaked full table fill a small router's memory in seconds. Use prefix lists, route maps, and maximum-prefix limits on every external peer.
Making the Call
If I had to boil it down: use OSPF as your default interior protocol when vendors are mixed or when you want something every engineer already knows. Use EIGRP when the network is Cisco from end to end and operational simplicity is the priority. Use BGP when you cross an organizational boundary, need policy control, or are building a large fabric where small failure domains pay off.
Then document your decision. Write down why you chose what you chose, record the area design or AS numbering scheme, and keep it somewhere the next engineer will find it, such as your runbook wiki at solvethenetwork.com. The protocol matters less than whether the person on call at 3 a.m. understands why it was picked.
