2.2.13 Packet Tracer - Point-to-Point Single-Area OSPFv2 Configuration Answers
Topology

Addressing Table
| Device | Interface | IP Address | Subnet Mask |
|---|---|---|---|
| R1 | G0/0/0 | 192.168.10.1 | /24 |
| S0/1/0 | 10.1.1.1 | /30 | |
| S0/1/1 | 10.1.1.5 | /30 | |
| R2 | G0/0/0 | 192.168.20.1 | /24 |
| S0/1/0 | 10.1.1.2 | /30 | |
| S0/1/1 | 10.1.1.9 | /30 | |
| R3 | G0/0/0 | 192.168.30.1 | /24 |
| S0/1/0 | 10.1.1.10 | /30 | |
| S0/1/1 | 10.1.1.6 | /30 | |
| PC1 | NIC | 192.168.10.10 | /24 |
| PC2 | NIC | 192.168.20.10 | /24 |
| PC3 | NIC | 192.168.30.10 | /24 |
Objectives
- Part 1: Configure Router IDs.
- Part 2: Configure Networks for OSPF Routing.
- Part 3: Configure Passive Interfaces.
- Part 4: Verify OSPF configuration.
Background
In this activity, you will activate OSPF routing using network statements and wildcard masks, by configuring OSPF routing on interfaces, and by using network statements with quad-zero masks. In addition, you will configure explicit router IDs and passive interfaces.
Instructions
Part 1: Configure router IDs.
a. Start the OSPF routing process on all three routers. Use process ID 10.
Open configuration window
Copy
Router(config)# router ospf process-id
Copy
R1(config)# router ospf 10
Copy
R2(config)# router ospf 10
Copy
R3(config)# router ospf 10
b. Use the router-id command to set the OSPF IDs of the three routers as follows:
- R1: 1.1.1.1
- R2: 2.2.2.2
- R3: 3.3.3.3
Use the following command:
Copy
Router(config-router)# router-id rid
Copy
R1(config-router)# router-id 1.1.1.1
Copy
R2(config-router)# router-id 2.2.2.2
Copy
R3(config-router)# router-id 3.3.3.3
Close configuration window
Part 2: Configure Networks for OSPF Routing
Step 1: Configure networks for OSPF routing using network commands and wildcard masks.
How many statements are required to configure OSPF to route all the networks attached to router R1?
3
The LAN attached to router R1 has a /24 mask. What is the equivalent of this mask in dotted decimal representation?
255.255.255.0
Subtract the dotted decimal subnet mask from 255.255.255.255. What is the result?
0.0.0.255 (Readmore)
What is the dotted decimal equivalent of the /30 subnet mask?
255.255.255.252
Subtract the dotted decimal representation of the /30 mask from 255.255.255.255. What is the result?
0.0.0.3
a. Configure the routing process on R1 with the network statements and wildcard masks that are required to activate OSPF routing for all the attached networks. The network statement values should be the network or subnet addresses of the configured networks.
Copy
Router(config-router)# network network-address wildcard-mask area area-id
Copy
R1(config)# router ospf 10
R1(config-router)# network 192.168.10.0 0.0.0.255 area 0
R1(config-router)# network 10.1.1.0 0.0.0.3 area 0
R1(config-router)# network 10.1.1.4 0.0.0.3 area 0
b. Verify that OSPF has been configured properly by displaying the running configuration. If you find an error, delete the network statement using the no command and reconfigure it.
Copy
R1# show running-config
<output omitted>
router ospf 10
router-id 1.1.1.1
log-adjacency-changes
network 192.168.10.0 0.0.0.255 area 0
network 10.1.1.0 0.0.0.3 area 0
network 10.1.1.4 0.0.0.3 area 0
!
<output omitted>
Step 2: Configure networks for OSPF routing using interface IP addresses and quad-zero masks.
On router R2, configure OSPF using network commands with the IP addresses of the interfaces and quad-zero masks. The syntax of the network command is the same as was used above.
Copy
R2(config)# router ospf 10
R2(config-router)# network 192.168.20.1 0.0.0.0 area 0
R2(config-router)# network 10.1.1.2 0.0.0.0 area 0
R2(config-router)# network 10.1.1.9 0.0.0.0 area 0
Step 3: Configure OSPF routing on router interfaces
On router R3, configure the required interfaces with OSPF.
Which interfaces on R3 should be configured with OSPF?
G0/0/0, S0/1/0, S0/1/1
Configure each interface using the command syntax shown below:
Copy
Router(config-if)# ip ospf process-id area area-id
Copy
R3(config)# interface gigabitethernet 0/0/0
R3(config-if)# ip ospf 10 area 0
R3(config-if)# interface serial 0/1/0
R3(config-if)# ip ospf 10 area 0
R3(config-if)# interface serial 0/1/1
R3(config-if)# ip ospf 10 area 0
Close configuration window
Part 3: Configure Passive Interfaces
OSPF will send its protocol traffic out of all interfaces that are participating in the OSPF process. On links that are not configured to other networks, such as LANs, this unnecessary traffic consumes resources. The passive-interface command will prevent the OSPF process from sending unnecessary routing protocol traffic out LAN interfaces.
Which interfaces on R1, R2, and R3 are LAN interfaces?
G0/0/0 on all three routers.
Configure the OSPF process on each of the three routers with the passive-interface command.
Open configuration window
Copy
Router(config-router)# passive-interface interface
Copy
R1(config)# router ospf 10
R1(config-router)# passive-interface gigabitethernet 0/0/0
Copy
R2(config)# router ospf 10
R2(config-router)# passive-interface gigabitethernet 0/0/0
Copy
R3(config)# router ospf 10
R3(config-router)# passive-interface gigabitethernet 0/0/0
Close configuration window
Part 4: Verify OSPF Configuration
Use show commands to verify the network and passive interface configuration of the OSPF process on each router.
Verify OSPF

