< Home

Configuring the Related Parameters for OSPF to Import Routes

In certain cases, when OSPF imports external routes, the default values of certain additional parameters should be added.

Context

When OSPF imports external routes, you can configure the default values for some additional parameters, such as the cost, number of routes, tag, and type. The route tag is used to tag the protocol related information. For example, it is used to differentiate the number of the ASs when OSPF receives BGP.

By default, the metric of the external routes imported by OSPF is 1; a maximum of 2147483647 routes can be imported each time; the type of the imported external routes is Type 2; the default tag value of the imported routes is 1.

Procedure

  1. Access the system view.

    system-view

  2. Access the OSPF process view.

    ospf [ process-id ]

  3. Configure the default values for parameters related to importing routes (cost, number of routes, tag, and type).

    default { cost { cost | inherit-metric } | limit limit | tag tag | type type } *

    You can run one of the following commands to set the cost of the imported route. The following commands are listed in the descending order of priorities.

    • Run the apply cost command to set the cost of a route.
    • Run the import-route (OSPF) command to set the cost of the imported route.
    • Run the default command to set the default cost of the imported route.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic