An interior gateway protocol (IGP) is a dynamic routing protocol that routers use to exchange reachability and path information within a single autonomous system, such as one enterprise, campus, data center or service provider backbone. In networking and routing, the IGP builds the internal map of the network, so that every router can compute the best path to every internal prefix and react automatically when a link or device fails.
The category is defined by scope, not by algorithm. OSPF, IS-IS, EIGRP and RIP are all interior gateway protocols, while BGP is the exterior gateway protocol that connects autonomous systems to each other. Most production networks run both: the IGP for fast, accurate internal topology and BGP for policy-rich exchange of external routes.
How an interior gateway protocol builds the internal map
An IGP works by having each router discover its neighbors, advertise what it knows, and run a path selection algorithm on the collected information. The result is a set of best routes that the router installs in its routing table, each with a next hop and an outgoing interface.
The process follows a predictable cycle. Routers send hello messages on enabled interfaces, form adjacencies with routers that share compatible parameters, exchange routing information, and then keep the adjacency alive with periodic hellos. When a neighbor stops responding within the dead or hold interval, the router removes routes learned through it and recalculates.
- Neighbor discovery: hello packets on multicast addresses identify adjacent routers and check matching timers, area or level, and authentication.
- Information exchange: routers flood link-state records or send distance-vector updates, depending on the protocol family.
- Path computation: each router selects the lowest-cost path using the protocol metric, such as interface cost, hop count or a composite of bandwidth and delay.
- Route installation: winning paths enter the routing table, where administrative distance decides between the IGP and other sources such as static routes.
Because an IGP assumes that all routers belong to one administrative domain, it optimizes for speed and accuracy rather than for policy control. It trusts its neighbors, carries a modest number of internal prefixes, and aims to converge in seconds or less after a change.
Link-state and distance-vector IGP families
Interior gateway protocols fall into two main families that differ in what routers share and how they compute paths. Link-state protocols flood a description of every link so that each router holds an identical topology database and runs the Dijkstra shortest path first (SPF) algorithm locally. Distance-vector protocols share only their own best routes with direct neighbors, which compute paths by trusting those advertisements.
The following table compares the four interior gateway protocols that network engineers encounter most often.
| Protocol | Family | Metric | Typical use |
|---|---|---|---|
| OSPF | Link-state | Interface cost based on bandwidth | Enterprise and multivendor networks |
| IS-IS | Link-state | Configurable link metric | Service provider and large data center cores |
| EIGRP | Advanced distance-vector | Composite of bandwidth and delay | Networks built mainly on one vendor platform |
| RIP | Distance-vector | Hop count, maximum 15 | Small, legacy or lab networks |
OSPF runs directly over IP and organizes routers into areas around a backbone area 0. IS-IS runs directly over the data link layer, uses level 1 and level 2 hierarchy, and carries IPv4 and IPv6 in one instance with little change. EIGRP uses the diffusing update algorithm (DUAL) to keep precomputed loop-free backup paths, called feasible successors. RIP is simple but converges slowly and cannot scale beyond 15 hops.
Interior gateway protocol versus exterior gateway protocol
The distinction between an IGP and an exterior gateway protocol (EGP) reflects a difference in purpose: an IGP finds the fastest path inside one domain, while an EGP exchanges routes between independent domains under explicit policy. In practice, BGP is the only EGP in widespread use, so the comparison is almost always IGP versus BGP.
| Property | Interior gateway protocol | BGP as exterior protocol |
|---|---|---|
| Scope | Inside one autonomous system | Between autonomous systems |
| Path selection | Lowest metric or cost | Policy attributes and AS path |
| Trust model | Neighbors under same control | Neighbors under separate control |
| Convergence goal | Sub-second to a few seconds | Stability over speed |
| Typical route count | Hundreds to tens of thousands | Full internet table, over one million |
| Neighbor discovery | Automatic through hellos | Manually configured peers |
The two layers depend on each other. Internal BGP sessions usually run between loopback addresses, and the IGP provides reachability to those loopbacks and to the BGP next hops. A common design principle follows from this: keep the IGP small, carrying only infrastructure prefixes, and let BGP carry customer and internet routes.
Designing and tuning an IGP deployment
A well-designed IGP is hierarchical, summarized and deliberately tuned rather than left at default values. Hierarchy, such as OSPF areas or IS-IS levels, limits how far a topology change floods. Route aggregation at area borders shrinks routing tables and hides instability in one part of the network from the rest.
The table below lists the parameters that most strongly influence IGP behavior and the trade-off each one involves.
| Parameter | What it controls | Main trade-off |
|---|---|---|
| Link metric or cost | Which path traffic prefers | Manual tuning versus automatic bandwidth reference |
| Hello and dead timers | Speed of failure detection | Faster detection versus more control traffic |
| SPF throttle timers | Delay before recalculating | Quick reaction versus CPU protection |
| Area or level design | Flooding scope | Smaller domains versus extra border complexity |
| Summarization | Size of routing tables | Smaller tables versus less precise paths |
| Authentication | Which neighbors are accepted | Security versus key management effort |
Modern networks rarely rely on hello timers alone for failure detection. Bidirectional Forwarding Detection (BFD) can detect a failed path in tens of milliseconds and notify the IGP immediately. Combined with loop-free alternate or topology-independent loop-free alternate fast reroute, link-state IGPs can restore forwarding in under 50 milliseconds on suitable topologies. IS-IS and OSPF also serve as the control plane for segment routing, which removes the need for a separate label distribution protocol.
Common IGP problems and how to avoid them
Most IGP incidents come from configuration mismatches and poor design, not from protocol defects. Adjacencies that refuse to form, suboptimal paths and routing loops during redistribution are the recurring patterns that experienced engineers learn to recognize.
| Symptom | Likely cause | Fix |
|---|---|---|
| Adjacency stuck or flapping | Mismatched timers, MTU, area or authentication | Align parameters on both sides |
| Traffic takes a slow path | Default costs ignore high-speed links | Raise reference bandwidth or set costs |
| Routing loop after redistribution | Routes fed back between two protocols | Tag routes and filter at each boundary |
| High CPU during instability | Frequent SPF runs in one large domain | Add hierarchy and SPF throttling |
| Routing table grows unexpectedly | External or customer routes in the IGP | Move those routes into BGP |
One widespread misconception is that lower administrative distance makes a protocol better. Administrative distance only ranks route sources on one router; it does not change how the IGP itself computes paths. Another mistake is to redistribute the full BGP table into an IGP, which can overwhelm routers and destabilize the whole autonomous system.
In simple terms
An interior gateway protocol is the way routers inside one organization talk to each other about the roads in their network. Each router tells its neighbors which links it has and how good they are. Together they build a shared map and each one picks the quickest route to every destination.
Think of the delivery drivers of one company sharing live traffic updates by radio. If a road closes, everyone hears about it within seconds and takes a detour. The IGP does the same for data, but only inside the company’s own network. Reaching other companies and the wider internet is the job of a different protocol called BGP.
A practical example
A regional university runs a network of 40 routers linking a main campus, two satellite campuses and a small data center. The network team deploys OSPF as its interior gateway protocol, with the core and data center routers in backbone area 0 and each satellite campus in its own area. Border routers summarize each campus into a single aggregate prefix, so the core carries about 60 routes instead of several hundred.
The team raises the reference bandwidth so that 100 Gbps core links receive lower costs than 10 Gbps campus uplinks, and it enables BFD on the redundant fiber paths between campuses. When a construction crew cuts one of those fibers during term, BFD detects the failure in about 150 milliseconds, OSPF recalculates, and traffic moves to the second path. Lecture streams and video calls continue with no visible interruption, and the internet connection, handled by BGP at the data center edge, is never affected.