The software uses the following formula to calculate the cost:
Cost = reference-bandwidth/interface-speed
If the resulting cost is less than 1, the software rounds the cost up to 1. The default reference bandwidth results in the following costs:
•
10 Mbps port’s cost = 100/10 = 10
•
100 Mbps port’s cost = 100/100 = 1
•
1000 Mbps port’s cost = 100/1000 = 0.10, which is rounded up to 1
•
10 Gbps port’s cost = 100/10000 = 0.01, which is rounded up to 1
The bandwidth for interfaces that consist of more than one physical port is calculated as follows:
•
LAG group - The combined bandwidth of all the ports.
•
Virtual interface - The combined bandwidth of all the ports in the port-based VLAN that contains the virtual interface.
The default reference bandwidth is 100 Mbps. You can change the reference bandwidth to a value from 1 - 4294967.
If a change to the reference bandwidth results in a cost change to an interface, the device sends a link-state update to update the costs of
interfaces advertised by the device.
NOTE
If you specify the cost for an individual interface, the cost you specify overrides the cost calculated by the software.
Interface types to which the reference bandwidth does not apply
Some interface types are not affected by the reference bandwidth and always have the same cost regardless of the reference bandwidth
in use:
•
The cost of a loopback interface is always 1.
•
The cost of a virtual link is calculated using the Shortest Path First (SPF) algorithm and is not affected by the auto-cost feature.
•
The bandwidth for tunnel interfaces is 9 Kbps and is also subject to the auto-cost reference bandwidth setting.
Changing the reference bandwidth
To change the reference bandwidth, enter a command such as the following at the OSPF configuration level of the CLI.
device(config)# router ospf
device(config-ospf-router)# auto-cost reference-bandwidth 500
The reference bandwidth specified in this example results in the following costs:
•
10 Mbps port’s cost = 500/10 = 50
•
100 Mbps port’s cost = 500/100 = 5
•
1000 Mbps port’s cost = 500/1000 = 0.5, which is rounded up to 1
The costs for 10 Mbps and 100 Mbps ports change as a result of the changed reference bandwidth. Costs for higher-speed interfaces
remain the same.
Syntax:
[no] auto-cost
{
reference-bandwidth
num
|
use-active-ports
}
The
num
parameter specifies the reference bandwidth and can be a value from 1 - 4294967. The default is 100.
To restore the reference bandwidth to its default value and thus restore the default costs of interfaces to their default values, enter the
following command.
device(config-ospf-router)# no auto-cost reference-bandwidth
Configuring OSPF
FastIron Ethernet Switch Layer 3 Routing
53-1003627-04
247
Summary of Contents for FastIron SX 1600
Page 2: ...FastIron Ethernet Switch Layer 3 Routing 2 53 1003627 04 ...
Page 16: ...FastIron Ethernet Switch Layer 3 Routing 16 53 1003627 04 ...
Page 20: ...FastIron Ethernet Switch Layer 3 Routing 20 53 1003627 04 ...
Page 142: ...FastIron Ethernet Switch Layer 3 Routing 142 53 1003627 04 ...
Page 150: ...FastIron Ethernet Switch Layer 3 Routing 150 53 1003627 04 ...
Page 200: ...FastIron Ethernet Switch Layer 3 Routing 200 53 1003627 04 ...
Page 214: ...FastIron Ethernet Switch Layer 3 Routing 214 53 1003627 04 ...
Page 350: ...FastIron Ethernet Switch Layer 3 Routing 350 53 1003627 04 ...
Page 476: ...FastIron Ethernet Switch Layer 3 Routing 476 53 1003627 04 ...
Page 588: ...FastIron Ethernet Switch Layer 3 Routing 588 53 1003627 04 ...