Configures an administrative distance value for OSPFv2 and OSPFv3 routes.
The administrative distance value for OSPFv2 and OSPFv3 routes is 110.
OSPF router configuration mode
OSPFv3 router configuration mode
OSPF router VRF configuration mode
OSPFv3 router VRF configuration mode
You can configure a unique administrative distance for each type of OSPF route.
The distances you specify influence the choice of routes when the device has multiple routes from different protocols for the same network. The device prefers the route with the lower administrative distance. However, an OSPFv2 or OSPFv3 intra-area route is always preferred over an OSPFv2 or OSPFv3 inter-area route, even if the intra-area route‘s distance is greater than the inter-area route‘s distance.
The no form of the commands reverts to the default setting.
The following example sets the distance value for all external routes to 125.
device# configure terminal device(config)# router ospf device(config-router-ospf-vrf-default-vrf)# distance external 125
The following example sets the distance value for intra-area routes to 80.
device# configure terminal device(config)# router ospf device(config-router-ospf-vrf-default-vrf)# distance intra-area 80
The following example sets the distance value for inter-area routes to 90.
device# configure terminal device(config)# ipv6 router ospf device(config-ipv6-router-ospf-vrf-default-vrf)# distance inter-area 90