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

On the area border and AS border of an OSPF network generally reside multiple routers for next-hop backup or traffic load balancing. A default route can be configured to reduce routing entries and improve resource usage on the OSPF network.

The default route is generally applied to the following scenarios:

  1. An ABR in an area advertises Type 3 LSAs carrying the default route within the area. routers in the area use the received default route to forward inter-area packets.
  2. An ASBR in an AS advertises Type 5 or Type 7 LSAs carrying the default route within the AS. routers in the AS use the received default route to forward AS external packets.

When no exactly matched route is discovered, the router can forward packets through the default route.

The preference of the default route in Type 3 LSAs is higher than that of the route in Type 5 or Type 7 LSAs.

The advertising mode of the default route is determined by the type of the area to which the default route is imported, as shown in Table 1.

Table 1 Default route advertising mode

Area Type

Generated By

Advertised By

LSA Type

Flooding Area

Common area

The default-route-advertise command

ASBR

Type 5 LSA

Common area

Stub area

Automatically

ABR

Type 3 LSA

Stub area

NSSA

The nssa [ default-route-advertise ] command

ASBR

Type 7 LSA

NSSA

Automatically

ABR

Type 3 LSA

NSSA

Totally NSSA

Automatically

ABR

Type 3 LSA

NSSA

Perform the following steps on the ASBR running OSPF.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run ospf [ process-id ]

    The OSPF process view is displayed.

  3. Run default-route-advertise [ [ always | permit-calculate-other ] | cost cost | type type | { route-policy route-policy-name | route-filter route-filter-name } | distribute-delay delay-time ] *

    The default route is imported into the OSPF process.

    For details about how to configure the default route in the NSSA, see Configuring an NSSA.

  4. Run commit

    The configuration is committed.

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