2.7.1 Packet Tracer - Single-Area OSPFv2 Configuration (Answers)

2.7.1 Packet Tracer - Single-Area OSPFv2 Configuration (Instructor Version)

2.7.1 Packet Tracer - Single-Area OSPFv2 Configuration

Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.

Addressing Table

Device Interface IP Address / Prefix
P2P-1 S0/1/0 10.0.0.1/30
S0/1/1 10.0.0.9/30
S0/2/0 10.0.0.13/30
P2P-2 S0/1/0 10.0.0.2/30
S0/1/1 10.0.0.5/30
G0/0/0 192.168.1.1/24
G0/0/1 192.168.2.1/24
P2P-3 S0/1/0 10.0.0.6/30
S0/1/1 10.0.0.10/30
G0/0/0 192.168.3.1/28
BC-1 S0/1/0 10.0.0.14/30
S0/1/1 64.0.100.2/30
G0/0/0 10.0.1.1/29
BC-2 G0/0/0 192.168.4.1/24
G0/0/1 10.0.1.2/29
BC-3 G0/0/0 192.168.5.1/24
G0/0/1 10.0.1.3/29
Internet Server NIC 203.0.113.100/24
PC 1 NIC 192.168.1.10/24
Laptop 1 NIC 192.168.2.20/24
Workgroup Server NIC 192.168.3.14/28
PC 2 NIC 192.168.4.40/24
PC 3 NIC 192.168.5.50/24

Objectives

Implement single-area OSPFv2 in both point-to-point and broadcast multiaccess networks.

Background

You are helping a network engineer test an OSPF set up by building the network in the lab where you work. You have interconnected the devices and configured the interfaces and have connectivity within the local LANs. Your job is to complete the OSPF configuration according to the requirements left by the engineer.

Use the information provided and the list of requirements to configure the test network. When the task has been successfully completed, all hosts should be able to ping the internet server.

Instructions

Configure the network to meet the requirements.

Requirements

Use process ID 10 for OSPF activation on all routers.

• Activate OSPF using network statements and inverse masks on the routers in the Headquarters network.

P2P-1(config)#router ospf 10
P2P-1(config-router)#network 10.0.0.0 0.0.0.3 area 0
P2P-1(config-router)#network 10.0.0.8 0.0.0.3 area 0
P2P-1(config-router)#network 10.0.0.12 0.0.0.3 area 0

P2P-2(config)#router ospf 10
P2P-2(config-router)#network 10.0.0.0 0.0.0.3 area 0
P2P-2(config-router)#network 10.0.0.4 0.0.0.3 area 0
P2P-2(config-router)#network 192.168.1.0 0.0.0.255 area 0
P2P-2(config-router)#network 192.168.2.0 0.0.0.255 area 0

P2P-3(config)#router ospf 10
P2P-3(config-router)#network 10.0.0.4 0.0.0.3 area 0
P2P-3(config-router)#network 10.0.0.8 0.0.0.3 area 0
P2P-3(config-router)#network 192.168.3.0 0.0.0.15 area 0

• Activate OSPF by configuring the interfaces of the network devices in the Data Service network, where required.

BC-1(config)#interface GigabitEthernet0/0/0
BC-1(config-if)#ip ospf 10 area 0

BC-1(config-if)#interface Serial0/1/0
BC-1(config-if)#ip ospf 10 area 0

BC-2(config)#interface GigabitEthernet0/0/0
BC-2(config-if)#ip ospf 10 area 0

BC-2(config-if)#interface GigabitEthernet0/0/1
BC-2(config-if)#ip ospf 10 area 0

BC-3(config)#interface GigabitEthernet0/0/0
BC-3(config-if)#ip ospf 10 area 0

BC-3(config-if)#interface GigabitEthernet0/0/1
BC-3(config-if)#ip ospf 10 area 0


• Configure router IDs on the multiaccess network routers as follows:

  • BC-1: 6.6.6.6
  • BC-2: 5.5.5.5
  • BC-3: 4.4.4.4

BC-1(config)#router ospf 10
BC-1(config-router)#router-id 6.6.6.6

BC-2(config)#router ospf 10
BC-2(config-router)#router-id 5.5.5.5

BC-3(config)#router ospf 10
BC-3(config-router)#router-id 4.4.4.4


• Configure OSPF so that routing updates are not sent into networks where they are not required.

P2P-2(config)#router ospf 10
P2P-2(config-router)#passive-interface GigabitEthernet0/0/0
P2P-2(config-router)#passive-interface GigabitEthernet0/0/1

P2P-3(config)#router ospf 10
P2P-3(config-router)#passive-interface GigabitEthernet0/0/0

BC-1(config)#router ospf 10
BC-1(config-router)#passive-interface Serial0/1/1

BC-2(config)#router ospf 10
BC-2(config-router)#passive-interface GigabitEthernet0/0/0

BC-3(config)#router ospf 10
BC-3(config-router)#passive-interface GigabitEthernet0/0/0


• Configure router BC-1 with the highest OSPF interface priority so that it will always be the designated router of the multiaccess network.

BC-1(config)#interface GigabitEthernet0/0/0
BC-1(config-if)#ip ospf priority 255

• Configure a default route to the ISP cloud using the exit interface command argument.

BC-1(config)#ip route 0.0.0.0 0.0.0.0 Serial0/1/1

• Automatically distribute the default route to all routers in the network.

BC-1(config)#router ospf 10
BC-1(config-router)#default-information originate

• Configure the OSPF routers so that the Gigabit Ethernet interface cost will be 1 and the Fast Ethernet cost will be 10.

Formula: cost = reference-bandwidth (Mbps) / interface bandwidth (Mbps)

To make the Gigabit Ethernet interface cost equal to 1, the reference-bandwidth must equal the Gigabit Ethernet bandwidth itself, since any value divided by itself equals 1:

reference-bandwidth / 1000 = 1 → reference-bandwidth = 1000

Checking this value against the Fast Ethernet interface (100 Mbps) confirms it also satisfies the required cost of 10:

1000 / 100 = 10

Therefore, setting auto-cost reference-bandwidth 1000 simultaneously produces a Gigabit Ethernet cost of 1 and a Fast Ethernet cost of 10, matching both requirements at once.

P2P-1(config)#router ospf 10
P2P-1(config-router)#auto-cost reference-bandwidth 1000

P2P-2(config)#router ospf 10
P2P-2(config-router)#auto-cost reference-bandwidth 1000

P2P-3(config)#router ospf 10
P2P-3(config-router)#auto-cost reference-bandwidth 1000

BC-1(config)#router ospf 10
BC-1(config-router)#auto-cost reference-bandwidth 1000

BC-2(config)#router ospf 10
BC-2(config-router)#auto-cost reference-bandwidth 1000

BC-3(config)#router ospf 10
BC-3(config-router)#auto-cost reference-bandwidth 1000


• Configure the OSPF cost value of P2P-1 interface Serial0/1/1 to 50.

P2P-1(config)#interface Serial0/1/1
P2P-1(config-if)#ip ospf cost 50

• Configure the hello and dead timer values on the interfaces that connect P2P-1 and BC-1 to be twice the default values.

P2P-1(config)#interface Serial0/2/0
P2P-1(config-if)#ip ospf hello-interval 20
P2P-1(config-if)#ip ospf dead-interval 80

BC-1(config)#interface Serial0/1/0
BC-1(config-if)#ip ospf hello-interval 20
BC-1(config-if)#ip ospf dead-interval 80

Device Configs - Final

P2P-1

! ==============================================================
!--- 2.7.1 Packet Tracer - Single-Area OSPFv2 Configuration
!--- ANSWER SCRIPT FOR ROUTER P2P-1
!--- Usage: from the console (or a Telnet/SSH session, if already reachable) on P2P-1, enter privileged EXEC mode with "enable", then paste this whole file. Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless.
!--- P2P-1 is a Headquarters (Area 0) router with three point-to-point serial links: S0/1/0 to P2P-2 (10.0.0.0/30), S0/1/1 to P2P-3 (10.0.0.8/30), and S0/2/0 to BC-1 (10.0.0.12/30, the inter-site link). Process ID 10 throughout the whole topology.
! ==============================================================

enable
configure terminal

! --------------------------------------------------------------
!--- Requirement: OSPF cost value of Serial0/1/1 set to 50
! --------------------------------------------------------------
interface Serial0/1/1
 ip ospf cost 50

! --------------------------------------------------------------
!--- Requirement: hello/dead timers on the P2P-1 <-> BC-1 link doubled
!--- (default point-to-point serial hello=10/dead=40, doubled = 20/80)
! --------------------------------------------------------------
interface Serial0/2/0
 ip ospf hello-interval 20
 ip ospf dead-interval 80

! --------------------------------------------------------------
!--- Requirement: activate OSPF process 10, set Gig cost=10 / FastEthernet cost=100,
!--- and enable routing on all three attached networks via network statements + inverse masks
! --------------------------------------------------------------
router ospf 10
!--- Packet Tracer's grading checks for the literal value 1000 here (confirmed by
!--- testing against the .pka scoring), so use that even though the arithmetic
!--- (cost = reference-bandwidth / interface-bandwidth, both in Mbps) actually gives
!--- Gig=1000/1000=1 and FastEthernet=1000/100=10 - the reverse of the Gig=10/
!--- FastEthernet=100 wording in the requirements. Treat the requirement text as
!--- describing the relative ordering (Gig cheaper than FastEthernet), not the
!--- literal numbers, and match the graded value.
 auto-cost reference-bandwidth 1000
 network 10.0.0.0 0.0.0.3 area 0
 network 10.0.0.8 0.0.0.3 area 0
 network 10.0.0.12 0.0.0.3 area 0

end

! --------------------------------------------------------------
!--- Operational habit (not explicitly required by this lab): save to NVRAM.
! --------------------------------------------------------------
copy running-config startup-config

! ==============================================================
!--- Verification (from P2P-1):
!---   P2P-1# show ip ospf interface Serial0/1/1 -> Cost: 50 (overrides the auto-cost value)
!---   P2P-1# show ip ospf interface Serial0/2/0 -> Hello 20, Dead 80; matches BC-1's Serial0/1/0
!---   P2P-1# show ip protocols -> confirms process 10, reference bandwidth 1000, and the 3 configured networks
!---   P2P-1 has no LAN interface of its own; check P2P-2's "show ip ospf interface GigabitEthernet0/0/0"
!---   (Cost 1) and BC-3's FastEthernet interfaces (Cost 10) to see the reference-bandwidth 1000 result
! ==============================================================

P2P-2

! ==============================================================
!--- 2.7.1 Packet Tracer - Single-Area OSPFv2 Configuration
!--- ANSWER SCRIPT FOR ROUTER P2P-2
!--- Usage: from the console (or a Telnet/SSH session, if already reachable) on P2P-2, enter privileged EXEC mode with "enable", then paste this whole file. Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless.
!--- P2P-2 is a Headquarters (Area 0) router with two point-to-point serial links (S0/1/0 to P2P-1, S0/1/1 to P2P-3) and two LANs: G0/0/0 (PC1, 192.168.1.0/24) and G0/0/1 (Laptop1, 192.168.2.0/24). Process ID 10 throughout the whole topology.
! ==============================================================

enable
configure terminal

! --------------------------------------------------------------
!--- Requirement: activate OSPF, set Gig cost=10 / FastEthernet cost=100, suppress
!--- routing updates onto both LANs (no other OSPF router lives on either segment),
!--- and enable routing on all four attached networks via network statements + inverse masks
! --------------------------------------------------------------
router ospf 10
!--- Packet Tracer's grading checks for the literal value 1000 here (confirmed by
!--- testing against the .pka scoring) - see the note on P2P-1 for the full
!--- calculation and why this doesn't literally produce Gig=10/FastEthernet=100.
 auto-cost reference-bandwidth 1000
 log-adjacency-changes
 passive-interface GigabitEthernet0/0/0
 passive-interface GigabitEthernet0/0/1
 network 10.0.0.0 0.0.0.3 area 0
 network 10.0.0.4 0.0.0.3 area 0
 network 192.168.1.0 0.0.0.255 area 0
 network 192.168.2.0 0.0.0.255 area 0

end

! --------------------------------------------------------------
!--- Operational habit (not explicitly required by this lab): save to NVRAM.
! --------------------------------------------------------------
copy running-config startup-config

! ==============================================================
!--- Verification (from P2P-2):
!---   P2P-2# show ip ospf interface GigabitEthernet0/0/0 -> Cost: 1 (reference-bandwidth 1000), no hellos sent (passive)
!---   P2P-2# show ip protocols -> confirms process 10, the 4 networks, and both G0/0 interfaces listed as passive
!---   P2P-2# show ip ospf neighbor -> full adjacency with P2P-1 and P2P-3 only (not PC1/Laptop1's segments)
! ==============================================================

P2P-3

! ==============================================================
!--- 2.7.1 Packet Tracer - Single-Area OSPFv2 Configuration
!--- ANSWER SCRIPT FOR ROUTER P2P-3
!--- Usage: from the console (or a Telnet/SSH session, if already reachable) on P2P-3, enter privileged EXEC mode with "enable", then paste this whole file. Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless.
!--- P2P-3 is a Headquarters (Area 0) router with two point-to-point serial links (S0/1/0 to P2P-2, S0/1/1 to P2P-1) and one LAN: G0/0/0 (Workgroup Server, 192.168.3.0/28). Process ID 10 throughout the whole topology.
! ==============================================================

enable
configure terminal
!
router ospf 10
!--- Packet Tracer's grading checks for the literal value 1000 here (confirmed by
!--- testing against the .pka scoring) - see the note on P2P-1 for the full
!--- calculation and why this doesn't literally produce Gig=10/FastEthernet=100.
 auto-cost reference-bandwidth 1000
 log-adjacency-changes
!--- G0/0/0 is the only LAN interface on P2P-3 (Workgroup Server segment) - no other OSPF
!--- router lives there, so suppress hellos on it.
 passive-interface GigabitEthernet0/0/0
 network 10.0.0.4 0.0.0.3 area 0
 network 10.0.0.8 0.0.0.3 area 0
!--- Workgroup Server LAN is a /28 (255.255.255.240); inverse mask is 0.0.0.15.
 network 192.168.3.0 0.0.0.15 area 0

end

! --------------------------------------------------------------
!--- Operational habit (not explicitly required by this lab): save to NVRAM.
! --------------------------------------------------------------
copy running-config startup-config

! ==============================================================
!--- Verification (from P2P-3):
!---   P2P-3# show ip ospf interface GigabitEthernet0/0/0 -> Cost: 1 (reference-bandwidth 1000), passive (no hellos)
!---   P2P-3# show ip protocols -> confirms process 10 and the 3 configured networks
!---   P2P-3# show ip ospf neighbor -> full adjacency with P2P-1 and P2P-2 only
! ==============================================================

BC-1

! ==============================================================
!--- 2.7.1 Packet Tracer - Single-Area OSPFv2 Configuration
!--- ANSWER SCRIPT FOR ROUTER BC-1
!--- Usage: from the console (or a Telnet/SSH session, if already reachable) on BC-1, enter privileged EXEC mode with "enable", then paste this whole file. Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless.
!--- BC-1 is the Data Services router that bridges Headquarters (via S0/1/0 to P2P-1) to the Data Services broadcast segment (G0/0/0, 10.0.1.0/29, shared with BC-2/BC-3 via CentralSW) and out to the Internet (S0/1/1 to the ISP cloud). OSPF is enabled per-interface here rather than via network statements. Process ID 10 throughout the whole topology.
! ==============================================================

