< Home

Configuring OSPF to Import a Default Route

The default route is widely applied on the OSPF network to reduce routing entries in the routing table and filter specific routing information.

Context

If the default route is imported to the OSPF routing domain and an OSPF router within it is configured with a static default route, you need to set the precedence of static default route lower than that of the imported default route. Otherwise, the default route may not be assigned the highest priority in the routing table.

Procedure

  1. Access the system view.

    system-view

  2. Access the OSPF process view.

    ospf [ process-id ]

  3. Import default routes.

    default-route-advertise [ [ always | permit-calculate-other ] | cost cost | type type | route-policy route-policy-name [ match-any ] ] *

    When always is selected, you can import a default route to OSPF forcibly; otherwise, the routes can be imported only when local default routes exist.

    To advertise Type-3 summary LSA of the specified default route, run the default-route-advertise summary cost cost command.

    When summary is selected, you must first enable VPN; otherwise, the route cannot be aggregated.

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