Open In App

Configure and Verify Single Area OSPFv2

Last Updated : 22 Jun, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

Open Shortest Path First (OSPF) is a link-state routing protocol that is used to find the distance between two endpoints of a network, as well as the best path between them and the routers in the network, which can be updated by the router itself using link-state information that it receives from other routers in the network on a regular basis or via multicasting procedures such as OSPF area 0 multicast messages, OSPF hello packets or router advertisements The RAs are sent out periodically by a router to advertise its capabilities and other information about the router’s neighbor routers in the OSPF areas. 

For more details, refer to the article Open Shortest Path First (OSPF).

Steps to Configure Single-Area OSPF Version 2:

Step 1: First, we have to create a network topology of the devices listed below:

S.NO Device Name Model Name Qty.
1. PC PC

3

2. Router PT-Router

3

3. Cable Automatic connecting cable

Null

 

Step 2: After creating the network topology we have to assign IPv4 addresses, subnet mask, and default gateway to Host (PCs) according to the IP addressing table given below.

IP Addressing Table of PCs

S.No Device Name IPv4 address Subnet Mask Default Gateway
1. PC0 192.1681.3 255.255.255.0 192.168.1.1
2. PC1 192.168.2.3 255.255.255.0 192.168.2.1
3. PC3 192.168.3.3 255.255.255.0 192.168.3.1

To configure PCs follow these steps:

  • Click on PC0 then go to desktop.
  • Then, IP configuration, and there you’ll find IPv4 configuration.
  • Add IPv4 address, subnet mask, and default gateway according to the IP addressing table given above.
  • Repeat this procedure with PC1 and PC2 and configure all PCs.

Step 3:  Configuring Routers with IP addresses and default gateway.

IP addressing table for routers:

S.NO Device Interface IPv4 Address Subnet mask
1 router0 FastEthernet0/0 192.168.1.1 255.255.255.0
    Serial 2/0 192.168.12.1 255.255.255.252
    Serial 3/0 192.168.13.1 255.255.255.252
2 router1 FastEthernet0/0 192.168.2.1 255.255.255.0
    serial 2/0 192.168.12.2 255.255.255.252
    serial 3/0 192.168.23.1 255.255.255.252
3 router2 FastEthernet0/0 192.168.3.1 255.255.255.0
    serial 2/0 192.168.13.2 255.255.255.252
    serial 3/0 192.168.23.2 255.255.255.252
  • To configure router0, click on router0.
  • Go to config.
  • then configure the router0 with the help of the IP addressing table given above.
  • to make sure to turn on the port.
  • and repeat the same procedure with router1 and router2 and hence all of the devices will be configured.

Step 3: Configure OSPFv2 in a single area

Now we have to add commands to configure the routers to open the shortest path first

1. Router0

  • Type these commands in CLI of router0.
Router(config-if)#
Router(config-if)#router ospf 1
Router(config-router)#network 192.168.1.0 0.0.0.255 area 0
Router(config-router)#network 192.168.12.0 0.0.0.3 area 0
Router(config-router)#network 192.168.13.0 0.0.0.3 area 0
Router(config-router)#exit
Router(config)#

Router(config)#int lo0
Router(config-if)#ip address 1.1.1.1 255.255.255.255
Router(config-if)#end
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#copy run start
Destination filename [startup-config]? 
Building configuration...
[OK]

2. Router1

Router(config)#router ospf 1
Router(config-router)#network 192.168.2.0 0.0.0.255 area 0
Router(config-router)#network 192.168.12.0 0.0.0.3 area 0
Router(config-router)#network 192.168.23.0 0.0.0.3 area 0
Router(config-router)#exit
Router(config)#
Router(config)#int lo0
Router(config-if)#ip address 2.2.2.2 255.255.255.255
Router(config-if)#end
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#copy run start
Destination filename [startup-config]? 
Building configuration...
[OK]

3. Router3

Router(config)#router ospf 1
Router(config-router)#network 192.168.3.0 0.0.0.255 area 0
Router(config-router)#network 192.168.13.0 0.0.0.3 area 0
Router(config-router)#network 192.168.23.0 0.0.0.3 area 0
Router(config-router)#exit
Router(config)#
Router(config)#int lo0
Router(config-if)#ip address 2.2.2.2 255.255.255.255
Router(config-if)#end
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#copy run start
Destination filename [startup-config]? 
Building configuration...
[OK]

Step 4: Now we have to verify the network by executing these experiments we’ll send PDU packet from PC0 to PC1:

We will use the ping command to verify the network connection:

  • Click on PC0 and go to the command prompt.
  • Then, type ping 192.168.2.3.

 

Simulation Result:

 


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads