12 distance (ospf) – CANOGA PERKINS CanogaOS Command Reference User Manual
Page 251

CanogaOS Command Line Reference
Revision 1.02
Proprietary & Confidential Canoga Pertkins Metro Ethernet Switches
Page 251 of 855
15.12 distance (OSPF)
To define Open Shortest Path First (OSPF) route administrative distances based on route type, use the 
distance command in router configuration mode. To restore the default value, use the no form of this 
command. 
 
Command Syntax 
distance {distance | ospf [external dist1] [inter-area dist2] | [intra-area dist3]} 
no distance {distance | ospf} 
distance Administrative
distance.
An
integer from 1 to 255. (Routes with a
distance value of 255 are not installed in the routing table.)
external dist1
(Optional) Sets the distance for routes from other routing domains, 
learned by redistribution. Range is 1 to 255. The default value is 110. 
inter-area dist2
(Optional) Sets the distance for all routes from one area to another 
area. Range is 1 to 255. The default value is 110. 
intra-area dist3
(Optional) Sets the distance for all routes within an area. Range is 1 
to 255. The default value is 110. 
 
Default 
dist1: 110 
dist2: 110 
dist3: 110 
 
Command Mode 
Router configuration
 
Usage 
You may specify one of the keywords or use distance only to apply to all types of routes. 
The distance command allows you to set a distance for an entire group of routes, rather than a specific 
route that passes an access list. 
A common reason to use the distance command is when you have multiple OSPF processes with 
mutual redistribution, and you want to prefer internal routes from one over external routes from the 
other. 
 
Examples 
The following example shows a router in autonomous system using both the Routing Information 
Protocol (RIP) and the OSPF routing protocols. The example advertises OSPF-derived routes using 
RIP and assigns the Internal Gateway Protocol (IGP)-derived routes a RIP metric of 10. 
router rip 
 default-metric 10 
 redistribute ospf 
 
Related Commands 
