Configure the priority of an OSPF route on an S series switch

The routing protocols may share and select the routing information because a switch may run multiple dynamic routing protocols simultaneously. In this case, a priority should be set for each routing protocol. When different protocols find multiple routes to the same destination, the route discovered by the protocol with a higher priority is preferred. On an S series switch, you can run the preference command in the OSPF process view to configure the OSPF priority.
Perform the following operations:
1. Run the ospf [ process-id ] command in the system view to enter the OSPF process view.
2. Run the preference [ ase ] { preference | route-policy route-policy-name } * command to configure the OSPF priority.

The parameters are described as follows:
ase: indicates the priority of the AS-External route.
preference: indicates the OSPF route priority. A smaller value indicates a higher priority.
route-policy route-policy-name: indicates the priority for specified routes in the routing policy.
The default OSPF priority value is 10. When an ASE is specified, the default OSPF priority is 150.
For example, set the priority of routes in OSPF process 100 to 150 as follows:
[HUAWEI] ospf 100
[HUAWEI-ospf-100] preference 150

Scroll to top