On an OSPF network, multiple switches often reside on the area border and AS border for next-hop backup or traffic load balancing. To reduce routing entries and improve resource usage on the OSPF network, you can configure a default route in the following scenarios:
When no matching route is discovered, the switch can forward packets through a default route.
The preference of a default route in Type 3 LSAs is higher than that of the route in Type 5 or Type 7 LSAs.
Advertisement of a default route is determined by the type of the area to which the default route needs to be imported. Table 1 lists the default route advertisement by area type.
Area Type |
Generated By |
Advertised By |
LSA Type |
Flooding Area |
---|---|---|---|---|
Common area |
A default route is generated using the default-route-advertise command. |
ASBR |
Type 5 LSA |
Common area |
Stub area |
A default route is generated automatically. |
ABR |
Type 3 LSA |
Stub area |
NSSA |
A default route is generated using the nssa [ default-route-advertise ] command. |
ASBR |
Type 7 LSA |
NSSA |
Totally NSSA |
A default route is generated automatically. |
ABR |
Type 3 LSA |
NSSA |
Perform the following steps on an ASBR running OSPF.