Configuring external route redistribution and control

Configuring route redistribution for OSPF establishes the routing switch as an ASBR for importing and translating different protocol routes into OSPF. When you configure redistribution for OSPF, you can specify that static, connected, or BGP routes external to the OSPF domain are imported as OSPF routes.

Prerequisites

You must be in the router configuration context, as indicated by the switch(config-router)# prompt.

Procedure
  1. Enable route redistribution using the following command and specify one of the following parameters: bgp, connected, static. For command details, see redistribute.

    redistribute {bgp | connected | static}

    For example, the following command sets redistribution of connected routes as OSPF routes:
    switch(config-router)# redistribute connected
  2. Optionally, modify the default metric for redistribution using the following command. For command details, see default-metric.

    default-metric <metric-value>

    For example, the following command sets the default metric for redistribution to 37.
    switch(config-router)# default-metric 37
  3. Optionally, set the cost of default-summary LSAs using the following command. For command details, see area <AREA-ID> default-metric.

    area <area-id> default-metric <cost>

    For example, the following command sets the cost of default summary LSAs to 2.
    area 1 default-metric 2
  4. Optionally, set the protocol to advertise a maximum metric so that other routers do not prefer this router as an intermediate hop in their shortest path first (SPF) calculations. For command details, see max-metric router-lsa.

    max-metric router-lsa [on-startup [<seconds>]]

    For example, the following command sets advertise max-metric router-lsa on startup.
    switch(config-router)# max-metric router-lsa on-startup 3000
  5. Set the maximum number of ECMP routes that OSPF can support using the following command. For command details, see maximum-paths.

    maximum-paths <max-value>

    For example, the following command sets the maximum number of ECMP routes to 8.
    switch(config-router)# maximum-paths 8