router ospf reference-cost
Syntax
router [ospf | ospfv3] reference-cost [0-16777215]
no router [ospf | ospfv3] reference-cost
Description
Configures the global level cost for OSPF at the VLAN level. The global cost will become the default cost.
The
no
form of the command removes the configured global cost for OSPF.
In the event that the cost is explicitly configured at the VLAN level, the locally configured cost will take precedence over the global level cost.
Command context
Required context:
config
Parameters
ospf|ospfv3
0-16777215
Specifies the global cost range for OSPF at the VLAN level.
Use cases
Use cases for the configuration of costs automatically from global level to VLAN level:
Verify that the globally configured cost is applied at the VLAN level when configured without explicit cost parameters.
Verify that the globally configured cost is applied on the VLAN level when the existing VLAN level cost is unconfigured.
Verify that the auto configured cost is considered in OSPF neighbors for cost-related OSPF operations (such as shortest path selection).
Verify that the existing command implementation is not affected due to an automatic cost configuration on both the global and the VLAN level.
Check that the configuration is applied properly after uploading and downloading a saved configuration through TFTP.
Verify the configuration by saving the configuration
write mem
and rebooting the system.When the area is already configured for VLAN, only OSPF cost will be applied.