Skip to content
ENExplore Calculators

Administrative Distance Comparison Calculator

Work out administrative distance comparison instantly with clear inputs, formula shown and shareable results.

About Administrative Distance Comparison Calculator

Route selection checks prefix length first: a more specific prefix always wins regardless of source, so a /24 learned by RIP beats a /16 learned by OSPF for addresses inside it. Only when prefix lengths are equal does administrative distance decide, using the familiar values 0 for connected, 1 for static, 20 for eBGP, 90 for EIGRP, 110 for OSPF and 200 for iBGP.

Formula

Route selection order

1. longest prefix match; 2. lowest administrative distance; 3. protocol metric within the same protocol

Worked example

With the default values below, Administrative Distance Comparison Calculator returns Route installed in the table of Route B wins on lower administrative distance. Change any input above and every figure here is recalculated in your browser.

Inputs used

First route sourceone of Connected (0), Static (1), eBGP (20), EIGRP internal (90), OSPF (110), RIP (120), iBGP (200)
OSPF (110)
Second route sourceone of Connected (0), Static (1), eBGP (20), EIGRP internal (90), OSPF (110), RIP (120), iBGP (200)
EIGRP internal (90)
Prefix length of route Aaccepts 0–32 bits
24 bits
Prefix length of route Baccepts 0–32 bits
24 bits

Results

Route installed in the table
Route B wins on lower administrative distance
Administrative distance of route A
110
Administrative distance of route B
90
Deciding criterion
Administrative distance

Step by step

  1. 1Values used
  2. 2Route selection order
  3. 3Route installed in the table= Route B wins on lower administrative distance
  4. 4Administrative distance of route A= 110
  5. 5Administrative distance of route B= 90
  6. 6Deciding criterion= Administrative distance

Assumptions and limits

  • The result is derived only from the 4 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to whole numbers, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

Why does eBGP have a lower distance than OSPF?

Because eBGP routes come from outside your administrative domain and are treated as authoritative for external destinations, while iBGP at 200 is deliberately less trusted than any internal protocol.

Can administrative distance be changed?

Yes, per protocol or per route. Raising a static route's distance above the dynamic protocol creates a floating static route that only activates when the dynamic route disappears.

Administrative Distance Comparison Calculator | Calcrivo