How to configure OSPF for multiple areas?
OSPF is an open standard protocol and not
relate to any particular vendor. OSPF propagate the changes to all
networks more quickly as compare to RIP, IGRP protocols and only send
the changed part of the routing table to the other routers with in their
area. We can decrease the size of routing table by dividing a big
network into logically small segment using its area feature. When you
used OSPF for multiple areas, its configuration method is differs from
the RIP and IGRP.

There are some common OSPF
configuration and Executable commands:
OSPF configuration on Router
A
In global configuration mode
Router-A(config) # router ospf
10 (Here 10 indicate the process identification number)
Router-A(config-Router) #
network 1.0.0.0 0.255.255.255 area 0 (Here 1.0.0.0 indicate the network
ID and 0.225.255.255 wildcard mask with area 0)
Router-A(config-Router) #
network 3.0.0.0 0.255.255.255 area 2 (Here 3.0.0.0 indicate the network
ID and 0.225.255.255 wildcard mask with area 2)
Router-A(config-Router) #
network 192.168.1.0 0.0.0.255 area 2 (Here 192.168.1.0 indicate the
network ID and 0.0.0.255 wildcard mask with area 2)
OSPF configuration on Router
B
In global configuration mode
Router-B(config) # router ospf
20 (Here 20 indicate the process identification number)
Router-B(config-Router) #
network 1.0.0.0 0.255.255.255 area 0 (Here 1.0.0.0 indicate the network
ID and 0.225.255.255 wildcard mask with area 0)
Router-B(config-Router) #
network 2.0.0.0 0.255.255.255 area 0 (Here 2.0.0.0 indicate the network
ID and 0.225.255.255 wildcard mask with area 0)
Router-B(config-Router) #
network 192.168.2.0 0.0.0.255 area 0 (Here 192.168.2.0 indicate the
network ID and 0.0.0.255 wildcard mask with area 0)
OSPF configuration on Router
C
In global configuration mode
Router-C(config) # router ospf
30 (Here 30 indicate the process identification number)
Router-C(config-Router) #
network 3.0.0.0 0.255.255.255 area 2 (Here 3.0.0.0 indicate the network
ID and 0.225.255.255 wildcard mask with area 2)
Router-C(config-Router) #
network 2.0.0.0 0.255.255.255 area 0 (Here 2.0.0.0 indicate the network
ID and 0.225.255.255 wildcard mask with area 0)
Router-C(config-Router) #
network 192.168.3.0 0.0.0.255 area 1 (Here 192.168.3.0 indicate the
network ID and 0.0.0.255 wildcard mask with area 1)
Now on all routers each Network route will be
added automatically. You can verify this by using command Router#show ip
router ospf on all routers.