Loading content...
If hop count represents the most primitive measure of network distance, then bandwidth represents the leap toward understanding actual network performance. Bandwidth—the theoretical maximum data transfer capacity of a network link—fundamentally transformed how routing protocols evaluate paths.
In the previous page, we saw how hop count could route traffic over a 56 Kbps link when a 10 Gbps alternative existed just one hop further away. Bandwidth-based metrics solve this problem by incorporating link capacity into routing decisions, ensuring that traffic flows through the fastest available paths rather than the shortest.
By the end of this page, you will understand how bandwidth functions as a routing metric, how protocols convert bandwidth into cost values, the reference bandwidth concept in OSPF, EIGRP's bandwidth calculations, and the critical distinctions between configured bandwidth, actual throughput, and available capacity.
Bandwidth in networking refers to the maximum rate at which data can be transferred over a network link, typically measured in bits per second (bps) or its multiples (Kbps, Mbps, Gbps, Tbps).
Formal Definition:
As a routing metric, bandwidth represents the data-carrying capacity of a network link. Routing protocols use bandwidth values to calculate path costs, with higher bandwidth links receiving lower costs (making them more attractive for routing).
The Inverse Relationship:
Unlike hop count where lower is always better, bandwidth metrics operate inversely:
This inversion requires protocols to convert bandwidth into a cost value. The most common conversion formula divides a reference bandwidth by the interface's configured bandwidth:
1234567891011121314
OSPF Cost = Reference Bandwidth / Interface Bandwidth Example calculations:─────────────────────────────────────────────────────────Reference Bandwidth = 100 Mbps (OSPF default) Interface Type | Bandwidth | Cost Calculation | Cost──────────────────────────────────────────────────────────────10 Mbps Ethernet | 10 Mbps | 100 / 10 = 10 | 10100 Mbps FastEther | 100 Mbps | 100 / 100 = 1 | 11 Gbps GigaEther | 1000 Mbps | 100 / 1000 = 0.1 | 1 (minimum)10 Gbps TenGig | 10000 Mbps | 100 / 10000 = 0.01 | 1 (minimum) Note: OSPF costs are integers; values < 1 round to 1Critical Insight: The Minimum Cost Problem
Notice that with OSPF's default 100 Mbps reference bandwidth, all interfaces faster than 100 Mbps calculate to the same cost of 1. This means:
OSPF treats a 100 Mbps link identically to a 100 Gbps link! This default behavior defeats the purpose of bandwidth-based routing in modern high-speed networks.
In any network with links faster than 100 Mbps, OSPF's reference bandwidth MUST be configured to a higher value. Common practice is to set reference bandwidth to the fastest link in the network or higher—for example, 100000 (100 Gbps) for data center environments. Without this configuration, OSPF provides no bandwidth-aware routing for high-speed links.
The reference bandwidth (also called auto-cost reference bandwidth) is the baseline value used to calculate interface costs. It must be configured consistently across all routers in an OSPF area to ensure consistent routing decisions.
| Network Environment | Fastest Link Speed | Recommended Reference BW | Resulting Cost Range |
|---|---|---|---|
| Legacy/Small Enterprise | 100 Mbps | 100 Mbps (default) | 1 - 100 |
| Modern Enterprise | 10 Gbps | 10000 Mbps (10 Gbps) | 1 - 1000 |
| Data Center | 100 Gbps | 100000 Mbps (100 Gbps) | 1 - 10000 |
| Service Provider | 400 Gbps | 400000 Mbps (400 Gbps) | 1 - 40000 |
| Future-Proof | Fastest × 10 | Variable | Adequate granularity |
12345678910
! Configure OSPF reference bandwidth to 100 Gbpsrouter ospf 1 auto-cost reference-bandwidth 100000 ! Verificationshow ip ospf interface briefshow ip ospf interface GigabitEthernet0/0 ! Expected output for 10 Gbps interface:! Cost: 10 (calculated as 100000 / 10000 = 10)The Consistency Requirement:
Every router within an OSPF area MUST use the same reference bandwidth. If routers use different values:
These inconsistent views cause routing asymmetry and can lead to:
Best Practices:
Different vendors use different units for reference bandwidth. Cisco IOS uses Mbps, so '100000' means 100 Gbps. Juniper uses explicit notation like '100g'. Always verify the expected units for your platform to avoid configuration errors.
Understanding exactly how bandwidth translates into routing decisions requires tracing through the complete calculation process. Let's examine this with a practical network topology.
Scenario Setup:
Step 1: Calculate Individual Interface Costs
R1-R2 Cost = 10000 / 1000 = 10
R1-R3 Cost = 10000 / 100 = 100
R2-R4 Cost = 10000 / 10000 = 1
R3-R4 Cost = 10000 / 10000 = 1
Step 2: Calculate Total Path Costs
Path via R2: R1→R2 + R2→R4 = 10 + 1 = 11
Path via R3: R1→R3 + R3→R4 = 100 + 1 = 101
Step 3: Path Selection
OSPF selects the path with the lowest total cost:
Despite both paths having 2 hops, OSPF correctly identifies the higher-bandwidth path through R2.
OSPF calculates the total path cost by summing the costs of all interfaces along the path. This cumulative approach means that a single slow link can significantly impact the entire path's attractiveness, even if other links are high-speed. This accurately reflects reality: a path's effective bandwidth is limited by its slowest link (the bottleneck).
While OSPF uses a simple division formula, EIGRP (Enhanced Interior Gateway Routing Protocol) incorporates bandwidth into a more complex composite metric. Understanding EIGRP's approach reveals different philosophies in metric design.
1234567891011121314151617181920
EIGRP Composite Metric Formula (Classic):════════════════════════════════════════════════════════════════ Metric = [(K1 × Bandwidth + K2 × Bandwidth/(256 - Load) + K3 × Delay) × K5/(K4 + Reliability)] × 256 Default K values: K1=1, K2=0, K3=1, K4=0, K5=0 Simplified (with defaults):Metric = (Bandwidth + Delay) × 256 Where:• Bandwidth = 10^7 / minimum_bandwidth_in_kbps• Delay = sum of delays in tens of microseconds ═══════════════════════════════════════════════════════════════════Example: 1 Gbps link─────────────────────────────────────────────────────────────────Bandwidth component = 10^7 / 1,000,000 = 10(1 Gbps = 1,000,000 Kbps)Key Differences from OSPF:
1. Minimum Bandwidth Focus EIGRP uses the minimum bandwidth along the entire path, not the sum. This reflects the bottleneck principle: a path's effective throughput is limited by its slowest link.
2. Scaled Values EIGRP scales bandwidth using 10^7 / bandwidth_in_kbps, producing larger numbers that provide finer granularity.
3. Composite Nature Bandwidth is combined with delay (and optionally load and reliability) to produce a single metric value.
4. K Values The K values allow administrators to weight different components. By default, only bandwidth (K1) and delay (K3) contribute.
| Characteristic | OSPF | EIGRP |
|---|---|---|
| Bandwidth aggregation | Sum of interface costs | Minimum bandwidth on path |
| Calculation method | Reference BW / Interface BW | 10^7 / Minimum BW (Kbps) |
| Other metrics included | No (cost only) | Yes (delay, optionally load/reliability) |
| Tunability | Reference bandwidth only | K values, interface bandwidth/delay |
| Result type | Integer cost (minimum 1) | Large scaled integer |
Modern EIGRP implementations (EIGRP Named Mode) support 'Wide Metrics' that use 64-bit values and can represent bandwidths up to 4.2 terabits per second. This addresses scaling limitations of the classic 32-bit metric calculation.
A critical distinction that causes frequent confusion: routing protocols use configured bandwidth, not measured or actual bandwidth. Understanding this difference is essential for correct network design and troubleshooting.
Why This Matters: The Subrate Circuit Scenario
Consider a common scenario: You have a 1 Gbps physical Ethernet port connected to a service provider circuit that only provides 100 Mbps of actual capacity (a common 'subrate' offering).
123456789101112131415
! Interface connected to 100 Mbps subrate circuitinterface GigabitEthernet0/1 description WAN Link - 100 Mbps subrate ip address 192.168.1.1 255.255.255.252 ! Without this command, OSPF sees 1 Gbps ! With this command, OSPF correctly sees 100 Mbps bandwidth 100000 ! Verification show interface GigabitEthernet0/1 | include BW ! Output: BW 100000 Kbit show ip ospf interface GigabitEthernet0/1 | include Cost ! Output: Cost: 100 (with 10 Gbps reference bandwidth)Consequences of Incorrect Bandwidth Configuration:
Overcommitment: If the router believes it has a 1 Gbps path when only 100 Mbps exists, it may prefer this path inappropriately, leading to congestion and packet loss.
QoS Miscalculation: Many QoS mechanisms use configured bandwidth to calculate queue sizes and shaping rates. Incorrect bandwidth leads to suboptimal QoS behavior.
Routing Suboptimality: Other paths that appear more expensive may actually offer better throughput.
Common Scenarios Requiring Manual Bandwidth Configuration:
The 'bandwidth' command does NOT limit or throttle actual traffic—it only affects software calculations (routing protocols, QoS). To actually limit traffic, you need rate-limiting or shaping commands. Confusing these functions is a common operational mistake.
While automatic cost calculation based on bandwidth provides excellent default behavior, network engineers frequently need to override these values for traffic engineering purposes. Manual cost configuration enables:
12345678910111213
! Scenario: Make GigE link less preferred than auto-calculated interface GigabitEthernet0/0 description Primary WAN - should be preferred ip ospf cost 10 interface GigabitEthernet0/1 description Backup WAN - expensive metered link ip ospf cost 1000 ! Much higher = less preferred ! Verificationshow ip ospf interface briefshow ip route ospfECMP Load Balancing via Equal Costs:
By configuring equal costs on parallel links, you can enable Equal-Cost Multi-Path (ECMP) routing:
With equal total costs (150 via R2, 150 via R3), OSPF installs both paths in the routing table and load-balances traffic between them. This doubles effective bandwidth while providing redundancy.
Traffic Engineering Scenario:
Consider an organization with two WAN links:
Goal: Use primary exclusively unless failed, then failover to backup.
Implementation:
1234567891011121314151617181920
! Assuming reference bandwidth = 10 Gbps (10000) ! Primary link - 10 Gbps! Auto-calculated cost would be: 10000/10000 = 1! We'll use the default or a low manual costinterface GigabitEthernet0/0 description Primary WAN - Flat Rate Fiber ip ospf cost 1 ! Backup link - 1 Gbps but metered! Auto-calculated cost would be: 10000/1000 = 10! We set much higher to ensure it's only used on failureinterface GigabitEthernet0/1 description Backup WAN - Metered ip ospf cost 10000 ! Result:! - Normal operation: All traffic via Gi0/0 (cost 1)! - Primary failure: Traffic shifts to Gi0/1 (cost 10000)! - Primary recovery: Traffic returns to Gi0/0When designing cost hierarchies, leave room for future adjustments. Using costs like 1, 10, 100, 1000 provides clear separation and allows intermediate values to be inserted later. Avoid using costs at the extremes (very close to 0 or 65535) as they limit flexibility.
While bandwidth-based metrics represent a significant improvement over hop count, they carry their own limitations that network engineers must understand.
The Elephant Flow Problem:
Consider this scenario with ECMP (Equal-Cost Multi-Path) routing:
With two equal-cost paths, ECMP splits traffic between them. But if traffic consists of:
Path A becomes congested while Path B is underutilized. Bandwidth metrics provide no mechanism to detect or correct this imbalance—both paths appear equally good.
Modern Approaches:
These limitations have driven development of more sophisticated traffic engineering approaches:
In production networks, bandwidth metrics should be combined with monitoring, alerting, and capacity planning. The metric gets you close to optimal, but operations teams must watch for the edge cases where static metrics fail to adapt.
We've thoroughly explored bandwidth as a fundamental routing metric—from its conceptual foundation through protocol-specific implementations, configuration requirements, and inherent limitations. Let's consolidate the essential knowledge:
Looking Ahead:
Bandwidth represents capacity, but network performance depends on more than raw throughput. In the next page, we'll explore delay as a routing metric—how propagation time, transmission time, and queuing contribute to latency, and how protocols incorporate delay into path selection decisions.
The combination of bandwidth and delay begins to paint a more complete picture of path quality, moving us toward the composite metrics that modern protocols employ for optimal routing.
You now have comprehensive understanding of bandwidth as a routing metric—how protocols calculate costs from bandwidth values, the critical importance of reference bandwidth configuration, the distinction between configured and actual bandwidth, and the limitations that motivate more sophisticated approaches.