OSPF Route Preference Intra-Area vs Inter-Area
In OSPF routing, a router can learn the same network prefix from both intra-area and inter-area sources simultaneously. However, when determining which route to install in the routing table, OSPF prioritizes intra-area routes over inter-area routes. This preference is in accordance with OSPF's path selection process. Intra-area routes are deemed more reliable as they originate within the same OSPF area, providing a more direct and stable path to the destination.
For instance, if a network within Area 1, such as 192.168.1.0/24, is advertised both internally and via another area (e.g., Area 0), the intra-area route is preferred and installed in the routing table. If the intra-area route becomes unavailable, when OSPF reconverges, it will switch to the inter-area route, ensuring continuous network connectivity.
Links
https://networklessons.com/ospf/ospf-path-selection-explained/