OSPF Multi Areas on Juniper

OSPF (Open Shortest Path First) is a link-state routing protocol designed to scale efficiently in large networks. At its core, OSPF uses the concept of areas to optimize the distribution of routing information, reduce CPU and memory usage, and provide a modular network design.

  • What is Area 0?
    • Area 0 is also known as the backbone area and is the most critical area in OSPF. Think of it as the spine of a body that connects and supports all other areas.
    • All other areas in OSPF must connect to Area 0 through an Area Border Router (ABR). This ensures that routing information flows between all areas effectively.
  • Why Multiple Areas?
    • When all routers are in a single area (like Area 0), they share LSAs (Link-State Advertisements) with each other. This results in:
      • Larger LSDBs (Link-State Databases).
      • Increased CPU and memory usage due to frequent SPF (Shortest Path First) recalculations.
    • Multiple areas isolate LSAs and LSDBs, keeping computations local to each area, which improves efficiency.
  • Benefits of Multiple Areas:
    1. Reduced Overhead: Each area processes LSAs and SPF computations independently, minimizing resource consumption.
    2. Enhanced Scalability: Networks with hundreds of routers can be broken into smaller, manageable areas.
    3. Improved Stability: Changes in one area do not affect the entire network. For example, a link failure in Area 1 will not trigger SPF recalculations in Area 0 or Area 2.

Understanding the Router Roles in OSPF

When multiple areas are introduced, routers are classified into different roles based on their connectivity and function within the OSPF domain.

  1. Backbone Router
    • A router that has all its interfaces within Area 0.
    • Example: A router directly connected to other Area 0 routers.
  2. Internal Router
    • A router with all its interfaces within a single non-backbone area (e.g., Area 1).
    • Example: A router in Area 1 that doesn’t participate in Area 0 operations.
  3. Area Border Router (ABR)
    • Connects two or more OSPF areas, including Area 0.
    • Maintains separate LSDBs for each area it connects and runs SPF computations for each LSDB.
    • Example: A router connecting Area 0 to Area 1.
  4. Autonomous System Boundary Router (ASBR)
    • Connects the OSPF domain to an external routing protocol (e.g., RIP, BGP).
    • Redistributes routes between OSPF and the external protocol.
    • Example: A router with one interface in OSPF and another connected to the internet.

How OSPF Multi-Area Works

  • Routing Information Flow:
    1. Within an area, all routers share the same LSDB and calculate the shortest paths to all destinations in that area.
    2. The ABR exchanges summarized routing information between areas, ensuring each area knows about routes in other areas without participating in their SPF calculations.
    3. This separation ensures the LSDBs in each area remain manageable, and SPF recalculations are isolated to the affected area.
  • Example:
    Consider a network with three areas:

    • Area 0: Backbone with 20 routers.
    • Area 1: Branch with 10 routers.
    • Area 2: Data center with 15 routers.

    Each area processes LSAs and SPF within its boundaries. The ABRs connecting these areas ensure routing information is exchanged without overwhelming the routers in any single area.

Scenarios for Using Multiple Areas

  1. Large Networks:
    • A single OSPF area can handle up to 80 routers, but this is the upper limit. Beyond 30–40 routers, it’s advisable to create additional areas to reduce resource strain.
  2. Geographical Segmentation:
    • Divide areas based on physical locations (e.g., Area 1 for Branch A, Area 2 for Branch B).
  3. Departmental Segmentation:
    • Separate areas for different departments or business units (e.g., Area 1 for Finance, Area 2 for IT).
  4. Isolating Instability:
    • Create areas to prevent frequent link changes in one part of the network from affecting the entire domain.

 

Lab: Configuring OSPF Multi-Area

Let’s configure an OSPF multi-area network with three routers: R1, R2, and R3.

Lab Scenario

  • R1 and R2: Already configured in Area 0 from the previous lab.
  • R2 and R3: Will be configured to connect Area 1.
  • R3: Will have a loopback interface representing a network in Area 1.

We will verify the following:

  1. That R1 learns about the loopback network on R3 via R2.
  2. That R1 can ping the loopback IP on R3.

Configuration Steps

 

Step 1: Add IP Address to R2’s Interface

On R2: Configure FastEthernet 0/0/2 for Area 1.

R2# delete interface fastethernet 0/0/2 unit 0 family ethernet-switching

R2# edit interface fastethernet 0/0/2 unit 0 family inet

R2# set address 192.168.23.2/24

R2# set security zones security-zone trust interface fastethernet 0/0/2

R2# commit

Step 2: Assign R2’s Interface to Area 1

On R2: Add the interface to Area 1 in OSPF.

R2# edit protocols ospf area 1

R2# set interface fastethernet 0/0/2

R2# commit

Step 3: Configure R3

On R3: Set up the interface, IP address, and loopback.

R3# delete interface fastethernet 0/0/2 unit 0 family ethernet-switching

R3# edit interface fastethernet 0/0/2 unit 0 family inet

R3# set address 192.168.23.3/24

R3# set security zones security-zone trust interface fastethernet 0/0/2

R3# set interface loopback 0 unit 0 family inet

R3# set address 3.3.3.3/32

R3# set security zones security-zone trust interface loopback 0

R3# commit

Step 4: Add Interfaces to Area 1 on R3

On R3: Assign interfaces to Area 1.

R3# edit protocols ospf area 1

R3# set interface fastethernet 0/0/2

R3# set interface loopback 0

R3# commit

Step 5: Verify Neighborship

Check if R3 forms a neighborship with R2.

R3# show ospf neighbor

Neighbor ID Pri State Dead Time Address Interface

192.168.23.2 128 Full/DR 00:00:38 192.168.23.2 fe-0/0/2

Step 6: Check Routes on R1

Verify if R1 knows about R3’s loopback network.

R1# show route

3.3.3.3/32 [OSPF] via 192.168.23.2

192.168.23.0/24 [OSPF] via 192.168.23.2

Step 7: Ping R3’s Loopback from R1

Test connectivity between R1 and R3’s loopback.

R1# ping 3.3.3.3

PING 3.3.3.3 (3.3.3.3): 56 data bytes

64 bytes from 3.3.3.3: icmp_seq=0 ttl=64 time=1.234 ms

64 bytes from 3.3.3.3: icmp_seq=1 ttl=64 time=1.145 ms

Key Takeaways

  1. Dividing a network into multiple OSPF areas reduces CPU and memory usage.
  2. All areas must connect to Area 0 via an ABR.
  3. ABRs manage inter-area routing and maintain LSDBs for connected areas.
  4. Isolating SPF calculations to individual areas improves network stability and scalability.

Conclusion

This lesson covered the importance of using multiple OSPF areas, the types of routers involved, and how to configure and verify a multi-area network. In the next lesson, I will demonstrate route summarization to further reduce LSA overhead between areas. I hope this was informative, and I’ll see you next time!

0 Comments

Submit a Comment

About