distance ospf

Use this command to configure the administrative distance for OSPF routes.

Syntax

distance [ospf {external | intra-area}] weight
no distance ospf {external | intra-area}

Parameters

external | intra-area Applies the distance value to external (type 5 and type 7) or to intra-area routes.

The value for intra-area distance must be less than the value for external distance.

weight Specifies an administrative distance for OSPF routes. Valid values are 1-255. Default: 110.

Defaults

If route type is not specified, the distance value will be applied to all OSPF routes (110).

Mode

OSPF router configuration.

Usage

If several routes (coming from different protocols) are presented to the Extreme Networks S- K- and 7100-Series Route Table Manager (RTM), the protocol with the lowest administrative distance will be chosen for route installation. By default, OSPF administrative distance is set to 110. The distance command can be used to change this value, resetting OSPF‘s route preference in relation to other routes as shown in the table below.

Route Source Default Distance
Connected 0
Static 1
BGP (S-, 7100-Series) 20 - Routes external to the AS

200 - Routes internal to the AS

OSPF 110
RIP 120

The distance ospf command applies the value to the specified route type.

The “no” form of this command resets OSPF administrative distance to the default value of 110.

Example

This example shows how to change the default administrative distance for external OSPF routes to 100:

System(rw-config)->router ospf 1
System(rw-config-ospf-1)->distance ospf external 100