Network Routing Lab - Implement Single-Area OSPFv2
Network Routing Lab - Implement Single-Area OSPFv2
Topology
Addressing Table
Device Interface IPv4 Address
R1 G0/0/1 [Link]/29
R1
Loopback0 [Link]/27
R1
Loopback1 [Link]/26
D1 G1/0/5 [Link]/29
D1
G1/0/23 [Link]/24
D1
G1/0/24 [Link]/24
D2 G1/0/5 [Link]/29
D2
G1/0/23 [Link]/24
D2
G1/0/24 [Link]/24
© 2019 - 2026 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 1 of 25
-
Lab - Implement Single-Area OSPFv2
Objectives
Part 1: Build the Network and Configure Basic Device Settings and Interface Addressing
Part 2: Configure and Verify Single Area OSPF for IPv4 on R1, D1, and D2
Part 3: Configure Default Route Propagation on R1 and Verify the Propagation
Part 4: Implement OSPF Network Optimizing Features
Part 5: DR and BDR Placement
Background / Scenario
In this lab, you will configure single-area OSPF version 2 for IPv4 on a multiaccess Ethernet LAN. This lab
was specifically designed to use two Layer 3 switches instead of three routers to highlight how a Layer 3
switch can also be used to provide routing services.
Note: This lab is an exercise in developing, deploying, and verifying how OSPF operates and does not reflect
networking best practices.
Note: The routers and switches used with CCNP hands-on labs are Cisco Catalyst 8200L and Cisco 9300L,
both with Cisco IOS XE Release 17.12.05 (universalk9 image). Other routers and Cisco IOS versions can be
used. Depending on the model and Cisco IOS version, the commands available and the output produced
might vary from what is shown in the labs.
Note: Make sure that the switches have been erased and have no startup configurations. If you are unsure,
contact your instructor.
Required Resources
• 1 Router (Cisco Catalyst 8200L with Cisco IOS XE Release 17.12.05c universal image or comparable)
• 2 Switches (Cisco Catalyst 9300L with Cisco IOS XE Release 17.12.05 universal image or comparable)
• 1 Switch (Cisco Catalyst 9200L with Cisco IOS XE Release 17.12.05 universal image or comparable)
• Console cables to configure the Cisco IOS devices via the console ports
• Ethernet cables as shown in the topology
Instructions
Part 1: Build the Network and Configure Basic Device Settings and Interface
Addressing
In Part 1, you will set up the network topology and configure basic settings and interface addressing on the
router and Layer 3 switches.
Note: The Layer 2 switch should only have a default configuration.
Step 2: Configure basic settings for the router and the two Layer 3 switches.
a. Console into each router and Layer 3 switch, enter global configuration mode, and apply the basic
settings and interface addressing using the following startup configurations for each device.
Open configuration window
Router R1
hostname R1
© 2019 - 2026 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 2 of 25
-
Lab - Implement Single-Area OSPFv2
no ip domain lookup
line con 0
logging sync
exec-time 0 0
exit
interface Loopback0
ip address [Link] [Link]
no shut
exit
interface Loopback1
ip address [Link] [Link]
no shut
exit
interface GigabitEthernet0/0/1
ip address [Link] [Link]
no shut
exit
Switch D1
hostname D1
no ip domain lookup
line con 0
logging sync
exec-time 0 0
exit
interface g1/0/5
no switchport
ip address [Link] [Link]
no shut
exit
interface g1/0/23
no switchport
ip address [Link] [Link]
no shut
exit
interface g1/0/24
no switchport
ip address [Link] [Link]
no shut
exit
Switch D2
hostname D2
no ip domain lookup
line con 0
logging sync
© 2019 - 2026 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 3 of 25
-
Lab - Implement Single-Area OSPFv2
exec-time 0 0
exit
interface g1/0/5
no switchport
ip address [Link] [Link]
no shut
exit
interface g1/0/23
no switchport
ip address [Link] [Link]
no shut
exit
interface g1/0/24
no switchport
ip address [Link] [Link]
no shut
exit
b. Save the running configuration to startup-config.
c. Verify the interface status using the show ip interface brief command.
R1# show ip interface brief | include manual
GigabitEthernet0/0/1 [Link] YES manual up up
Loopback0 [Link] YES manual up up
Loopback1 [Link] YES manual up up
d. Verify direct connectivity between the highlighted IP addresses of R1, D1, and D2.
R1# ping [Link]
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
..!!!
Success rate is 60 percent (3/5), round-trip min/avg/max = 2/2/3 ms
© 2019 - 2026 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 4 of 25
-
Lab - Implement Single-Area OSPFv2
All three devices should be able to reach the other directly connected networks (i.e., [Link]/29).
Troubleshoot if necessary.
Close configuration window
D1(config)# ip routing
b. Next, enter the OSPF router configuration mode using process ID 123.
D1(config)# router ospf 123
c. When using the quad-zero method, it is not necessary to calculate the actual wildcard mask. You simply
advertise the IP address of the interface with a quad-zero wildcard mask and OSPF will advertise using
the subnet mask of the interface. Configure OSPF to advertise the network address of the G1/0/5
interface (i.e., [Link]) with the quad-zero mask.
D1(config-router)# network [Link] [Link] area 0
d. Next, enable OSPF on the G1/0/23 and G1/0/24 interfaces using a quad-zero mask.
D1(config-router)# network [Link] [Link] area 0
D1(config-router)# network [Link] [Link] area 0
These networks are now being advertised to other OSPF routers.
e. Verify the OSPF configuration on D1 using the show ip protocols command.
D1# show ip protocols
*** IP Routing is NSF aware ***
© 2019 - 2026 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 5 of 25
-
Lab - Implement Single-Area OSPFv2
The OSPF router ID chosen was the highest active IPv4 address configured on D1. The Routing for
Networks section in the output above confirms that the configured statements are accurately advertising
the D1 networks.
Close configuration window
D2(config)# ip routing
b. Next, enter the OSPF router configuration mode using process ID 123. Note that process IDs are only
locally significant. Therefore, the process ID of other OSPF routers do not need to match. However, using
the same process ID makes it simpler to remember and reduces potential configuration mistakes.
D2(config)# router ospf 123
c. Configure D2 to advertise the G1/0/5 /29 interface in OSPF area 0. The wildcard mask can be calculated
using by deducting the subnet mask (i.e., /29 = [Link]) from [Link], resulting in a
wildcard mask of [Link].
D2(config-router)# network [Link] [Link] area 0
D2(config-router)#
*Sep 22 00:16:46.465: %OSPF-5-ADJCHG: Process 123, Nbr [Link] on
GigabitEthernet1/0/5 from LOADING to FULL, Loading Done
Notice the informational message confirming that D2 has established a neighbor relationship with D1 (i.e.,
[Link]).
d. Next, configure D2 to advertise the two /24 networks in OSPF area 0. This can be accomplished using
two network statements with specific wildcard mask for each subnet.
D2(config-router)# network [Link] [Link] area 0
D2(config-router)# network [Link] [Link] area 0
Note: The two networks could also be enabled using the network [Link] [Link] statement
instead.
There are no informational messages this time because these interfaces are not connected to other
OSPF-enabled routers. However, these networks are now being advertised to other OSPF routers.
e. Verify the OSPF configuration on D2 using the show ip protocols command.
D2# show ip protocols
*** IP Routing is NSF aware ***
© 2019 - 2026 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 6 of 25
-
Lab - Implement Single-Area OSPFv2
Again, the OSPF router ID chosen was the highest active IPv4 address configured on D2. The Routing for
Networks section confirms that the configured statements are accurately advertising the D2 networks. We
now also have another routing information source, [Link] (i.e., D1).
Close configuration window
© 2019 - 2026 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 7 of 25
-
Lab - Implement Single-Area OSPFv2
Notice how the informational messages are confirming that neighbor adjacencies have been established
with D1 (i.e., [Link]) and D2 (i.e., [Link]).
d. Verify the OSPF configuration on R1 using the show ip protocols command.
R1# show ip protocols | section ospf
Routing Protocol is "ospf 123"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID [Link]
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
Routing on Interfaces Configured Explicitly (Area 0):
Loopback1
GigabitEthernet0/0/1
Routing Information Sources:
Gateway Distance Last Update
[Link] 110 00:03:47
[Link] 110 00:03:47
Distance: (default is 110)
Again, the router ID chosen is the highest active IPv4 loopback address configured on R1. The Routing
for Networks section confirms that routing was explicitly configured on the interfaces. It also displays a
new routing source; [Link].
Close configuration window
© 2019 - 2026 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 8 of 25
-
Lab - Implement Single-Area OSPFv2
© 2019 - 2026 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 9 of 25
-
Lab - Implement Single-Area OSPFv2
Investigate the informational messages. Notice that DR/BDR elections occur multiple times as R1 flushes
its LSA database.
d. Confirm that R1 is now using the new router ID as shown.
R1# show ip protocol | include Router ID
Router ID [Link]
© 2019 - 2026 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 10 of 25
-
Lab - Implement Single-Area OSPFv2
© 2019 - 2026 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 11 of 25
-
Lab - Implement Single-Area OSPFv2
© 2019 - 2026 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 12 of 25
-
Lab - Implement Single-Area OSPFv2
*Sep 29 14:09:26.773: OSPF-123 ADJ Gi1/0/5: Rcv DBD from [Link] seq 0x243E opt 0x52
flag 0x7 len 32 mtu 1500 state EXSTART
*Sep 29 14:09:26.773: OSPF-123 ADJ Gi1/0/5: Nbr [Link] has larger interface MTU
*Sep 29 14:09:26.773: OSPF-123 ADJ Gi1/0/5: Rcv DBD from [Link] seq 0x931 opt 0x52
flag 0x7 len 32 mtu 1500 state EXSTART
*Sep 29 14:09:26.773: OSPF-123 ADJ Gi1/0/5: Nbr [Link] has larger interface MTU
*Sep 29 14:09:26.774: OSPF-123 ADJ Gi1/0/5: Rcv DBD from [Link] seq 0x86 opt 0x52
flag 0x2 len 92 mtu 1500 state EXSTART
*Sep 29 14:09:26.774: OSPF-123 ADJ Gi1/0/5: Nbr [Link] has larger interface MTU
*Sep 29 14:09:31.408: OSPF-123 ADJ Gi1/0/5: Send DBD to [Link] seq 0x9D1 opt 0x52
flag 0x7 len 32
*Sep 29 14:09:31.408: OSPF-123 ADJ Gi1/0/5: Retransmitting DBD to [Link] [1]
*Sep 29 14:09:31.512: OSPF-123 ADJ Gi1/0/5: Send DBD to [Link] seq 0x86 opt 0x52
flag 0x7 len 32
*Sep 29 14:09:31.512: OSPF-123 ADJ Gi1/0/5: Retransmitting DBD to [Link] [1]
*Sep 29 14:09:31.513: OSPF-123 ADJ Gi1/0/5: Rcv DBD from [Link] seq 0x86 opt 0x52
flag 0x2 len 92 mtu 1500 state EXSTART
*Sep 29 14:09:31.513: OSPF-123 ADJ Gi1/0/5: Nbr [Link] has larger interface MTU
*Sep 29 14:09:31.666: OSPF-123 ADJ Gi1/0/5: Rcv DBD from [Link] seq 0x243E opt 0x52
flag 0x7 len 32 mtu 1500 state EXSTART
*Sep 29 14:09:31.666: OSPF-123 ADJ Gi1/0/5: Nbr [Link] has larger interface MTU
*Sep 29 14:09:36.190: OSPF-123 ADJ Gi1/0/5: Send DBD to [Link] seq 0x86 opt 0x52
flag 0x7 len 32
*Sep 29 14:09:36.190: OSPF-123 ADJ Gi1/0/5: Retransmitting DBD to [Link] [2]
*Sep 29 14:09:36.192: OSPF-123 ADJ Gi1/0/5: Rcv DBD from [Link] seq 0x86 opt 0x52
flag 0x2 len 92 mtu 1500 state EXSTART
*Sep 29 14:09:36.192: OSPF-123 ADJ Gi1/0/5: Nbr [Link] has larger interface MTU
*Sep 29 14:09:36.210: OSPF-123 ADJ Gi1/0/5: Send DBD to [Link] seq 0x9D1 opt 0x52
flag 0x7 len 32
*Sep 29 14:09:36.210: OSPF-123 ADJ Gi1/0/5: Retransmitting DBD to [Link] [2]
*Sep 29 14:09:36.609: OSPF-123 ADJ Gi1/0/5: Rcv DBD from [Link] seq 0x243E opt 0x52
flag 0x7 len 32 mtu 1500 state EXSTART
*Sep 29 14:09:36.609: OSPF-123 ADJ Gi1/0/5: Nbr [Link] has larger interface MTU
*Sep 29 14:09:40.713: OSPF-123 ADJ Gi1/0/5: Send DBD to [Link] seq 0x86 opt 0x52
flag 0x7 len 32
<D1 continues to retransmit DBD packets every 5 seconds. Output omitted for
retransmission [3] through [24]>
*Sep 29 14:11:25.039: OSPF-123 ADJ Gi1/0/5: Retransmitting DBD to [Link] [25]
*Sep 29 14:11:25.041: OSPF-123 ADJ Gi1/0/5: Rcv DBD from [Link] seq 0x86 opt 0x52
flag 0x2 len 92 mtu 1500 state EXSTART
*Sep 29 14:11:25.041: OSPF-123 ADJ Gi1/0/5: Nbr [Link] has larger interface MTU
*Sep 29 14:11:25.463: OSPF-123 ADJ Gi1/0/5: Send DBD to [Link] seq 0x9D1 opt 0x52
flag 0x7 len 32
*Sep 29 14:11:25.463: OSPF-123 ADJ Gi1/0/5: Retransmitting DBD to [Link] [25]
*Sep 29 14:11:26.420: OSPF-123 ADJ Gi1/0/5: Rcv DBD from [Link] seq 0x243E opt 0x52
flag 0x7 len 32 mtu 1500 state EXSTART
*Sep 29 14:11:26.420: OSPF-123 ADJ Gi1/0/5: Nbr [Link] has larger interface MTU
*Sep 29 14:11:29.578: OSPF-123 ADJ Gi1/0/5: Killing nbr [Link] due to excessive
(25) retransmissions
*Sep 29 14:11:29.578: OSPF-123 ADJ Gi1/0/5: [Link] address [Link] is dead, state
DOWN
*Sep 29 14:11:29.578: %OSPF-5-ADJCHG: Process 123, Nbr [Link] on GigabitEthernet1/0/5
from EXSTART to DOWN, Neighbor Down: Too many retransmissions
© 2019 - 2026 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 13 of 25
-
Lab - Implement Single-Area OSPFv2
*Sep 29 14:11:29.578: OSPF-123 ADJ Gi1/0/5: Nbr [Link]: Clean-up dbase exchange
*Sep 29 14:11:29.578: OSPF-123 ADJ Gi1/0/5: Neighbor change event
*Sep 29 14:11:29.578: OSPF-123 ADJ Gi1/0/5: DR/BDR election
*Sep 29 14:11:29.578: OSPF-123 ADJ Gi1/0/5: Elect BDR [Link]
*Sep 29 14:11:29.578: OSPF-123 ADJ Gi1/0/5: Elect DR [Link]
*Sep 29 14:11:29.578: OSPF-123 ADJ Gi1/0/5: Elect BDR [Link]
*Sep 29 14:11:29.578: OSPF-123 ADJ Gi1/0/5: Elect DR [Link]
*Sep 29 14:11:29.578: OSPF-123 ADJ Gi1/0/5: DR: [Link] (Id)
*Sep 29 14:11:29.578: OSPF-123 ADJ Gi1/0/5: BDR: [Link] (Id)
*Sep 29 14:11:30.218: OSPF-123 ADJ Gi1/0/5: Killing nbr [Link] due to excessive
(25) retransmissions
*Sep 29 14:11:30.219: OSPF-123 ADJ Gi1/0/5: [Link] address [Link] is dead, state
DOWN
*Sep 29 14:11:30.219: %OSPF-5-ADJCHG: Process 123, Nbr [Link] on GigabitEthernet1/0/5
from EXSTART to DOWN, Neighbor Down: Too many retransmissions
*Sep 29 14:11:30.219: OSPF-123 ADJ Gi1/0/5: Nbr [Link]: Clean-up dbase exchange
*Sep 29 14:11:30.219: OSPF-123 ADJ Gi1/0/5: Neighbor change event
*Sep 29 14:11:30.219: OSPF-123 ADJ Gi1/0/5: DR/BDR election
*Sep 29 14:11:30.219: OSPF-123 ADJ Gi1/0/5: Elect BDR [Link]
*Sep 29 14:11:30.219: OSPF-123 ADJ Gi1/0/5: Elect DR [Link]
*Sep 29 14:11:30.219: OSPF-123 ADJ Gi1/0/5: Elect BDR [Link]
*Sep 29 14:11:30.219: OSPF-123 ADJ Gi1/0/5: Elect DR [Link]
*Sep 29 14:11:30.219: OSPF-123 ADJ Gi1/0/5: DR: [Link] (Id)
*Sep 29 14:11:30.219: OSPF-123 ADJ Gi1/0/5: BDR: none
*Sep 29 14:11:30.219: OSPF-123 ADJ Gi1/0/5: Remember old DR [Link] (id)
*Sep 29 14:11:30.494: OSPF-123 ADJ Gi1/0/5: Nbr [Link] [Link] is currently
ignored
*Sep 29 14:11:32.995: OSPF-123 ADJ Gi1/0/5: Nbr [Link] [Link] is currently
ignored
<output omitted>
Notice that D1 is stuck in the EXSTART state with R1 and D2 as it tries to exchange DBD packets. After
reaching 25 retransmissions, the OSPF process declares neighbors [Link] and 3.3.3 "dead", tears down
the adjacency, and moves both R1 and D2 from EXSTART to DOWN. But OSPF hellos will restart the
neighbor state again, resulting in another 25 retransmissions to each neighbor. D1 is stuck in the
EXSTART state for R1 and D2.
d. To stop the debug messages, turn off the debug process.
D1# u all
e. Now check the neighbor table on D1 to verify that it knows about R1 and D2, but that it is stuck in the
EXSTART state with those neighbors.
D1# show ip ospf neighbors
Your output may show the State as Down for one or both neighbors. But D1 will continue to try and
establish adjacency after killing a neighbor. Messages sent to the console will continue to inform you of
state transitions.
*Sep 22 14:39:34.203: %OSPF-5-ADJCHG: Process 123, Nbr [Link] on GigabitEthernet1/0/5
from EXSTART to DOWN, Neighbor Down: Too many retransmissions
© 2019 - 2026 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 14 of 25
-
Lab - Implement Single-Area OSPFv2
Keep entering the show ip ospf neighbors command and you will see both neighbors return to the
EXSTART state for the next round of 25 retransmissions of DBD packets.
f. Restore FULL adjacency by reconfiguring the MTU value to 1500. Wait for the adjacency messages to
say LOADING to FULL for both neighbors, and then enter show ip ospf neighbors to verify.
D1# config t
D1(config)# interface g1/0/5
D1(config-if)# ip mtu 1500
D1(config-if)# end
*Sep 29 14:45:59.248: %OSPF-5-ADJCHG: Process 123, Nbr [Link] on GigabitEthernet1/0/5
from LOADING to FULL, Loading Done
*Sep 29 14:46:54.658: %OSPF-5-ADJCHG: Process 123, Nbr [Link] on GigabitEthernet1/0/5
from LOADING to FULL, Loading Done
D1# show ip ospf neighbors
© 2019 - 2026 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 15 of 25
-
Lab - Implement Single-Area OSPFv2
b. Use the show ip ospf interface [brief] command to verify which interfaces are enabled for OSPF,
process ID, Area ID, and state. A missing interface could be the result of an incorrect network statement,
IP addressing problem, or a disabled interface.
R1# show ip ospf interface brief
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Lo1 123 0 [Link]/26 1 P2P 0/0
Gi0/0/1 123 0 [Link]/29 1 DROTH 2/2
Note: Omitting the “brief” keyword displays detailed information about the OSPF enabled interfaces.
The State field defines the state of the link and can be:
o DR - This is the Designated Router on the multiaccess network (i.e., Ethernet) to which this interface
is connected. The DR establishes OSPF adjacencies with all other routers on the network.
o BDR - This is the Backup Designated Router on the multiaccess network to which this interface is
connected. Like the DR, the BDR establishes adjacencies with all other routers on the broadcast
network.
o DROTH - This is a DROTHER. It is neither the DR nor the BDR on the multiaccess network. All non-
DRs and BDRs on the broadcast network would be DROTHERs and establish adjacencies only with
the DR and the BDR.
© 2019 - 2026 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 16 of 25
-
Lab - Implement Single-Area OSPFv2
o P2P - This is an OSPF point-to-point interface and does not require a DR or BDR. In this state, the
interface is fully functional and starts exchanging hello packets with all of its neighbors.
c. Use the show ip ospf neighbor [detail] command to verify which OSPF neighbor your device has
established adjacencies with, the state, the next-hop IP address, and the exit interface to use. A neighbor
may not be appearing include RIDs that are not unique, interconnecting interfaces that are not on a
common subnet, MTU values that do not match, Area ID that is not correct, Hello and dead interval timers
that do not match, or authentication type / credentials that do not match. The following output confirms
that our devices have correctly established adjacencies. The output for R1 is shown below. Repeat the
command for D1 and D2.
R1# show ip ospf neighbor
d. Other OSPF validation commands include the show ip ospf, show ip ospf topology-info, show ip ospf
database commands. Use these commands now and identify what types of information they generate
which may be useful to know when troubleshooting a network.
Close configuration window
Note: Disregard the informational message. In a production environment, a valid physical interface would
be used to provide default gateway services.
b. Enter OSPF router configuration mode and use the default-information originate [always] [metric
metric-value] [metric-type type-value] command to enable default route propagation. The always
keyword advertises a default route even if a static default route does not exist while the route metric and
metric type can be changed. R1 is configured to propagate the default route.
R1(config)# router ospf 123
R1(config-router)# default-information originate
R1(config-router)# end
© 2019 - 2026 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 17 of 25
-
Lab - Implement Single-Area OSPFv2
© 2019 - 2026 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 18 of 25
-
Lab - Implement Single-Area OSPFv2
Loopback1
GigabitEthernet0/0/1
Passive Interface(s):
Loopback1
Routing Information Sources:
Gateway Distance Last Update
[Link] 110 10:45:59
[Link] 110 10:45:59
[Link] 110 10:54:49
[Link] 110 10:49:26
Distance: (default is 110)
c. A Layer 3 switch can potentially have many interfaces that should be passive. For example, assume that
D1 and D2 only require their G1/0/5 interface to not be passive. However, all other interfaces should be
passive. Using the first approach would be very time-consuming. For this reason, the second approach
will be used. All active interfaces will be rendered passive and only interface G1/0/5 will be re-enabled.
D1(config)# router ospf 123
D1(config-router)# passive-interface default
D1(config-router)#
*Sep 22 12:30:42.637: %OSPF-5-ADJCHG: Process 123, Nbr [Link] on GigabitEthernet1/0/5
from FULL to DOWN, Neighbor Down: Interface down or detached
*Sep 22 12:30:42.637: %OSPF-5-ADJCHG: Process 123, Nbr [Link] on GigabitEthernet1/0/5
from FULL to DOWN, Neighbor Down: Interface down or detached
© 2019 - 2026 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 19 of 25
-
Lab - Implement Single-Area OSPFv2
o auto-cost reference-bandwidth 1000 - Assigns the default reference bandwidth to 1 Gbps. With this
setting, FastEthernet = 10, GigabitEthernet = 1, and 10GE = 1.
o auto-cost reference-bandwidth 10000 - Assigns the default reference bandwidth to 10 Gbps. With
this setting, FastEthernet = 100, GigabitEthernet = 10, and 10GE = 1.
Note: The auto-cost reference-bandwidth must be the same on all routers in the area. Otherwise
suboptimal routing may occur.
a. On R1, change the reference bandwidth to account for the Gigabit interfaces as shown.
Open configuration window
c. Repeat the steps on D1 and D2 to change the reference bandwidth to account for the Gigabit interfaces.
d. Verify the routing table on D2 to see if the route metrics have increased.
R1# show ip route ospf | begin Gateway
Gateway of last resort is [Link] to network [Link]
© 2019 - 2026 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 20 of 25
-
Lab - Implement Single-Area OSPFv2
Notice how R1 has received OSPF adjacency change messages for D1 and D2. The reason is because
OSPF timers must match between interconnecting peers. Therefore, the D1 and D2 GigabitEthernet1/0/5
interface must also be configured with the identical timers.
c. Enable debug command to observe a mismatch in the hello timers on R1.
R1# debug ip ospf hello
OSPF hello debugging is on
R1#
*Sep 22 04:45:15.588: OSPF-123 HELLO Gi0/0/1: Send hello to [Link] area 0 from
[Link]
R1#
*Sep 22 04:45:18.961: OSPF-123 HELLO Gi0/0/1: Rcv hello from [Link] area 0 [Link]
*Sep 22 04:45:18.961: OSPF-123 HELLO Gi0/0/1: Mismatched hello parameters from
[Link]
*Sep 22 04:45:18.961: OSPF-123 HELLO Gi0/0/1: Dead R 40 C 20, Hello R 10 C 5 Mask R
[Link] C [Link]
*Sep 22 04:45:19.274: OSPF-123 HELLO Gi0/0/1: Rcv hello from [Link] area 0 [Link]
*Sep 22 04:45:19.274: OSPF-123 HELLO Gi0/0/1: Mismatched hello parameters from
[Link]
© 2019 - 2026 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 21 of 25
-
Lab - Implement Single-Area OSPFv2
f. Configure D1 with the identical hello and dead interval timers on GigabitEthernet1/0/5 and verify.
*Sep 22 15:12:45.159: %OSPF-5-ADJCHG: Process 123, Nbr [Link] on GigabitEthernet0/5
from FULL to DOWN, Neighbor Down: Dead timer expired
D1(config)# interface g1/0/5
D1(config-if)# ip ospf hello-interval 5
D1(config-if)# ip ospf dead-interval 20
D1(config-if)#
*Sep 22 15:18:25.779: %OSPF-5-ADJCHG: Process 123, Nbr [Link] on GigabitEthernet1/0/5
from LOADING to FULL, Loading Done
D1(config-if)# end
D1#
*Sep 22 15:18:53.201: %OSPF-5-ADJCHG: Process 123, Nbr [Link] on GigabitEthernet1/0/5
from FULL to DOWN, Neighbor Down: Dead timer expired
Notice the first OSPF adjacency change message indicating that D1 had lost adjacency with R1. After the
commands are entered, the next OSPF adjacency change message indicates that the adjacency with R1
has been re-established. However, the second adjacency change message indicates that the adjacency
with D2 has been lost because its timers are not matching.
Also notice that the dead interval was automatically adjusted without having to configure the ip ospf dead-
interval 20 command on the interface.
g. Configure D2 with the identical hello and dead interval timers on GigabitEthernet1/0/5 and verify.
*Sep 22 15:12:34.045: %OSPF-5-ADJCHG: Process 123, Nbr [Link] on GigabitEthernet1/0/5
from FULL to DOWN, Neighbor Down: Dead timer expired
*Sep 22 15:19:24.717: %OSPF-5-ADJCHG: Process 123, Nbr [Link] on GigabitEthernet1/0/5
from FULL to DOWN, Neighbor Down: Dead timer expired
D2#
D2# conf t
D2(config)# interface g1/0/5
D2(config-if)# ip ospf hello-interval 5
D2(config-if)# ip ospf dead-interval 20
*Sep 22 15:38:48.158: %OSPF-5-ADJCHG: Process 123, Nbr [Link] on GigabitEthernet1/0/5
from LOADING to FULL, Loading Done
*Sep 22 15:38:52.965: %OSPF-5-ADJCHG: Process 123, Nbr [Link] on GigabitEthernet1/0/5
from LOADING to FULL, Loading Done
D2(config-if)# end
© 2019 - 2026 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 22 of 25
-
Lab - Implement Single-Area OSPFv2
Again, notice the existing OSPF adjacency change messages indicating that D2 had lost adjacency with
R1 and D1.
After the commands are entered, the next OSPF adjacency change messages indicate adjacencies with
R1 and D1 have been re-established. And again, the dead interval was automatically adjusted without
having to configure the ip ospf dead-interval 20 command on the interface.
© 2019 - 2026 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 23 of 25
-
Lab - Implement Single-Area OSPFv2
From the perspective of R1, D1 (i.e., [Link]) is a DROTHER and D2 (i.e., router ID [Link]) is the DR.
We must then assume that R1 is the BDR.
Note: Your DR and BDR may be different if you cleared the OSPF process in a different order than what
was shown previously in this lab. It doesn’t matter. You will configure who will be DR and BDR in the next
step.
b. Verify the current status of R1 using the show ip ospf interface G0/0/1 command.
R1# show ip ospf interface g0/0/1
GigabitEthernet0/0/1 is up, line protocol is up
Internet Address [Link]/29, Interface ID 7, Area 0
Attached via Interface Enable
Process ID 123, Router ID [Link], Network Type BROADCAST, Cost: 10
Topology-MTID Cost Disabled Shutdown Topology Name
0 10 no no Base
Enabled by interface config, including secondary ip addresses
Transmit Delay is 1 sec, State BDR, Priority 1
Designated Router (ID) [Link], Interface address [Link]
Backup Designated router (ID) [Link], Interface address [Link]
Timer intervals configured, Hello 5, Dead 20, Wait 20, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:02
Supports Link-local Signaling (LLS)
Cisco NSF helper support enabled
IETF NSF helper support enabled
Can be protected by per-prefix Loop-Free FastReroute
Can be used for per-prefix Loop-Free FastReroute repair paths
Not Protected by per-prefix TI-LFA
Index 1/2/2, flood queue length 0
Next 0x0(0)/0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 2
Last flood scan time is 0 msec, maximum is 1 msec
Neighbor Count is 2, Adjacent neighbor count is 2
Adjacent with neighbor [Link]
Adjacent with neighbor [Link] (Designated Router)
Suppress hello for 0 neighbor(s)
The output confirms that R1 is the BDR and that D2 (i.e., [Link]) is the DR.
c. Verify the current DR/BDR status on D1 and D2 using the show ip ospf neighbor command.
Close configuration window
© 2019 - 2026 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 24 of 25
-
Lab - Implement Single-Area OSPFv2
D2(config-if)#
*Sep 22 17:23:20.195: %OSPF-5-ADJCHG: Process 123, Nbr [Link] on GigabitEthernet1/0/5
from LOADING to FULL, Loading Done
D2(config-if)# end
Notice the OSPF message. The reason is because D1 (i.e., [Link]) just assumed either the DR or BDR
role and has established an adjacency with D2.
Note: Depending on your IOS version, you may or may not see the message.
b. Verify the current DR / BDR placement.
D2# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
[Link] 1 FULL/DR 00:00:18 [Link] GigabitEthernet1/0/5
[Link] 1 FULL/BDR 00:00:18 [Link] GigabitEthernet1/0/5
The output confirms that R1 (i.e., [Link]) is now the DR and D1 (i.e., [Link]) is the BDR.
The reason R1 became the DR is because it had already been elected as BDR. When a DR fails, the
elected BDR is automatically elected as DR to avoid network instability. Note that R1 became the DR
although D1 has a higher router ID. You would have to clear the OSPF process on R1 and D1
simultaneously to see D1 take over as the DR.
c. Although R1 is already the DR, change the interface priority to ensure it is always a candidate to be DR.
R1(config)# interface g0/0/1
R1(config-if)# ip ospf priority 255
R1(config-if)# end
Note: If R1 was not already the DR for your setup, you will need to clear the OSPF process on R1 and D1
simultaneously to see R1 take over as the DR.
d. Verify that R1 is now the DR.
R1# show ip ospf interface g0/0/1 | include State
Transmit Delay is 1 sec, State DR, Priority 255
© 2019 - 2026 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 25 of 25