Copy
R1# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
3.3.3.3 0 FULL/ - 00:00:37 10.1.1.6 Serial0/1/1
2.2.2.2 0 FULL/ - 00:00:36 10.1.1.2 Serial0/1/0
Copy
R1# show ip route ospf
10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
O 10.1.1.8 [110/128] via 10.1.1.2, 00:08:38, Serial0/1/0
[110/128] via 10.1.1.6, 00:08:38, Serial0/1/1
O 192.168.20.0 [110/65] via 10.1.1.2, 00:10:22, Serial0/1/0
O 192.168.30.0 [110/65] via 10.1.1.6, 00:08:38, Serial0/1/1
Copy
R2# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
3.3.3.3 0 FULL/ - 00:00:30 10.1.1.10 Serial0/1/1
1.1.1.1 0 FULL/ - 00:00:32 10.1.1.1 Serial0/1/0
Copy
R2# show ip route ospf
10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
O 10.1.1.4 [110/128] via 10.1.1.1, 00:09:32, Serial0/1/0
[110/128] via 10.1.1.10, 00:09:32, Serial0/1/1
O 192.168.10.0 [110/65] via 10.1.1.1, 00:11:03, Serial0/1/0
O 192.168.30.0 [110/65] via 10.1.1.10, 00:10:06, Serial0/1/1
Copy
R3# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 0 FULL/ - 00:00:32 10.1.1.9 Serial0/1/0
1.1.1.1 0 FULL/ - 00:00:31 10.1.1.5 Serial0/1/1
Copy
R3# show ip route ospf
10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
O 10.1.1.0 [110/128] via 10.1.1.9, 00:10:02, Serial0/1/0
[110/128] via 10.1.1.5, 00:10:02, Serial0/1/1
O 192.168.10.0 [110/65] via 10.1.1.5, 00:10:02, Serial0/1/1
O 192.168.20.0 [110/65] via 10.1.1.9, 00:10:46, Serial0/1/0
Verify passive interface
Copy
R1# show ip protocols
Routing Protocol is "ospf 10"
Router ID 1.1.1.1
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
192.168.10.0 0.0.0.255 area 0
10.1.1.0 0.0.0.3 area 0
10.1.1.4 0.0.0.3 area 0
Passive Interface(s):
GigabitEthernet0/0/0
Routing Information Sources:
Gateway Distance Last Update
1.1.1.1 110 00:08:58
2.2.2.2 110 00:09:37
3.3.3.3 110 00:08:58
Distance: (default is 110)
Copy
R2# show ip protocols
Routing Protocol is "ospf 10"
Router ID 2.2.2.2
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
192.168.20.1 0.0.0.0 area 0
10.1.1.2 0.0.0.0 area 0
10.1.1.9 0.0.0.0 area 0
Passive Interface(s):
GigabitEthernet0/0/0
Routing Information Sources:
Gateway Distance Last Update
1.1.1.1 110 00:09:44
2.2.2.2 110 00:10:22
3.3.3.3 110 00:09:44
Distance: (default is 110)
Copy
R3# show ip protocols
Routing Protocol is "ospf 10"
Router ID 3.3.3.3
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
Passive Interface(s):
GigabitEthernet0/0/0
Routing Information Sources:
Gateway Distance Last Update
1.1.1.1 110 00:10:16
2.2.2.2 110 00:10:55
3.3.3.3 110 00:10:16
Distance: (default is 110)
Device Configs - Final
ROUTER R1
Copy
! ==============================================================
!--- 2.2.13 Packet Tracer - Point-to-Point Single-Area OSPFv2 Configuration
!--- ANSWER SCRIPT FOR ROUTER R1
!--- Usage: open the R1 CLI and paste this whole file at the R1> prompt. Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless.
! ==============================================================
enable
configure terminal
! --------------------------------------------------------------
!--- Part 1: Configure router IDs.
! --------------------------------------------------------------
!--- a. Start the OSPF routing process with process ID 10.
router ospf 10
exit
!--- b. Set the OSPF router ID to 1.1.1.1.
router ospf 10
router-id 1.1.1.1
exit
! --------------------------------------------------------------
!--- Part 2, Step 1: Configure networks for OSPF routing using network commands and wildcard masks.
! --------------------------------------------------------------
!--- LAN 192.168.10.0/24 (G0/0/0): /24 = 255.255.255.0, wildcard mask 0.0.0.255.
router ospf 10
network 192.168.10.0 0.0.0.255 area 0
exit
!--- Link to R2 10.1.1.0/30 (S0/1/0): /30 = 255.255.255.252, wildcard mask 0.0.0.3.
router ospf 10
network 10.1.1.0 0.0.0.3 area 0
exit
!--- Link to R3 10.1.1.4/30 (S0/1/1): wildcard mask 0.0.0.3.
router ospf 10
network 10.1.1.4 0.0.0.3 area 0
exit
! --------------------------------------------------------------
!--- Part 3: Configure passive interfaces.
! --------------------------------------------------------------
!--- G0/0/0 is the LAN interface: stop sending OSPF hellos into the LAN.
router ospf 10
passive-interface gigabitethernet 0/0/0
exit
end
! --------------------------------------------------------------
!--- Save the configuration to NVRAM. (Press Enter when prompted for the destination filename.)
! --------------------------------------------------------------
copy running-config startup-config
! ==============================================================
!--- Verification:
!--- show ip protocols -> process 10, router ID 1.1.1.1, GigabitEthernet0/0/0 listed as passive
!--- show ip ospf neighbor -> R2 (2.2.2.2) and R3 (3.3.3.3) in FULL state
!--- show ip route ospf -> O routes to 192.168.20.0/24 and 192.168.30.0/24
! ==============================================================
ROUTER R2
Copy
! ==============================================================
!--- 2.2.13 Packet Tracer - Point-to-Point Single-Area OSPFv2 Configuration
!--- ANSWER SCRIPT FOR ROUTER R2
!--- Usage: open the R2 CLI and paste this whole file at the R2> prompt. Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless.
! ==============================================================
enable
configure terminal
! --------------------------------------------------------------
!--- Part 1: Configure router IDs.
! --------------------------------------------------------------
!--- a. Start the OSPF routing process with process ID 10.
router ospf 10
exit
!--- b. Set the OSPF router ID to 2.2.2.2.
router ospf 10
router-id 2.2.2.2
exit
! --------------------------------------------------------------
!--- Part 2, Step 2: Configure networks for OSPF routing using interface IP addresses and quad-zero masks.
! --------------------------------------------------------------
!--- G0/0/0 (LAN): interface address 192.168.20.1 with a quad-zero mask.
router ospf 10
network 192.168.20.1 0.0.0.0 area 0
exit
!--- S0/1/0 (link to R1): interface address 10.1.1.2 with a quad-zero mask.
router ospf 10
network 10.1.1.2 0.0.0.0 area 0
exit
!--- S0/1/1 (link to R3): interface address 10.1.1.9 with a quad-zero mask.
router ospf 10
network 10.1.1.9 0.0.0.0 area 0
exit
! --------------------------------------------------------------
!--- Part 3: Configure passive interfaces.
! --------------------------------------------------------------
!--- G0/0/0 is the LAN interface: stop sending OSPF hellos into the LAN.
router ospf 10
passive-interface gigabitethernet 0/0/0
exit
end
! --------------------------------------------------------------
!--- Save the configuration to NVRAM. (Press Enter when prompted for the destination filename.)
! --------------------------------------------------------------
copy running-config startup-config
! ==============================================================
!--- Verification:
!--- show ip protocols -> process 10, router ID 2.2.2.2, GigabitEthernet0/0/0 listed as passive
!--- show ip ospf neighbor -> R1 (1.1.1.1) and R3 (3.3.3.3) in FULL state
!--- show ip route ospf -> O routes to 192.168.10.0/24 and 192.168.30.0/24
! ==============================================================
ROUTER R3
Copy
! ==============================================================
!--- 2.2.13 Packet Tracer - Point-to-Point Single-Area OSPFv2 Configuration
!--- ANSWER SCRIPT FOR ROUTER R3
!--- Usage: open the R3 CLI and paste this whole file at the R3> prompt. Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless.
! ==============================================================
enable
configure terminal
! --------------------------------------------------------------
!--- Part 1: Configure router IDs.
! --------------------------------------------------------------
!--- a. Start the OSPF routing process with process ID 10.
router ospf 10
exit
!--- b. Set the OSPF router ID to 3.3.3.3.
router ospf 10
router-id 3.3.3.3
exit
! --------------------------------------------------------------
!--- Part 2, Step 3: Configure OSPF routing on router interfaces.
! --------------------------------------------------------------
!--- G0/0/0 (LAN 192.168.30.0/24): enable OSPF process 10 in area 0 on the interface.
interface gigabitethernet 0/0/0
ip ospf 10 area 0
exit
!--- S0/1/0 (link to R2, 10.1.1.8/30): enable OSPF process 10 in area 0 on the interface.
interface serial 0/1/0
ip ospf 10 area 0
exit
!--- S0/1/1 (link to R1, 10.1.1.4/30): enable OSPF process 10 in area 0 on the interface.
interface serial 0/1/1
ip ospf 10 area 0
exit
! --------------------------------------------------------------
!--- Part 3: Configure passive interfaces.
! --------------------------------------------------------------
!--- G0/0/0 is the LAN interface: stop sending OSPF hellos into the LAN.
router ospf 10
passive-interface gigabitethernet 0/0/0
exit
end
! --------------------------------------------------------------
!--- Save the configuration to NVRAM. (Press Enter when prompted for the destination filename.)
! --------------------------------------------------------------
copy running-config startup-config
! ==============================================================
!--- Verification:
!--- show ip protocols -> process 10, router ID 3.3.3.3, GigabitEthernet0/0/0 listed as passive
!--- show ip ospf neighbor -> R1 (1.1.1.1) and R2 (2.2.2.2) in FULL state
!--- show ip route ospf -> O routes to 192.168.10.0/24 and 192.168.20.0/24
!--- Note: R3 enables OSPF with ip ospf on each interface, so Packet Tracer shows nothing under
!--- "Routing for Networks" in show ip protocols; check the interfaces with show ip ospf interface brief.
! ==============================================================
Download Packet Tracer (.pka) file:
2.2.13 Packet Tracer - Point-to-Point Single-Area OSPFv2 Configuration 685.36 KB 11257 downloads
...
Previous Lab
1.0.5 Packet Tracer – Logical and Physical Mode Exploration