Command
Distance OSPF
Use
This command changes the administrative distance for OSPF routes.
Syntax
Router(config-router)#distance ospf <intra-area distance><inter-area distance><external distance>
Example
In this example, we will change OSPF administrative distance to 150 for internal routes and 220 for external. Currently, we see OSPF is at its default administrative distance of 110.
R1(config-router)#do show ip route ospf |
Here, we change the distance with the distance ospf command.
R1(config)#router ospf 1 |
Now, we can see the change is reflected in the routing table.
R1(config)#do show ip route ospf |