Interior gateway protocol

Also known as: IGP

On this page 7

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.

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.

ProtocolFamilyMetricTypical use
OSPFLink-stateInterface cost based on bandwidthEnterprise and multivendor networks
IS-ISLink-stateConfigurable link metricService provider and large data center cores
EIGRPAdvanced distance-vectorComposite of bandwidth and delayNetworks built mainly on one vendor platform
RIPDistance-vectorHop count, maximum 15Small, legacy or lab networks
Common interior gateway protocols compared

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.

PropertyInterior gateway protocolBGP as exterior protocol
ScopeInside one autonomous systemBetween autonomous systems
Path selectionLowest metric or costPolicy attributes and AS path
Trust modelNeighbors under same controlNeighbors under separate control
Convergence goalSub-second to a few secondsStability over speed
Typical route countHundreds to tens of thousandsFull internet table, over one million
Neighbor discoveryAutomatic through hellosManually configured peers
Scope and behavior of IGP and BGP

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.

ParameterWhat it controlsMain trade-off
Link metric or costWhich path traffic prefersManual tuning versus automatic bandwidth reference
Hello and dead timersSpeed of failure detectionFaster detection versus more control traffic
SPF throttle timersDelay before recalculatingQuick reaction versus CPU protection
Area or level designFlooding scopeSmaller domains versus extra border complexity
SummarizationSize of routing tablesSmaller tables versus less precise paths
AuthenticationWhich neighbors are acceptedSecurity versus key management effort
Key IGP tuning parameters

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.

SymptomLikely causeFix
Adjacency stuck or flappingMismatched timers, MTU, area or authenticationAlign parameters on both sides
Traffic takes a slow pathDefault costs ignore high-speed linksRaise reference bandwidth or set costs
Routing loop after redistributionRoutes fed back between two protocolsTag routes and filter at each boundary
High CPU during instabilityFrequent SPF runs in one large domainAdd hierarchy and SPF throttling
Routing table grows unexpectedlyExternal or customer routes in the IGPMove those routes into BGP
Typical IGP faults, causes and fixes

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.