< Home

Setting a Priority for OSPF Routes

Context

A priority can be set for each routing protocol running on a switch. When these protocols discover the same route, the route discovered by the highest-priority routing protocol takes effect.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run ospf [ process-id ]

    The OSPF process view is displayed.

  3. Run preference [ ase ] { preference | route-policy route-policy-name } *

    A priority is set for OSPF routes.

    • The parameter ase indicates that a priority is set for AS external routes.
    • The parameter preference specifies the priority of OSPF routes. A smaller value indicates a higher priority.
    • The parameter route-policy route-policy-name indicates that a routing policy is used to set a priority for specified routes.

    The default priority of OSPF routes is 10. If the parameter ase is specified in the command, the default priority of AS external routes is 150.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >