Open shortest path first is the full form of OSPF. It's a term in computer networks. Today I am going to show how to execute OSPF for multiple area in the cisco packet tracer. For tracing packet I like the cisco but if you want to work with any other software you can do.
So, I first will open the Cisco Packet Tracer. Then I will visualize the given networks. I will take the router for connecting different networks, switch for connecting the multiple end devices with the router and end devices like pc or laptops.
Here I have taken the network and now I will have to connect them with cable. I can cabling them manually. But the safest way is to use the auto cabling so that it can select and take the correct cable between two devices.
Here I have cabled them with an auto connection. As you can see here all the connections are not green signaled. Actually all the signals are red (yet to be established) except the PC-Switch connection. Before making them established I will put down the device information beside them.
I have put all the corresponding information beside the device. I have put the ip addresses of the PC, gateway of the network, interfaces and network id.
Now since it is OSPF for multiple area, we will have to mark the area.
Here the left side part (marked red) is in the area 1. Router0's se2/0 interface is in this area too.
The upper side red part is in the area 0. If any device want to send packet in anywhere in the whole network, it will have to be connected with the area 0.
The right red marked area is area 2. The Router1's se2/0 interface is in this network.
Now the visualization part is over. I will start the main task. First I will configure the router. I will click on the pc and then will go to desktop and finally I will go to the ip configuration and put the ip address, subnet mask and the gateway.
I have configured the ip addresses and now I will make the LAN connections established. For this I will go to the adjacent routers of the switches and go to the CLI to write the commands.
For Router3:
Router>enable
Router#conf t
Router(config)#int fa0/0
Router(config-if)#ip add 192.168.2.1 255.255.255.0
Router(config-if)#no shut
Router(config-if)#
end
Now I will make the WAN connections established. I will again go to the CLI of the routers and write commands.
I have written the commands in the CLI. Command for Router0:
With Router2:
Router>enable
Router#conf t
Router(config)#int s2/0
Router(config-if)#ip add 10.0.0.2 255.0.0.0
Router(config-if)#no shut
Router(config-if)#
end
With Router1:
Router#conf t
Router(config)#int s3/0
Router(config-if)#ip add 20.0.0.1 255.0.0.0
Router(config-if)#no shut
Router(config-if)#end
I have done the same type of commands on the CLI of other routers. And this made all the connection to be established.
Here all the connection signals are green. That means the connection has been established.
Now I will write the OSPF commands in the CLI for different area.
Commands for Router3:
Router>enable
Router#conf t
Router(config)#router ospf 1
Router(config-router)#network 30.0.0.0 0.0.0.255 area 2
Router(config-router)#network 192.168.2.0 0.255.255.255 area 2
Router(config-router)#end
Here I will have to enter the router configuration first and then write router ospf 1. The 1 here means the process id number of the OSPF. Then I need to write the network id those are directly connected with the router and following I have to put down the wild card mask here instead of the subnet mask. Remember that the OSPF requires the wildcard mask. The I have to write the area where the router interface is. According to my networks there are 3 areas: area 0, area 1 and area 2. So, I will put the corresponding area number in this case.
Now it's time to check whether message passes. At first if I pass message it will show fail. Don't worry. Because when you delete the results and again pass message they'll show it successful.
So, this is the result of second message passing. Now I will write a command to see if all the networks are connected.
I will again go to the CLI and write down the command "show ip route".
Here for Router2 it shows the result of which network from the area and which network from outside of the network is connected with the router. Here I have total 5 networks and it shows that the router is successfully connected with them.
Now I will write another command "show ip ofpf". And it results:
Router2 is in the area 1. So, it's showing the details of this area. The other router will do the same for the corresponding area.
I have made some pings and it results:
The ping result is also successful. No packet has been lost here.
So, this is the process I like to do OSPF in different areas. It's quite same to the OSPF in the same area. The only different is when you do the OSPF commands you have to put the corresponding areas unlike 0 used for the single area OSPF. And do it in a step by step process. In this way you won't forget anything and won't be messed up with the task.