Lab: Multi-Area OSPFv2
Writeups for https://www.pingmynetwork.com
1. Topology Overview
This lab implements a network consisting of five routers (R1 through R5) and two end devices (PC1 and PC2). The network uses OSPFv2 (Process 1) and is hierarchically divided into three areas to optimize routing traffic:
- Area 0 (Backbone): Forms the central core of the network. It includes router R1 entirely, as well as the links toward R2 (on the 192.168.12.0/24 subnet) and R3 (on the 192.168.13.0/24 subnet).
- Area 1: Managed by R2, which acts as the Area Border Router (ABR). This area includes router R4, the 192.168.24.0/24 transit link, and the 10.10.1.0/24 LAN, to which PC1 is connected.
- Area 2: Managed by R3 in the ABR role. It includes router R5, the 192.168.35.0/24 transit link, and the 10.10.2.0/24 LAN, where PC2 resides.
2. Configuration Details and Best Practices
- Static Router IDs: Each router has an explicit unique identifier (for example,
router-id 1.1.1.1on R1 androuter-id 4.4.4.4on R4), ensuring topology stability during OSPF elections. - Point-to-Point Networks: All direct links between routers (for example, GigabitEthernet0/0 and 0/1) are configured with
ip ospf network point-to-point. This configuration disables the unnecessary Designated Router (DR) and Backup Designated Router (BDR) election, significantly speeding up convergence. - Passive Interfaces for Security: On the edge routers R4 and R5, the interfaces connected to the user LANs (GigabitEthernet0/2 on R4 and GigabitEthernet0/0 on R5) are configured as
passive-interface. This allows the routers to advertise the 10.10.1.0/24 and 10.10.2.0/24 networks into the OSPF domain without sendingHellopackets toward the PCs, improving security and saving bandwidth.
3. Host Configuration
The two PCs are statically configured with the following parameters for their respective subnets:
- PC1: Has IP address
10.10.1.10/24and points to gateway10.10.1.4(R4). - PC2: Has IP address
10.10.2.10/24and points to gateway10.10.2.5(R5).
R1
hostname R1 ! interface GigabitEthernet0/0 ip address 192.168.12.1 255.255.255.0 ip ospf network point-to-point ! interface GigabitEthernet0/1 ip address 192.168.13.1 255.255.255.0 ip ospf network point-to-point ! router ospf 1 router-id 1.1.1.1 network 192.168.12.0 0.0.0.255 area 0 network 192.168.13.0 0.0.0.255 area 0 !
R2
hostname R2 ! interface GigabitEthernet0/0 ip address 192.168.12.2 255.255.255.0 ip ospf network point-to-point ! interface GigabitEthernet0/1 ip address 192.168.24.2 255.255.255.0 ip ospf network point-to-point ! router ospf 1 router-id 2.2.2.2 network 192.168.12.0 0.0.0.255 area 0 network 192.168.24.0 0.0.0.255 area 1 !
R3
hostname R3 ! interface GigabitEthernet0/0 ip address 192.168.13.3 255.255.255.0 ip ospf network point-to-point ! interface GigabitEthernet0/1 ip address 192.168.35.3 255.255.255.0 ip ospf network point-to-point ! router ospf 1 router-id 3.3.3.3 network 192.168.13.0 0.0.0.255 area 0 network 192.168.35.0 0.0.0.255 area 2 !
R4
hostname R4 ! interface GigabitEthernet0/1 ip address 192.168.24.4 255.255.255.0 ip ospf network point-to-point ! interface GigabitEthernet0/2 ip address 10.10.1.4 255.255.255.0 ! router ospf 1 router-id 4.4.4.4 passive-interface GigabitEthernet0/2 network 10.10.1.0 0.0.0.255 area 1 network 192.168.24.0 0.0.0.255 area 1 !
R5
hostname R5 ! interface GigabitEthernet0/0 ip address 10.10.2.5 255.255.255.0 ! interface GigabitEthernet0/1 ip address 192.168.35.5 255.255.255.0 ip ospf network point-to-point ! router ospf 1 router-id 5.5.5.5 passive-interface GigabitEthernet0/0 network 10.10.2.0 0.0.0.255 area 2 network 192.168.35.0 0.0.0.255 area 2 !
