To configure OSPF protocol using cisco packet tracer simulation tool.
Algorithm
Step 1: Start – All Programs – cisco packet tracer – cisco packet tracer 5.3.
Step 2: Add the network device such as PC, switch and router in work area.
Step 3: Connect PC to switch using Copper media Straight through Cable in Fast Ethernet port and use serial cable for router to router connection.
Step 4: Apply the IP address and proper subnet mask.
Step 5: Configure OSPF Protocol use the following syntax
Router(config)# router ospf process_ID
Router(config-router)# network IP_address wildcard_mask area area_id
Step 6: After complete configuration send the packet (Add Simple PDU) one network to another network.
Step 7: Check the data flow to the network use real time mode (or) Simulation Mode.
Step 8: Now OSPF protocol was working well. Check the dynamic route and protocol use the command.
R1#show ip route
R1#show ip protocol
Block Diagram

Device Configuration
DEVICE | INTERFACE | IP ADDRESS | SUBNET MASK | GATEWAY |
PC1 | Fast Ethernet | 192.168.1.1 | 255.255.255.0 | 192.168.1.10 |
PC2 | Fast Ethernet | 192.168.1.2 | 255.255.255.0 | 192.168.1.10 |
PC3 | Fast Ethernet | 192.168.2.1 | 255.255.255.0 | 192.168.2.10 |
PC4 | Fast Ethernet | 192.168.3.1 | 255.255.255.0 | 192.168.3.10 |
PC5 | Fast Ethernet | 192.168.4.1 | 255.255.255.0 | 192.168.4.10 |
PC6 | Fast Ethernet | 192.168.4.2 | 255.255.255.0 | 192.168.4.10 |
R1 | Fast Ethernet0/0 | 192.168.1.10 | 255.255.255.0 | N/A |
Fast Ethernet1/0 | 192.168.2.10 | 255.255.255.0 | N/A | |
Serial 2/0 | 11.1.1.1 | 255.255.255.252 | N/A | |
R2 | Serial 2/0 | 11.1.1.2 | 255.255.255.252 | N/A |
Serial 3/0 | 11.1.1.5 | 255.255.255.252 | N/A | |
R3 | Fast Ethernet0/0 | 192.168.3.10 | 255.255.255.0 | N/A |
Fast Ethernet1/0 | 192.168.4.10 | 255.255.255.0 | N/A | |
Serial 3/0 | 11.1.1.6 | 255.255.255.252 | N/A |
R1 Configuration
Router>enable
Router# configure terminal
Device Name and Particular interface Configuration
Router(config)#hostname R1
R1(config)#interface FastEthernet0/0
R1(config-if)#no shutdown
R1(config-if)#ip address 192.168.1.10 255.255.255.0
R1(config-if)#exit
R1(config)#interface FastEthernet1/0
R1(config-if)#no shutdown
R1(config-if)#ip address 192.168.2.10 255.255.255.0
R1(config-if)#exit
R1(config)#interface Serial2/0
R1(config-if)#no shutdown
R1(config-if)#clock rate 72000
R1(config-if)#ip address 11.1.1.1 255.255.255.252
R1(config-if)#
OSPF Protocol Configuration Command
R1(config)#router ospf ?
<1-65535> Process ID
R1(config)#router ospf 7
R1(config-router)#network ?
A.B.C.D Network number
R1(config-router)#network 192.168.1.0 ?
A.B.C.D OSPF wild card bits
R1(config-router)#network 192.168.1.0 0.0.0.255 ?
area Set the OSPF area ID
R1(config-router)#network 192.168.1.0 0.0.0.255 area 7
R1(config-router)#network 192.168.2.0 0.0.0.255 area 7
R1(config-router)#network 11.1.1.0 0.0.0.3 area 7
R1(config-router)#
Save the running Configuration file to NVRAM
R1#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
R1#
Verify the OSPF Routing on the Routing Table
R1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
11.0.0.0/30 is subnetted, 2 subnets
C 11.1.1.0 is directly connected, Serial2/0
O 11.1.1.4 [110/128] via 11.1.1.2, 00:04:41, Serial2/0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
C 192.168.2.0/24 is directly connected, FastEthernet1/0
O 192.168.3.0/24 [110/129] via 11.1.1.2, 00:03:36, Serial2/0
O 192.168.4.0/24 [110/129] via 11.1.1.2, 00:03:36, Serial2/0
R1#
R1#show ip protocols
R1#show ip protocols
Routing Protocol is "ospf 7"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 192.168.2.10
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
192.168.1.0 0.0.0.255 area 7
192.168.2.0 0.0.0.255 area 7
11.1.1.0 0.0.0.3 area 7
Routing Information Sources:
Gateway Distance Last Update
11.1.1.5 110 00:05:18
192.168.2.10 110 00:06:30
192.168.4.10 110 00:05:18
Distance: (default is 110)
R1#
R2 Configuration
Router>enable
Router#configure terminal
Device Name and Particular interface Configuration
Router(config)#hostname R2
R2(config)#interface Serial2/0
R2(config-if)#no shutdown
R2(config-if)#no clock rate
This command applies only to DCE interfaces
R2(config-if)#ip address 11.1.1.2 255.255.255.252
R2(config-if)#exit
R2(config)#interface Serial3/0
R2(config-if)#no shutdown
R2(config-if)#clock rate 72000
R2(config-if)#ip address 11.1.1.5 255.255.255.252
R2(config-if)#exit
OSPF Protocol Configuration Command
R2(config)#router ospf 7
R2(config-router)#network 11.1.1.0 0.0.0.3 area 7
R2(config-router)#network 11.1.1.4 0.0.0.3 area 7
R2(config-router)#
Save the running Configuration file to NVRAM
R2#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
Verify the OSPF Routing on the Routing Table
R2#show ip route
R2#show ip protocols
R3 Configuration
Router>enable
Router#configure terminal
Device Name and Particular interface Configuration
Router(config)#hostname R3
R3(config)#interface FastEthernet0/0
R3(config-if)#no shutdown
R3(config-if)#ip address 192.168.3.10 255.255.255.0
R3(config-if)#exit
R3(config)#interface FastEthernet1/0
R3(config-if)#no shutdown
R3(config-if)#ip address 192.168.4.10 255.255.255.0
R3(config-if)#exit
R3(config)#interface Serial3/0
R3(config-if)#no shutdown
R3(config-if)#no clock rate
This command applies only to DCE interfaces
R3(config-if)#ip address 11.1.1.6 255.255.255.252
R3(config-if)#exit
OSPF Protocol Configuration Command
R3(config)#router ospf 7
R3(config-router)#network 192.168.3.0 0.0.0.255 area 7
R3(config-router)#network 192.168.4.0 0.0.0.255 area 7
R3(config-router)#network 11.1.1.4 0.0.0.3 area 7
R3(config-router)#
Save the running Configuration file to NVRAM
R3#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
R3#
Leave a Comment