In Part 1, you will set up the network topology and configure basic settings and interface addressing on the router and Layer 3 switches. You will also configure multiarea OSPFv2 on the OSPF backbone routers R1, R2, and R3. You will manually configure OSPFv2 on D1 and D2.
Attach the devices as shown in the topology diagram, and cable as necessary.
a. Console into each router, enter global configuration mode, and apply the basic settings, interface addressing, and OSPFv2 configuration. The configuration for each device is provided for you below.
Note: Routers were configured with OSPFv2.
Open configuration window
Router R1
hostname R1 no ip domain lookup line con 0 logging sync exec-time 0 0 exit banner motd # This is R1, OSPFv2 Route Summarization and Filtering Lab # interface g0/0 ip add 172.16.0.2 255.255.255.252 no shut exit interface GigabitEthernet0/1 ip address 10.10.0.1 255.255.255.252 no shut exit router ospf 123 router-id 1.1.1.1 auto-cost reference-bandwidth 1000 network 10.10.0.0 0.0.0.3 area 1 network 172.16.0.0 0.0.0.3 area 0 exit |
Router R2
hostname R2 no ip domain lookup line con 0 logging sync exec-time 0 0 exit banner motd # This is R2, OSPFv2 Route Summarization and Filtering Lab # interface g0/0 ip add 172.16.0.1 255.255.255.252 no shut exit interface GigabitEthernet0/1 ip address 172.16.1.1 255.255.255.252 no shut exit int lo0 ip add 209.165.200.225 255.255.255.224 exit ip route 0.0.0.0 0.0.0.0 Loopback0 router ospf 123 router-id 2.2.2.1 auto-cost reference-bandwidth 1000 network 172.16.0.0 0.0.0.3 area 0 network 172.16.1.0 0.0.0.3 area 0 default-information originate exit |
Router R3
hostname R3 no ip domain lookup line con 0 logging sync exec-time 0 0 exit banner motd # This is R3, OSPFv2 Route Summarization and Filtering Lab # interface g0/1 ip add 172.16.1.2 255.255.255.252 no shut exit interface GigabitEthernet0/2 ip address 10.10.4.1 255.255.255.252 no shut exit router ospf 123 router-id 3.3.3.1 auto-cost reference-bandwidth 1000 network 10.10.4.0 0.0.0.3 area 2 network 172.16.1.0 0.0.0.3 area 0 exit |
b. Save the running configuration to startup-config.
a. Console into the switch, enter global configuration mode, and apply the basic settings and interface addressing. A command list for each switch is provided below.
Note: OSPF routing will be manually configured.
Open configuration window
Switch D1
hostname D1 no ip domain lookup line con 0 exec-timeout 0 0 logging synchronous exit banner motd # This is D1, OSPFv2 Route Summarization and Filtering Lab # interface g0/1 no switchport ip address 10.10.0.2 255.255.255.252 no shut exit interface g0/3 no switchport ip address 10.10.1.1 255.255.255.0 no shut exit int Lo2 ip add 10.10.2.1 255.255.255.0 ip ospf network point-to-point exit int Lo3 ip add 10.10.3.1 255.255.255.0 ip ospf network point-to-point exit |
Switch D2
hostname D2 no ip domain lookup line con 0 logging sync exec-time 0 0 exit banner motd # This is D2, OSPFv2 Route Summarization and Filtering Lab # interface g0/2 no switchport ip address 10.10.4.2 255.255.255.252 no shut exit interface g0/3 no switchport ip address 10.10.5.1 255.255.255.0 no shut exit int Lo16 ip add 10.10.16.1 255.255.255.0 ip ospf network point-to-point exit int Lo17 ip add 10.10.17.1 255.255.255.0 ip ospf network point-to-point exit int Lo18 ip add 10.10.18.1 255.255.255.0 ip ospf network point-to-point exit int Lo19 ip add 10.10.19.1 255.255.255.0 ip ospf network point-to-point exit int Lo20 ip add 10.10.20.1 255.255.255.0 ip ospf network point-to-point exit int Lo21 ip add 10.10.21.1 255.255.255.0 ip ospf network point-to-point exit int Lo22 ip add 10.10.22.1 255.255.255.0 ip ospf network point-to-point exit int Lo23 ip add 10.10.23.1 255.255.255.0 ip ospf network point-to-point exit |
b. Save the running configuration to startup-config.
c. Verify the interfaces configured on D1.
D1# show ip interface brief | include manual GigabitEthernet0/1 10.10.0.2 YES manual up up GigabitEthernet0/3 10.10.1.1 YES manual up up Loopback2 10.10.2.1 YES manual up up Loopback3 10.10.3.1 YES manual up up |
Notice the loopback interfaces configured on D1. Theses interfaces were configured for lab purposes to simulate other LANs.
Note: Loopback interfaces were numbered based on the network address (e.g., Lo2 = 10.10.2.0/24) for convenience only.
d. Verify the interfaces configured on D2.
D2# show ip interface brief | include manual GigabitEthernet0/2 10.10.4.2 YES manual up up GigabitEthernet0/3 10.10.5.1 YES manual up up Loopback16 10.10.16.1 YES manual up up Loopback17 10.10.17.1 YES manual up up Loopback18 10.10.18.1 YES manual up up Loopback19 10.10.19.1 YES manual up up Loopback20 10.10.20.1 YES manual up up Loopback21 10.10.21.1 YES manual up up Loopback22 10.10.22.1 YES manual up up Loopback23 10.10.23.1 YES manual up up |
Again, notice the loopback interfaces configured on D1. Theses interfaces were configured for lab purposes to simulate other LANs.
a. Verify the routing table of R1 using the show ip route ospf command.
Open configuration window
R1# show ip route ospf | begin Gateway Gateway of last resort is 172.16.0.1 to network 0.0.0.0
O*E2 0.0.0.0/0 [110/1] via 172.16.0.1, 00:22:17, GigabitEthernet0/0 10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks O IA 10.10.4.0/30 [110/3] via 172.16.0.1, 00:21:43, GigabitEthernet0/0 172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks O 172.16.1.0/30 [110/2] via 172.16.0.1, 00:22:11, GigabitEthernet0/0 |
The R1 routing table contains an OSPF internal or intra-area route, and interarea route, and an external route to the default gateway.
b. Verify the routing table of R2 using the show ip route ospf command.
R2# show ip route ospf | begin Gateway Gateway of last resort is 0.0.0.0 to network 0.0.0.0
10.0.0.0/30 is subnetted, 2 subnets O IA 10.10.0.0 [110/2] via 172.16.0.2, 00:19:40, GigabitEthernet0/0 O IA 10.10.4.0 [110/2] via 172.16.1.2, 00:19:07, GigabitEthernet0/1 |
R2 is propagating the static default route and therefore does not have an external type 2 OSPF route (i.e., O* E2) in the routing table like R1 and R3.
c. Verify the routing table of R3 using the show ip route ospf command.
R3# show ip route ospf | begin Gateway Gateway of last resort is 172.16.1.1 to network 0.0.0.0
O*E2 0.0.0.0/0 [110/1] via 172.16.1.1, 00:20:00, GigabitEthernet0/1 10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks O IA 10.10.0.0/30 [110/3] via 172.16.1.1, 00:20:00, GigabitEthernet0/1 172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks O 172.16.0.0/30 [110/2] via 172.16.1.1, 00:20:00, GigabitEthernet0/1 |
Like R1, R3 has an internal route (LSA 2), an interarea route (LSA 3), and an external route (LSA 5).
The LANs connected to D1 and D2 are not yet advertised.
a. On D1, enable IP routing using the ip routing global configuration command.
Open configuration window
D1(config)# ip routing
|
b. Next, enter the OSPF router configuration mode using process ID 123, assign D1 the router ID 1.1.1.2 and set the reference bandwidth to distinguish between Gigabit Ethernet and FastEthernet interfaces.
D1(config)# router ospf 123 D1(config-router)# router-id 1.1.1.2 D1(config-router)# auto-cost reference-bandwidth 1000 % OSPF: Reference bandwidth is changed. Please ensure reference bandwidth is consistent across all routers. |
Note: Setting the reference cost value too high may cause issues with low-bandwidth interfaces.
c. Next, we need to have D1 advertise all four of its directly connected interfaces. Although this could be accomplished using four separate network statements, we will use the wildcard mask to advertise all four interfaces using one network statement.
D1(config-router)# network 10.10.0.0 0.0.3.255 area 1 D1(config-router)# end *Mar 1 01:01:22.540: %OSPF-5-ADJCHG: Process 123, Nbr 1.1.1.1 on GigabitEthernet0/1 from LOADING to FULL, Loading Done |
d. Verify the OSPF routing table on D1.
D1# show ip route ospf | begin Gateway Gateway of last resort is 10.10.0.1 to network 0.0.0.0
O*E2 0.0.0.0/0 [110/1] via 10.10.0.1, 00:05:20, GigabitEthernet0/1 10.0.0.0/8 is variably subnetted, 9 subnets, 3 masks O IA 10.10.4.0/30 [110/4] via 10.10.0.1, 00:05:20, GigabitEthernet0/1 172.16.0.0/30 is subnetted, 2 subnets O IA 172.16.0.0 [110/2] via 10.10.0.1, 00:05:20, GigabitEthernet0/1 O IA 172.16.1.0 [110/3] via 10.10.0.1, 00:05:20, GigabitEthernet0/1 |
e. Verify the routing table of R2 using the show ip route ospf command.
R2# show ip route ospf | begin Gateway Gateway of last resort is 0.0.0.0 to network 0.0.0.0
10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks O IA 10.10.0.0/30 [110/2] via 172.16.0.2, 00:40:29, GigabitEthernet0/0 O IA 10.10.1.0/24 [110/12] via 172.16.0.2, 00:06:56, GigabitEthernet0/0 O IA 10.10.2.0/24 [110/3] via 172.16.0.2, 00:06:56, GigabitEthernet0/0 O IA 10.10.3.0/24 [110/3] via 172.16.0.2, 00:06:56, GigabitEthernet0/0 O IA 10.10.4.0/30 [110/2] via 172.16.1.2, 00:39:56, GigabitEthernet0/1 |
Notice how its routing table now includes routes to the D1 LANs. Notice also how this has increased the number of routing entries.
a. On D2, enable IP routing using the ip routing global configuration command.
Open configuration window
D2(config)# ip routing
|
b. Next, enter the OSPF router configuration mode using process ID 123, assign D2 the router ID 3.3.3.2 and set the reference bandwidth to distinguish between Gigabit Ethernet and FastEthernet interfaces.
D2(config)# router ospf 123 D2(config-router)# router-id 3.3.3.2 D2(config-router)# auto-cost reference-bandwidth 1000 % OSPF: Reference bandwidth is changed. Please ensure reference bandwidth is consistent across all routers. |
Note: Setting the reference cost value too high may cause issues with low-bandwidth interfaces.
c. Advertise the 10.10.4.0/30 and 10.10.5.0 /255 networks. Again, this could be accomplished using separate network statements. However, the wildcard mask can be used to advertise both interfaces using one network statement as shown.
D2(config-router)# network 10.10.4.0 0.0.1.255 area 2 D2(config-router)# *Mar 1 01:15:02.643: %OSPF-5-ADJCHG: Process 123, Nbr 3.3.3.1 on GigabitEthernet0/2 from LOADING to FULL, Loading Done |
Note: The wildcard mask 0.0.1.255 matches both networks 10.10.4.0/30 and 10.10.5.0/24
d. Next, advertise the 10.10.16.0/24 through to 10.10.23.0/24 loopback interface networks. Traditionally, this would require 8 network statements. But again, the wildcard mask can be used to advertise all 8 interfaces using one network statement as shown.
D2(config-router)# network 10.10.16.0 0.0.7.255 area 2 D2(config-router)# end |
Note: The wildcard mask 0.0.7.255 matches networks 10.10.16.0/24 through to 10.10.23.0/24.
a. Verify the routing table of D2 using the show ip route ospf command.
Open configuration window
D2# show ip route ospf | begin Gateway Gateway of last resort is 10.10.4.1 to network 0.0.0.0
O*E2 0.0.0.0/0 [110/1] via 10.10.4.1, 00:02:19, GigabitEthernet1/0/11 10.0.0.0/8 is variably subnetted, 24 subnets, 3 masks O IA 10.10.0.0/30 [110/4] via 10.10.4.1, 00:02:19, GigabitEthernet0/2 O IA 10.10.1.0/24 [110/14] via 10.10.4.1, 00:02:19, GigabitEthernet0/2 O IA 10.10.2.0/24 [110/5] via 10.10.4.1, 00:02:19, GigabitEthernet0/2 O IA 10.10.3.0/24 [110/5] via 10.10.4.1, 00:02:19, GigabitEthernet0/2 172.16.0.0/30 is subnetted, 2 subnets O IA 172.16.0.0 [110/3] via 10.10.4.1, 00:02:19, GigabitEthernet0/2 O IA 172.16.1.0 [110/2] via 10.10.4.1, 00:02:19, GigabitEthernet0/2 |
D2 has OSPF route entries for:
b. From R2, verify the routing table using the show ip route ospf command.
R2# show ip route ospf | begin Gateway Gateway of last resort is 0.0.0.0 to network 0.0.0.0
10.0.0.0/8 is variably subnetted, 14 subnets, 2 masks O IA 10.10.0.0/30 [110/2] via 172.16.0.2, 01:00:10, GigabitEthernet0/0 O IA 10.10.1.0/24 [110/12] via 172.16.0.2, 00:26:37, GigabitEthernet0/0 O IA 10.10.2.0/24 [110/3] via 172.16.0.2, 00:26:37, GigabitEthernet0/0 O IA 10.10.3.0/24 [110/3] via 172.16.0.2, 00:26:37, GigabitEthernet0/0 O IA 10.10.4.0/30 [110/2] via 172.16.1.2, 00:59:37, GigabitEthernet0/1 O IA 10.10.5.0/24 [110/12] via 172.16.1.2, 00:09:55, GigabitEthernet0/1 O IA 10.10.16.0/24 [110/3] via 172.16.1.2, 00:00:13, GigabitEthernet0/1 O IA 10.10.17.0/24 [110/3] via 172.16.1.2, 00:00:13, GigabitEthernet0/1 O IA 10.10.18.0/24 [110/3] via 172.16.1.2, 00:00:13, GigabitEthernet0/1 O IA 10.10.19.0/24 [110/3] via 172.16.1.2, 00:00:13, GigabitEthernet0/1 O IA 10.10.20.0/24 [110/3] via 172.16.1.2, 00:00:13, GigabitEthernet0/1 O IA 10.10.21.0/24 [110/3] via 172.16.1.2, 00:00:13, GigabitEthernet0/1 O IA 10.10.22.0/24 [110/3] via 172.16.1.2, 00:00:13, GigabitEthernet0/1 O IA 10.10.23.0/24 [110/3] via 172.16.1.2, 00:00:13, GigabitEthernet0/1 |
Notice how the routing table of R2 now includes routes to the D1 and D2 LANs. And again, notice how this has increased the number of routing entries.
c. From D1, verify the routing table using the show ip route ospf command.
D1# show ip route ospf | begin Gateway Gateway of last resort is 10.10.0.1 to network 0.0.0.0
O*E2 0.0.0.0/0 [110/1] via 10.10.0.1, 00:18:43, GigabitEthernet1/0/11 10.0.0.0/8 is variably subnetted, 18 subnets, 3 masks O IA 10.10.4.0/30 [110/4] via 10.10.0.1, 00:18:43, GigabitEthernet0/1 O IA 10.10.5.0/24 [110/5] via 10.10.0.1, 00:09:56, GigabitEthernet0/1 O IA 10.10.16.0/24 [110/5] via 10.10.0.1, 00:08:27, GigabitEthernet0/1 O IA 10.10.17.0/24 [110/5] via 10.10.0.1, 00:08:27, GigabitEthernet0/1 O IA 10.10.18.0/24 [110/5] via 10.10.0.1, 00:08:27, GigabitEthernet0/1 O IA 10.10.19.0/24 [110/5] via 10.10.0.1, 00:08:27, GigabitEthernet0/1 O IA 10.10.20.0/24 [110/5] via 10.10.0.1, 00:08:27, GigabitEthernet0/1 O IA 10.10.21.0/24 [110/5] via 10.10.0.1, 00:08:27, GigabitEthernet0/1 O IA 10.10.22.0/24 [110/5] via 10.10.0.1, 00:08:27, GigabitEthernet0/1 O IA 10.10.23.0/24 [110/5] via 10.10.0.1, 00:08:27, GigabitEthernet0/1 172.16.0.0/30 is subnetted, 2 subnets O IA 172.16.0.0 [110/2] via 10.10.0.1, 00:18:43, GigabitEthernet0/1 O IA 172.16.1.0 [110/3] via 10.10.0.1, 00:18:43, GigabitEthernet0/1 |
Notice the OSPF routing table now includes the additional interarea routes from D2.