Octet

What metric does each common routing protocol use?

Show the answer

Say this first

RIP counts hops, up to 15. OSPF uses cost, by default 100 Mbps divided by interface bandwidth, summed along the path. EIGRP uses a composite of the slowest bandwidth and total delay. IS-IS uses a metric of 10 per interface by default regardless of speed. BGP has no single metric: it picks a path with an ordered list of attributes, and its MED attribute is the one called "metric".

Go deeper

ProtocolMetricDefault behaviour to know
RIPhop count16 means unreachable, so the network is at most 15 hops wide
OSPFcost = reference bandwidth / interface bandwidthreference is 100 Mbps, so FastEthernet, 1G and 10G all cost 1
EIGRP256 x (10^7 / slowest bandwidth in kbps + total delay in tens of microseconds)with default K values only bandwidth and delay count
IS-ISsum of interface metricsevery interface is 10 unless you set it; narrow metrics cap a link at 63
BGPbest path algorithmweight, local preference, AS path length, origin, MED and more, in order

OSPF reference bandwidth

Because the default reference is 100 Mbps, OSPF cannot tell 1G from 100G. Set the same value on every router in the domain, in Mbps:

Cisco IOS
router ospf 1
 auto-cost reference-bandwidth 400000

EIGRP worked number

One GigabitEthernet hop to a neighbor's GigabitEthernet LAN: 10^7 / 1,000,000 = 10, total delay 10 + 10 microseconds = 2 tens of microseconds, so 256 x (10 + 2) = 3072. That is the [90/3072] you see so often in labs. Named mode with wide metrics scales this for links faster than 1 Gbps.

Traps

  • Forgetting to raise the OSPF reference bandwidth, then wondering why OSPF load balances a 1G and a 10G link.
  • Saying BGP uses hop count. AS path length is one tie-breaker deep in the list, not a metric.
How did you do?Book 3.4 Routing