Blame
|
1 | # Lab: Multi-Area OSPFv2 |
||||||
| 2 | ||||||||
| 3 | ## 1. Topology Overview |
|||||||
| 4 | ||||||||
| 5 | This lab implements a network consisting of five routers (R1 through R5) and two end devices (PC1 and PC2). |
|||||||
| 6 | The network uses OSPFv2 (Process 1) and is hierarchically divided into three areas to optimize routing traffic: |
|||||||
| 7 | ||||||||
| 8 | - **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). |
|||||||
| 9 | - **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. |
|||||||
| 10 | - **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. |
|||||||
| 11 | ||||||||
| 12 | ## 2. Configuration Details and Best Practices |
|||||||
| 13 | ||||||||
| 14 | - **Static Router IDs:** Each router has an explicit unique identifier (for example, `router-id 1.1.1.1` on R1 and `router-id 4.4.4.4` on R4), ensuring topology stability during OSPF elections. |
|||||||
| 15 | - **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. |
|||||||
| 16 | - **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 sending `Hello` packets toward the PCs, improving security and saving bandwidth. |
|||||||
| 17 | ||||||||
| 18 | ## 3. Host Configuration |
|||||||
| 19 | ||||||||
| 20 | The two PCs are statically configured with the following parameters for their respective subnets: |
|||||||
| 21 | ||||||||
| 22 | - **PC1:** Has IP address `10.10.1.10/24` and points to gateway `10.10.1.4` (R4). |
|||||||
| 23 | - **PC2:** Has IP address `10.10.2.10/24` and points to gateway `10.10.2.5` (R5). |
|||||||
| 24 | ||||||||
| 25 | ### R1 |
|||||||
| 26 | ``` |
|||||||
| 27 | hostname R1 |
|||||||
| 28 | ! |
|||||||
| 29 | interface GigabitEthernet0/0 |
|||||||
| 30 | ip address 192.168.12.1 255.255.255.0 |
|||||||
| 31 | ip ospf network point-to-point |
|||||||
| 32 | ! |
|||||||
| 33 | interface GigabitEthernet0/1 |
|||||||
| 34 | ip address 192.168.13.1 255.255.255.0 |
|||||||
| 35 | ip ospf network point-to-point |
|||||||
| 36 | ! |
|||||||
| 37 | router ospf 1 |
|||||||
| 38 | router-id 1.1.1.1 |
|||||||
| 39 | network 192.168.12.0 0.0.0.255 area 0 |
|||||||
| 40 | network 192.168.13.0 0.0.0.255 area 0 |
|||||||
| 41 | ! |
|||||||
| 42 | ||||||||
| 43 | ``` |
|||||||
| 44 | ||||||||
| 45 | ### R2 |
|||||||
| 46 | ``` |
|||||||
| 47 | hostname R2 |
|||||||
| 48 | ! |
|||||||
| 49 | interface GigabitEthernet0/0 |
|||||||
| 50 | ip address 192.168.12.2 255.255.255.0 |
|||||||
| 51 | ip ospf network point-to-point |
|||||||
| 52 | ! |
|||||||
| 53 | interface GigabitEthernet0/1 |
|||||||
| 54 | ip address 192.168.24.2 255.255.255.0 |
|||||||
| 55 | ip ospf network point-to-point |
|||||||
| 56 | ! |
|||||||
| 57 | router ospf 1 |
|||||||
| 58 | router-id 2.2.2.2 |
|||||||
| 59 | network 192.168.12.0 0.0.0.255 area 0 |
|||||||
| 60 | network 192.168.24.0 0.0.0.255 area 1 |
|||||||
| 61 | ! |
|||||||
| 62 | ``` |
|||||||
| 63 | ||||||||
| 64 | ### R3 |
|||||||
| 65 | ``` |
|||||||
| 66 | hostname R3 |
|||||||
| 67 | ! |
|||||||
| 68 | interface GigabitEthernet0/0 |
|||||||
| 69 | ip address 192.168.13.3 255.255.255.0 |
|||||||
| 70 | ip ospf network point-to-point |
|||||||
| 71 | ! |
|||||||
| 72 | interface GigabitEthernet0/1 |
|||||||
| 73 | ip address 192.168.35.3 255.255.255.0 |
|||||||
| 74 | ip ospf network point-to-point |
|||||||
| 75 | ! |
|||||||
| 76 | router ospf 1 |
|||||||
| 77 | router-id 3.3.3.3 |
|||||||
| 78 | network 192.168.13.0 0.0.0.255 area 0 |
|||||||
| 79 | network 192.168.35.0 0.0.0.255 area 2 |
|||||||
| 80 | ! |
|||||||
| 81 | ``` |
|||||||
| 82 | ||||||||
| 83 | ### R4 |
|||||||
| 84 | ``` |
|||||||
| 85 | hostname R4 |
|||||||
| 86 | ! |
|||||||
| 87 | interface GigabitEthernet0/1 |
|||||||
| 88 | ip address 192.168.24.4 255.255.255.0 |
|||||||
| 89 | ip ospf network point-to-point |
|||||||
| 90 | ! |
|||||||
| 91 | interface GigabitEthernet0/2 |
|||||||
| 92 | ip address 10.10.1.4 255.255.255.0 |
|||||||
| 93 | ! |
|||||||
| 94 | router ospf 1 |
|||||||
| 95 | router-id 4.4.4.4 |
|||||||
| 96 | passive-interface GigabitEthernet0/2 |
|||||||
| 97 | network 10.10.1.0 0.0.0.255 area 1 |
|||||||
| 98 | network 192.168.24.0 0.0.0.255 area 1 |
|||||||
| 99 | ! |
|||||||
| 100 | ``` |
|||||||
| 101 | ||||||||
| 102 | ### R5 |
|||||||
| 103 | ``` |
|||||||
| 104 | hostname R5 |
|||||||
| 105 | ! |
|||||||
| 106 | interface GigabitEthernet0/0 |
|||||||
| 107 | ip address 10.10.2.5 255.255.255.0 |
|||||||
| 108 | ! |
|||||||
| 109 | interface GigabitEthernet0/1 |
|||||||
| 110 | ip address 192.168.35.5 255.255.255.0 |
|||||||
| 111 | ip ospf network point-to-point |
|||||||
| 112 | ! |
|||||||
| 113 | router ospf 1 |
|||||||
| 114 | router-id 5.5.5.5 |
|||||||
| 115 | passive-interface GigabitEthernet0/0 |
|||||||
| 116 | network 10.10.2.0 0.0.0.255 area 2 |
|||||||
| 117 | network 192.168.35.0 0.0.0.255 area 2 |
|||||||
| 118 | ! |
|||||||
| 119 | ``` |
|||||||
