Configuring ospf preference, Configuring ospf route redistribution, Configure route redistribution into ospf – H3C Technologies H3C S10500 Series Switches User Manual

Page 101: Configure ospf to redistribute a default route

Advertising
background image

86

Configuring OSPF preference

A router can run multiple routing protocols, and each protocol is assigned a preference. When the

routing protocols find routes to the same destination, the route found by the protocol with the highest

preference is selected as the best route.
Follow these steps to configure OSPF preference:

To do…

Use the command…

Remarks

Enter system view

system-view

Enter OSPF view

ospf [ process-id | router-id router-id
| vpn-instance vpn-instance-name ] *

Configure a preference for
OSPF

preference [ ase ] [ route-policy
route-policy-name ] value

Optional
By default, the preference of OSPF

internal routes is 10, and the preference
of OSPF external routes is 150.

Configuring OSPF route redistribution

Configure route redistribution into OSPF

On a router running OSPF and other routing protocols, you can configure OSPF to redistribute routes

from other protocols such as RIP, IS-IS, BGP, static, and direct routes, and advertise them in Type-5 LSAs

or Type-7 LSAs.
By filtering redistributed routes, OSPF translates only permitted routes into Type-5 LSAs or Type-7 LSAs for

advertisement.
Follow these steps to configure OSPF route redistribution:

To do…

Use the command…

Remarks

Enter system view

system-view

Enter OSPF view

ospf [ process-id | router-id router-id |
vpn-instance vpn-instance-name ] *

Configure OSPF to redistribute
routes from another protocol

import-route protocol [ process-id |
all-processes | allow-ibgp ] [ cost cost | type

type | tag tag | route-policy

route-policy-name ] *

Required
Not configured by default.

Configure OSPF to filter
redistributed routes before

advertisement

filter-policy { acl-number | ip-prefix
ip-prefix-name } export [ protocol

[ process-id ] ]

Optional
Not configured by default.

NOTE:

Only active routes can be redistributed. Use the display ip routing-table protocol command to view route
state information.

Configure OSPF to redistribute a default route

Using the import-route command cannot redistribute a default external route. To do so, you must use the

default-route-advertise command.
Follow these steps to configure OSPF to redistribute a default external route:

Advertising