Global OSPF Cost Setting

The OSPF cost global configuration command implements a parameter at the global level which modifies the default cost calculation. The configured OSPF cost value can then be modified for a specific VLAN interface, particular subnet, or complete VLAN. The cost configured with the global command is then used as the default cost at VLAN level provided it is not explicitly configured locally. When the cost is explicitly configured at VLAN, this cost will take precedence over the global level cost.

  • This global parameter, if configured, must be used as the default value:

    • when a new VLAN is associated with an OSPF area without cost configuration.

    • when an existing VLAN cost parameter is not configured.

    • when an existing VLAN cost parameter is unconfigured.


The global cost auto configuration is supported only for OSPFv2 and OSPFv3.

No existing functionality is modified except that the cost will be configured automatically from global command when not provided at VLAN level.