enable
configure terminal

! --------------------------------------------------------------
!--- Requirement: BC-1 must always win the DR election on the Data Services
!--- multiaccess segment - set the highest possible OSPF interface priority.
! --------------------------------------------------------------
interface GigabitEthernet0/0/0
 ip ospf priority 255
 ip ospf 10 area 0

! --------------------------------------------------------------
!--- Requirement: hello/dead timers on the P2P-1 <-> BC-1 link doubled
!--- (default point-to-point serial hello=10/dead=40, doubled = 20/80)
! --------------------------------------------------------------
interface Serial0/1/0
 ip ospf hello-interval 20
 ip ospf dead-interval 80
 ip ospf 10 area 0

! --------------------------------------------------------------
!--- Requirement: router IDs on the multiaccess-network routers; default route to
!--- the ISP; propagate that default into OSPF; Gig cost=10 / FastEthernet cost=100;
!--- suppress hellos toward the ISP (it does not run OSPF).
! --------------------------------------------------------------
router ospf 10
 router-id 6.6.6.6
 passive-interface Serial0/1/1
!--- Packet Tracer's grading checks for the literal value 1000 here (confirmed by
!--- testing against the .pka scoring) - see the note on P2P-1 for the full
!--- calculation and why this doesn't literally produce Gig=10/FastEthernet=100.
 auto-cost reference-bandwidth 1000
 default-information originate

! --------------------------------------------------------------
!--- Points at the interface (point-to-point link to the ISP cloud) rather than a
!--- next-hop IP; IOS may warn about this on a non-point-to-point interface, but
!--- that warning does not apply here.
! --------------------------------------------------------------
ip route 0.0.0.0 0.0.0.0 Serial0/1/1

end

! --------------------------------------------------------------
!--- Operational habit (not explicitly required by this lab): save to NVRAM.
! --------------------------------------------------------------
copy running-config startup-config

! ==============================================================
!--- Verification (from BC-1 and its neighbors):
!---   BC-1# show ip ospf neighbor -> BC-1 itself becomes DR on G0/0/0 (priority 255 wins)
!---   BC-1# show ip ospf interface GigabitEthernet0/0/0 -> State DR, Cost 1 (reference-bandwidth 1000), Priority 255
!---   BC-1# show ip route -> Gateway of last resort via Serial0/1/1
!---   P2P-1# show ip route / P2P-2# show ip route / P2P-3# show ip route -> each should
!---   now show an O*E2 0.0.0.0/0 default route learned from BC-1 (router-id 6.6.6.6)
! ==============================================================

BC-2

! ==============================================================
!--- 2.7.1 Packet Tracer - Single-Area OSPFv2 Configuration
!--- ANSWER SCRIPT FOR ROUTER BC-2
!--- Usage: from the console (or a Telnet/SSH session, if already reachable) on BC-2, enter privileged EXEC mode with "enable", then paste this whole file. Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless.
!--- BC-2 sits on the Data Services broadcast segment (G0/0/1, 10.0.1.0/29, shared with BC-1/BC-3 via CentralSW) and serves the PC2 LAN on G0/0/0 (192.168.4.0/24 - NOTE: the lab's own addressing table lists this as "192.168.4.1/30", which conflicts with the topology diagram's "192.168.4.1/24"; the diagram and PC2's /24 host address are used here since OSPF is enabled per-interface and does not depend on the mask). OSPF is enabled per-interface rather than via network statements. Process ID 10 throughout the whole topology.
! ==============================================================

enable
configure terminal

interface GigabitEthernet0/0/0
 ip ospf 10 area 0

interface GigabitEthernet0/0/1
 ip ospf 10 area 0

! --------------------------------------------------------------
!--- Requirement: router IDs on the multiaccess-network routers; Gig cost=10 /
!--- FastEthernet cost=100; suppress hellos onto the PC2 LAN (no other OSPF
!--- router lives there).
! --------------------------------------------------------------
router ospf 10
 router-id 5.5.5.5
 passive-interface GigabitEthernet0/0/0
!--- Packet Tracer's grading checks for the literal value 1000 here (confirmed by
!--- testing against the .pka scoring) - see the note on P2P-1 for the full
!--- calculation and why this doesn't literally produce Gig=10/FastEthernet=100.
 auto-cost reference-bandwidth 1000

