Open Shortest Path First (OSPF) is an open standard routing protocol that may be implemented on routers from multiple vendors. In this example the OSPF routing protocol will be implemented on two (2) Cisco routers.
First, I will issue the show ip protocols command to verify there is no existing routing protocol running on the router. If there was another routing protocol with a lower administrative distance (AD) such as IGRP or EIGRP then the OSPF configuration would have been void until IGRP or EIGRP were turned off.
Next, I will enter global configuration mode by entering the command configure terminal. After that I enabled the OSPF routing protocol with the command router ospf 1. The number “1” is the process ID for OSPF and is only locally significant.
Next, I specified the networks to be advertised (172.16.20.0/24 and 172.16.25.0/3) using wildcards and placed them in area 0.
Next, I entered the command show ip protocols to verify that the OSPF routing protocol is enabled on this router. Additionally, I can verify that it is running under process “1” and verify the networks that are being advertised.
Next, I configured the OSPF routing protocol, using the same method in the previous steps, on the other router in this example.
Now I will verify that the 172.16.20.0/24 is being advertised by the ORLSAN01 router by enter the command show ip route.
Additionally, I can ping the ethernet 0 interface (172.16.20.1) on ORLSAN01 to verify Internet Protocol (IP) connectivity.
I will now make my way back to ORLSAN01 and view the routing table to verify that the 172.16.30.0/24 network from ORLSAN02 is being advertised. As in my previous example I will ping the ethernet 0 interface (172.16.30.1) on ORLSAN02 to verify IP connectivity.
They were no dropped packets in either example so this configuration is successful.