distance ospf
31-6 OSPFv3 Configuration
distance ospf
This command sets the route preference value of OSPFv3.
Syntax
distance ospf {intra | inter | type1 | type2} preference
no distance ospf {intra | inter | type1 | type2}
Parameters
Defaults
The default preference values are:
Intra-area = 8
Inter-area = 10
Type 1 = 13
Type 2 = 50
Mode
Router OSPFv3 configuration: C3(su)->router(Config-router)#
Usage
Lower route preference values are preferred when determining the best route. The OSPFv3
specification (RFC 2328) requires that preferences must be given to the routes learned via OSPFv3
in the following order: intra-area < inter-area < Type 1 < Type 2.
A route with a preference of 255 cannot be used to forward traffic.
Use the no form of this command to reset the preference values back to the defaults.
Example
The following example set the intra-area preference to 5.
C3(su)->router(Config-router)# distance ospf intra 5
intra Specifies the preference for intra-area routes (all routes within an area)
inter Specifies the preference for inter-area routes (all routes between areas)
type1 Specifies the preference for Type 1 external routes (routes learned by
redistribution from other routing domains)
type2 Specifies the preference for Type 2external routes (routes learned by
redistribution from other routing domains)
preference The preference range is from 1 to 255.