OSPF with multi area

I am a CCNA student. I created one simple topology with three routes , each router have 2 loopback interfaces represent the different networks. Router 0 have Area Backbone 0 , Router 1 have Area 1 and Router 2 have area 2.

Problem is When i changed the AS number at Router 2 for the Area 2 , then those networks does not made the Adjancies. Why ?
As per my understanding we can change the AS numbers ? on each router in the same topology?

Below is the my configuration :

Router 0 have :

router ospf 1
 log-adjacency-changes
 network 192.168.1.0 0.0.0.255 area 0
 network 192.168.2.0 0.0.0.255 area 0
 network 20.20.20.0 0.0.0.255 area 0
 network 10.10.10.0 0.0.0.255 area 0

Router 1 have :

 router ospf 1
 log-adjacency-changes
 network 50.50.50.0 0.0.0.255 area 1
 network 60.60.60.0 0.0.0.255 area 1
 network 192.168.1.0 0.0.0.255 area 0

Router 2 have :

router ospf 1
log-adjacency-changes
network 192.168.2.0 0.0.0.255 area 0
!
router ospf 2
log-adjacency-changes
network 40.40.40.0 0.0.0.255 area 2
network 30.30.30.0 0.0.0.255 area 2

OSPF%20with%20Multi%20Area

Hello Mohammad,

OSPF doesn’t use AS numbers, only process numbers. Those process numbers don’t have to match on your routers.

The network command does two things for OSPF:

- Advertise the network
- Activate OSPF on the interface and send hello packets

On router 2, you have activated OSPF on its Gi0/1 interface by adding network 192.168.2.0 for process 1. This allows it to become neighbors with Router 0.

You also started OSPF process 2 on router 2 and advertised those two loopback interfaces. However, in process 2 there are no neighbors so nobody will ever learn those networks. You should remove process 1 on router 2 and add network 192.168.2.0 to process 2.

That allows router 2 to form neighbrs with router 0, and advertise your loopback interfaces.

Hope this helps!

Rene