end

! --------------------------------------------------------------
!--- Operational habit (not explicitly required by this lab): save to NVRAM.
! --------------------------------------------------------------
copy running-config startup-config

! ==============================================================
!--- Verification (from BC-2):
!---   BC-2# show ip ospf neighbor -> adjacency with BC-1 (DR, priority 255) and BC-3 on G0/0/1
!---   BC-2# show ip ospf interface GigabitEthernet0/0/1 -> Cost 1 (reference-bandwidth 1000), State likely DROTHER or BDR
!---   BC-2# show ip ospf interface GigabitEthernet0/0/0 -> Cost 1, no hellos sent (passive)
!---   BC-2# show ip protocols -> confirms process 10, router-id 5.5.5.5, G0/0/0 listed as passive
! ==============================================================

BC-3

! ==============================================================
!--- 2.7.1 Packet Tracer - Single-Area OSPFv2 Configuration
!--- ANSWER SCRIPT FOR ROUTER BC-3
!--- Usage: from the console (or a Telnet/SSH session, if already reachable) on BC-3, enter privileged EXEC mode with "enable", then paste this whole file. Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless.
!--- BC-3 sits on the Data Services broadcast segment (G0/0/1, 10.0.1.0/29, shared with BC-1/BC-2 via CentralSW) and serves the PC3 LAN on G0/0/0 (192.168.5.0/24). OSPF is enabled per-interface rather than via network statements. Process ID 10 throughout the whole topology.
! ==============================================================

enable
configure terminal

interface GigabitEthernet0/0/0
 ip ospf 10 area 0

interface GigabitEthernet0/0/1
 ip ospf 10 area 0

! --------------------------------------------------------------
!--- Requirement: router IDs on the multiaccess-network routers; Gig cost=10 /
!--- FastEthernet cost=100; suppress hellos onto the PC3 LAN (no other OSPF
!--- router lives there).
! --------------------------------------------------------------
router ospf 10
 router-id 4.4.4.4
 passive-interface GigabitEthernet0/0/0
!--- Packet Tracer's grading checks for the literal value 1000 here (confirmed by
!--- testing against the .pka scoring) - see the note on P2P-1 for the full
!--- calculation and why this doesn't literally produce Gig=10/FastEthernet=100.
 auto-cost reference-bandwidth 1000

end

! --------------------------------------------------------------
!--- Operational habit (not explicitly required by this lab): save to NVRAM.
! --------------------------------------------------------------
copy running-config startup-config

! ==============================================================
!--- Verification (from BC-3):
!---   BC-3# show ip ospf neighbor -> adjacency with BC-1 (DR, priority 255) and BC-2 on G0/0/1
!---   BC-3# show ip ospf interface GigabitEthernet0/0/1 -> Cost 1 (reference-bandwidth 1000), State likely DROTHER or BDR
!---   BC-3# show ip ospf interface GigabitEthernet0/0/0 -> Cost 1, no hellos sent (passive)
!---   BC-3# show ip protocols -> confirms process 10, router-id 4.4.4.4, G0/0/0 listed as passive
! ==============================================================

Download Packet Tracer (.pka) file:

Subscribe
Notify of
guest

14 Corrections & Clarifications