R3303-HP HSR6800 Routers Layer 3 - IP Routing Configuration Guide

76
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.
To configure OSPF preference:
Ste
p
Command
Remarks
1. Enter system view.
system-view N/A
2. Enter OSPF view.
ospf [ process-id | router-id router-id
| vpn-instance vpn-instance-name ] *
N/A
3. 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
This section describes configuring OSPF to redistribute manually configured routes or routes discovered
by other routing protocols.
Only active routes can be redistributed. Use the display ip routing-table protocol command to view route
state information.
Configuring OSPF to redistribute routes from other routing protocols
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 routes, and direct routes, and advertise them in Type-5
LSAs or Type-7 LSAs. In addition, you can filter redistributed routes so that OSPF advertises only permitted
routes in Type-5 LSAs or Type-7 LSAs.
To configure OSPF route redistribution:
Ste
p
Command
Remarks
1. Enter system view.
system-view N/A
2. Enter OSPF view.
ospf [ process-id | router-id router-id |
vpn-instance vpn-instance-name ] *
N/A
3. Configure OSPF to
redistribute routes from a
different protocol.
import-route protocol [ process-id |
all-processes | allow-ibgp ] [ cost cost | type
type | tag tag | route-policy
route-policy-name ] *
By default, OSPF does not
redistribute routes.
4. Configure OSPF to filter
redistributed routes before
advertisement.
filter-policy { acl-number | ip-prefix
ip-prefix-name } export [ protocol
[ process-id ] ]
Optional.
By default, OSPF does not
filter redistributed routes
before advertisement.