Theoretical foundations and architecture

IGP convergence speed governs service availability and carrier SLAs. Default OSPF/IS-IS hello and hold timers (10s/40s) cause unacceptable downtime during optical or transponder outages. To achieve sub-second fault detection, operators deploy BFD (Bidirectional Forwarding Detection, RFC 5880). Running independently of the IGP and, on many platforms, offloaded to line-card hardware (ASICs/NPUs), BFD exchanges fast control packets (e.g., 50-100 ms intervals with a multiplier of 3). After three missed packets (detection time 150-300 ms), BFD declares the session down and immediately notifies client protocols (OSPF, IS-IS, LDP, BGP); total recovery time is detection plus SPF plus FIB reprogramming. In parallel, symmetric IGP metric design facilitates ECMP (Equal-Cost Multi-Path), distributing labeled packets across redundant paths using flow-based hashing algorithms.

Metric as an engineering decision

The IGP picks the path with the minimum sum of metrics, so the metric is the only lever for steering traffic in a core without TE. In OSPF the interface cost by default is computed as reference-bandwidth / bandwidth, where the reference-bandwidth is 100 Mbit/s (Cisco, Huawei, Junos - the same). Any interface faster than 100 Mbit/s gets cost 1: 1G, 10G and 100G become "equal", and the IGP treats a 1G link as equivalent to a 100G link. The fix is to raise the reference-bandwidth on all nodes at once (Cisco auto-cost reference-bandwidth 100000, Huawei bandwidth-reference 100000, Junos reference-bandwidth 100g), or to set the cost on interfaces by hand. If the value is changed on only part of the nodes, the costs of the same link in the two directions diverge, and paths become asymmetric.

Link speedcost at 100 Mbit/scost at 100 Gbit/scost at 1 Tbit/s
1G11001000
10G110100
100G1110
400G112

The result of the division is truncated to an integer and cannot be below 1, so for 100G/400G networks take 1 Tbit/s (1000000 on Cisco). The interface metric field in the Router-LSA is 16 bits (up to 65535), in IS-IS wide it is 24 bits per link and 32 bits per path. IS-IS has no reference-bandwidth: the default metric is 10 for any interface, and it is always designed by hand.

Metric design principles

A metric reflects not "beauty" but policy: inverse bandwidth, latency (for long routes) or an administrative preference. The primary link PE1-P1 gets 10 and the backup PE1-P2 gets 50: while the primary is alive the backup is not needed, and when it fails the traffic moves to the backup with no extra action. Symmetry: the metric of a link must be the same on both sides, otherwise forward and return paths diverge, and traceroute and SLA measurements become misleading. Equal metrics on several paths give ECMP: traffic is shared among all paths with equal total cost.

ECMP distributes flows, not packets: a hash over the 5-tuple (src/dst IP, ports, protocol) selects one path per flow so as not to reorder packets. For MPLS traffic the LSR hashes the label stack and, on many platforms, the IP header below it; for pseudowires a flow label (RFC 6391) or an entropy label (RFC 6790) is added. The maximum number of equal-cost paths depends on the platform: on Cisco IOS-XE maximum-paths is 4 by default (up to 32), on Huawei it is configured with maximum load-balancing. In Junos several next hops are installed in the RIB, but load balancing in the FIB is enabled only by a load-balance per-packet policy in forwarding-table export (the name is historically misleading - on modern platforms the hash is per-flow). A typical problem is polarization: every hop uses the same hash function, the flow again picks the same side, and part of the links stay empty.

BFD: what exactly it measures

BFD (RFC 5880, single-hop: RFC 5881) is a lightweight bidirectional failure detection protocol independent of the medium and of the IGP. Control packets go over UDP to destination port 3784 (multi-hop 4784, echo 3785). The session goes Down -> Init -> Up through a three-way exchange, and the packet carries Desired Min TX, Required Min RX, Detect Mult and discriminators (My/Your Discriminator). Detection time in asynchronous mode: the remote Detect Mult × the maximum of the local Required Min RX and the remote Desired Min TX. For 100 ms × 3 it is 300 ms; if the intervals differ, the more conservative one applies. Before reaching Up, packets are sent no more than once per second (slow start).

BFD does not compute routes. It informs registered clients (OSPF, IS-IS, BGP, LDP, static routes) about the death of the session, and the client tears down the adjacency immediately without waiting for the dead timer (40 s in OSPF by default, 30 s hold time in IS-IS). If the client is not registered (no ip ospf bfd on Cisco), the BFD session may be Up, but routing will detect the break only through the ordinary timer.

Convergence budget

Total traffic loss time = failure detection + LSA/LSP generation and flooding + SPF delay + recalculation and FIB programming. With BFD at 300 ms, detection takes 300 ms, LSA generation and SPF with throttling (initial 50 ms) add 50-100 ms, and flooding and FIB installation tens of milliseconds more; the total is 400-600 ms instead of the 40 s of default OSPF. For comparison: OSPF fast hello (dead-interval minimal hello-multiplier 4, 4 Hellos per second) gives about 1 s but loads the CPU on all interfaces; carrier-delay msec 0 on Cisco and hold-time up ... down 0 on Junos speed up the reaction to an explicit link-down but do not help with a "silent" failure through an L2 segment or a transponder. BFD is needed precisely for hidden failures.

Throttling protects the CPU: timers throttle spf 50 200 5000 (Cisco OSPF) means "run SPF 50 ms after an event, on repeated changes wait 200 ms, then double up to 5 s". timers throttle lsa all 10 100 5000 similarly limits LSA origination, and timers lsa arrival 80 sets the minimum interval for accepting the same LSA and must not exceed the neighbor's hold interval. An initial wait that is too large stretches convergence, one that is too small on an unstable link creates an SPF storm.