OSPF stands for Open Standard Path First. It is an open standard link state routing protocol. It uses cost metric to calculate the best route from source to destination for a given network. It supports unlimited number of hops and typically used for large networks such as Internet. It is complex routing protocol and understanding each and everything about the OSPF is beyond from the CCNA syllabus. However, following link will give provide you the basis concept and features that you must know about OSPF.
Click here to know the key features, components and notes of the OSPF routing protocol.
Once you are familiar with the basics of OSPF routing protocol, let’s start to configure OSPF. Load the Routing Topology file (same that we have been using with RIP and EIGRP) in Packet Tracer. We assume that the IP address configuration is already configured on each router as per the following table.
|Sr. No.||Device||Interface||IP Address|
|1||Router1||Fa0/ 1||10.0.0.1/ 8|
|S1/ 0||192.168.1.1/ 24|
|Fa0/ 0||126.96.36.199/ 8|
|Fa0/ 1||188.8.131.52/ 24|
|3||Router3||Fa0/ 1||184.108.40.206/ 24|
|4||Switch1||N/ A||N/ A|
|5||Switch2||N/ A||N/ A|
Please have a look at the following figure that we will use to configure and test the OSPF configuration. Understand clearly which interfaces are connected to which areas and what IP addresses are configured on them.
Execute the show ip interface brief command on each router to verify the IP configuration. Once you verified the IP configuration on each router, proceed next to perform this exercise.
Understating Command Syntax
The OSPF routing protocol uses the following command syntax:
Router( config)# router ospf < process id 1-65535 > Router( config-router) network < network address > < wild card mask > area < 0-4294967295 >
Note: You can define an area number either in the decimal format or in the IP address format. For example, the area number 20 could be defined as 20 in the decimal format or as 0.0.0.20 in the IP address format.
Configuring the OSPF Routing
To configure the OSPF protocol in the loaded topology (Routing Topology), you need to perform the following steps:
1. On Router1, execute the following commands:
Router1( config)# router ospf 100 Router1( config-router)# network 10.0.0.0 0.255.255.255 area 0 Router1( config-router)# network 192.168.1.0 0.0.0.255 area 0.0.0.0 Router1( config-router)# exit
2. On Router2, execute the following commands:
Router2( config)# router ospf 100 Router2( config-router)# network 220.127.116.11 0.255.255.255 area 0 Router2( config-router)# network 192.168.1.0 0.0.0.255 area 0 Router2( config-router)# network 18.104.22.168 0.0.0.255 area 1 Router2( config-router)# exit Router2( config)# exit Router2# show ip route
3. On Router3, execute the following commands:
Router3( config)# router ospf 200 Router3( config-router)# network 22.214.171.124 0.0.0.255 area 1 Router3( config-router)# exit Router3( config)# exit Router3# show ip route
Verifying OSFP Configuration
Once, you have configured OSPF on all the routers, now it is time to test and verify your configuration. To verify and test the OSPF configuration, execute the following commands on any router and review the output of each command. All of the following commands are self-explanatory.
Router# show ip ospf neighbor Router# show ip ospf border-routers Router# show ip ospf border-routers
1. To test the connectivity between all the devices in the loaded topology, execute the ping 10.0.0.2 command on Router3.
You should be able to communicate to PC0 successfully.
2. Close Packet Tracer without saving any configuration in the Routing Topology file.