How can I set the cost value when OSPF imports external routes

When OSPF imports external routes, the cost of original routes is not used. By default, the cost of the external routes imported by OSPF is 1.

To change the default cost value of external routes imported by OSPF, run the default { cost { cost | inherit-metric } command. In the preceding command:
-cost: specifies the cost of the imported external routes. The value is an integer ranging from 0 to 16777214.
-inherit-metric: indicates that the cost of the imported external routes is the cost carried in the route.

Scroll to top