OcNOS-RON-6.3.1 : Layer 3 Guide : Open Shortest Path First Command Reference : OSPFv2 Commands : distance
distance
Use this command to set OSPF administrative distances.
The administrative distance rates the trustworthiness of a routing information source. A higher distance value means a lower trust rating. For example, an administrative distance of 255 means that the routing information source cannot be trusted and should be ignored.
Use the no form of this command to restore the default value (110).
Command Syntax
distance <1-255>
distance <1-255> A.B.C.D/M (WORD|)
distance ospf {intra-area <1-255>|inter-area <1-255>|external <1-255>}
no distance <1-255>
no distance <1-255> A.B.C.D/M (WORD|)
no distance ospf {intra-area |inter-area |external}
Parameters
<1-255>
Used alone, this parameter specifies a default administrative distance used when no other specification exists for a routing information source.
intra-area
Routes within an area.
<1-255>
Distance for all routes within an area
inter-area
Routes from one area to another area.
<1-255>
Distance for all routes from one area to another area.
external
Routes from other routing domains learned by redistribution.
<1-255>
Distance for routes from other routing domains learned by redistribution.
A.B.C.D/M
Distance for routes to prefixes whose nexthop matches this address.
WORD
Name of access list to apply to route updates.
Default
By default, distance for each type of route (intra-, inter-, or external) is 110
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#router ospf 100
(config-router)#distance ospf inter-area 20 intra-area 10 external 40
Last modified date: 07-13-2023