After creating an OSPF process, you need to configure the network segments to which the IP addresses of OSPF interfaces belong in an area. Each interface that runs OSPF must belong to an area, meaning that a network segment can belong to only one area.
OSPF checks the network mask carried in received Hello packets. If the network mask carried in such a packet is different from that of the local device, OSPF discards the Hello packet and does not establish any OSPF neighbor relationship.