8.2.1 Packet Tracer - Configure OSPFv2 in a Single Area (Answers)
Topology

8.2.1 Packet Tracer - Configure OSPFv2 in a Single Area
Addressing Table
| Device | Interface | IP Address | Subnet Mask |
|---|---|---|---|
| R1 | G0/0 | 172.16.1.1 | 255.255.255.0 |
| S0/0/0 | 172.16.3.1 | 255.255.255.252 | |
| S0/0/1 | 192.168.10.5 | 255.255.255.252 | |
| R2 | G0/0 | 172.16.2.1 | 255.255.255.0 |
| S0/0/0 | 172.16.3.2 | 255.255.255.252 | |
| S0/0/1 | 192.168.10.9 | 255.255.255.252 | |
| R3 | G0/0 | 192.168.1.1 | 255.255.255.0 |
| S0/0/0 | 192.168.10.6 | 255.255.255.252 | |
| S0/0/1 | 192.168.10.10 | 255.255.255.252 | |
| PC1 | NIC | 172.16.1.2 | 255.255.255.0 |
| PC2 | NIC | 172.16.2.2 | 255.255.255.0 |
| PC3 | NIC | 192.168.1.2 | 255.255.255.0 |
Objectives
- Part 1: Configure OSPFv2 Routing
- Part 2: Verify the Configurations
Background
In this activity, the IP addressing is already configured. You are responsible for configuring the three router topology with basic single area OSPFv2 and then verifying connectivity between end devices.
Note: The topology is the same one used in the chapter examples. In addition, the student practiced the configuration of this topology in the Syntax Checker activities. Therefore, the student should be able to complete this activity with minimal assistance.
Instructions
Part 1: Configure OSPFv2 Routing
Step 1: Configure OSPF on the R1, R2 and R3.
Use the following requirements to configure OSPF routing on all three routers:
- Process ID 10
- Router ID for each router: R1 = 1.1.1.1; R2 = 2.2.2.2; R3 = 3.3.3.3
- Network address for each interface
- LAN interface set to passive (do not use the default keyword)
Step 2: Verify OSPF routing is operational.
On each router, the routing table should now have a route to every network in the topology.
Step 3: Verify the Configurations
Each PC should be able to ping the other two PCs. If not, check your configurations.
Device Configs - Final
ROUTER R1
! ============================================================== !--- 8.2.1 Packet Tracer - Configure OSPFv2 in a Single Area !--- ANSWER SCRIPT FOR ROUTER R1 !--- Usage: copy this whole file and paste it into the R1 terminal (start at the R1> prompt). Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless. !--- Scope: IP addressing is already configured on all three routers !--- per the activity's own Background note - this script only adds !--- OSPFv2 routing. ! ============================================================== enable configure terminal ! -------------------------------------------------------------- !--- Part 1: Configure OSPFv2 (process ID 10) on R1. ! -------------------------------------------------------------- router ospf 10 !--- Explicit router ID, as required, instead of letting OSPF pick one !--- from the highest loopback/interface address. router-id 1.1.1.1 !--- LAN 1 (G0/0, 172.16.1.0/24). network 172.16.1.0 0.0.0.255 area 0 !--- Serial link to R2 (S0/0/0, 172.16.3.0/30). network 172.16.3.0 0.0.0.3 area 0 !--- Serial link to R3 (S0/0/1, 192.168.10.4/30). network 192.168.10.4 0.0.0.3 area 0 !--- LAN interface must be passive - no routers live on that segment, !--- so R1 shouldn't send Hellos out of it. Named explicitly (not !--- "passive-interface default") per the activity's requirement. passive-interface GigabitEthernet0/0 exit end ! -------------------------------------------------------------- !--- Save the configuration to NVRAM. (Press Enter when prompted for the destination filename.) ! -------------------------------------------------------------- copy running-config startup-config ! ============================================================== !--- Verification: !--- show ip ospf neighbor -> FULL adjacency with R2 (172.16.3.2) and R3 (192.168.10.6) !--- show ip route ospf -> routes to 172.16.2.0/24 and 192.168.1.0/24 via OSPF (O) !--- show ip protocols -> Router ID 1.1.1.1, passive interface GigabitEthernet0/0 !--- ping 172.16.2.2 / ping 192.168.1.2 -> PC2 and PC3, once OSPF has converged ! ==============================================================
ROUTER R2
! ============================================================== !--- 8.2.1 Packet Tracer - Configure OSPFv2 in a Single Area !--- ANSWER SCRIPT FOR ROUTER R2 !--- Usage: copy this whole file and paste it into the R2 terminal (start at the R2> prompt). Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless. !--- Scope: IP addressing is already configured on all three routers !--- per the activity's own Background note - this script only adds !--- OSPFv2 routing. ! ============================================================== enable configure terminal ! -------------------------------------------------------------- !--- Part 1: Configure OSPFv2 (process ID 10) on R2. ! -------------------------------------------------------------- router ospf 10 !--- Explicit router ID, as required. router-id 2.2.2.2 !--- LAN 2 (G0/0, 172.16.2.0/24). network 172.16.2.0 0.0.0.255 area 0 !--- Serial link to R1 (S0/0/0, 172.16.3.0/30). network 172.16.3.0 0.0.0.3 area 0 !--- Serial link to R3 (S0/0/1, 192.168.10.8/30). network 192.168.10.8 0.0.0.3 area 0 !--- LAN interface must be passive - named explicitly (not !--- "passive-interface default") per the activity's requirement. passive-interface GigabitEthernet0/0 exit end ! -------------------------------------------------------------- !--- Save the configuration to NVRAM. (Press Enter when prompted for the destination filename.) ! -------------------------------------------------------------- copy running-config startup-config ! ============================================================== !--- Verification: !--- show ip ospf neighbor -> FULL adjacency with R1 (172.16.3.1) and R3 (192.168.10.10) !--- show ip route ospf -> routes to 172.16.1.0/24 and 192.168.1.0/24 via OSPF (O) !--- show ip protocols -> Router ID 2.2.2.2, passive interface GigabitEthernet0/0 !--- ping 172.16.1.2 / ping 192.168.1.2 -> PC1 and PC3, once OSPF has converged ! ==============================================================
ROUTER R3
! ============================================================== !--- 8.2.1 Packet Tracer - Configure OSPFv2 in a Single Area !--- ANSWER SCRIPT FOR ROUTER R3 !--- Usage: copy this whole file and paste it into the R3 terminal (start at the R3> prompt). Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless. !--- Scope: IP addressing is already configured on all three routers !--- per the activity's own Background note - this script only adds !--- OSPFv2 routing. ! ============================================================== enable configure terminal ! -------------------------------------------------------------- !--- Part 1: Configure OSPFv2 (process ID 10) on R3. ! -------------------------------------------------------------- router ospf 10 !--- Explicit router ID, as required. router-id 3.3.3.3 !--- LAN 3 (G0/0, 192.168.1.0/24). network 192.168.1.0 0.0.0.255 area 0 !--- Serial link to R1 (S0/0/0 on R3, 192.168.10.4/30). network 192.168.10.4 0.0.0.3 area 0 !--- Serial link to R2 (S0/0/1 on R3, 192.168.10.8/30). network 192.168.10.8 0.0.0.3 area 0 !--- LAN interface must be passive - named explicitly (not !--- "passive-interface default") per the activity's requirement. passive-interface GigabitEthernet0/0 exit end ! -------------------------------------------------------------- !--- Save the configuration to NVRAM. (Press Enter when prompted for the destination filename.) ! -------------------------------------------------------------- copy running-config startup-config ! ============================================================== !--- Verification: !--- show ip ospf neighbor -> FULL adjacency with R1 (192.168.10.5) and R2 (192.168.10.9) !--- show ip route ospf -> routes to 172.16.1.0/24 and 172.16.2.0/24 via OSPF (O) !--- show ip protocols -> Router ID 3.3.3.3, passive interface GigabitEthernet0/0 !--- ping 172.16.1.2 / ping 172.16.2.2 -> PC1 and PC2, once OSPF has converged !--- Note: on the R1-R3 link, R1 uses S0/0/1 while R3 uses S0/0/0 for the !--- same 192.168.10.4/30 subnet - that's just how the two routers' !--- serial ports happen to be wired/numbered in this topology, not a !--- config error; the "network" statement only cares about the address !--- range, not the local interface name. ! ==============================================================
