What You’ll Learn
What You’ll Need
Open the Lab Environment in Cisco Packet Tracer
This tutorial requires the Cisco Packet Tracer simulator. The following steps provide general guidance on how to obtain and install this free software application. If you already have Cisco Packet Tracer installed, at version 8.2.0 or later, you can skip these instructions.
Download and Open the Packet Tracer File
Click this link to download the Packet Tracer (.pkt) file to be used with this lab.
Open the file in Cisco Packet Tracer. You can either:
You should see a topology window with four routers—R1, R2, R3, and R4—similar to the following figure.
Figure 1: Lab Topology with Interface IDs
Get into the console of each router with these steps:
enable
command to move to privileged mode.Basic Topology Familiarization
This lab has three large steps. First, it examines the expected OSPF neighbor relationship between routers R1 and R2, as shown in Figure 2. Then, it uses the same process to explore the next pair (R1 and R3), closing with the third pair (R1 and R4). For each pair, you will first gather facts about OSPF features that might cause problems for OSPF and then work to correct the configuration for any suspicious settings.
Figure 2: Expected R1-R2 Neighbor Relationship
Before setting about for the first pair, use these steps to confirm that no routers have OSPF neighbor relationships nor OSPF-learned routes.
show cdp neighbors brief
command to display all Cisco Discovery Protocol-learned neighboring devices. Focus on the entries for routers R2, R3, and R4. Which interfaces does R1 use to connect to each?show ip ospf interface brief
command to display all OSPF-enabled interfaces on R1. Is OSPF enabled on all four Ethernet interfaces shown earlier in Figure 1—including the three interfaces that connect to the other routers, respectively?show ip ospf neighbor
command on R1. How many neighbors does R1 have? How many should it list when OSPF works correctly on all links shown in the figure?show ip route ospf
command on R1, which displays all OSPF-learned routes on the router. How many OSPF-learned IPv4 routes does R1 have?In this topic, you will gather facts that could impact the R1-R2 neighbor relationship. In the next topic, you will analyze the suspicious settings and make configuration changes until the R1-R2 OSPF neighbor relationship is fully functional.
Confirm R2 Lacks OSPF Neighbor and Routes
First, from R2, confirm that it has no OSPF neighbor relationship with R1 and that it has no OSPF-learned routes.
Use the show ip ospf neighbor brief
command. How many neighbors does R2 have?
Use the show ip route ospf
command. How many IPv4 routes does R2 have? Does it have a route to R1’s LAN subnet 172.16.1.0/24?
Later, once you have repaired the OSPF neighbor relationship, you will use these same steps to verify that OSPF works between R1 and R2.
Gather IP Facts That Can Affect the R1-R2 Neighbor Relationship
Rather than looking at the configuration, practice finding all the settings that impact OSPF neighbors, using the following commands and questions. Take the time to consider where to find each fact in the suggested commands.
Confirm which interfaces R1 and R2 use to connect to each other, using the show cdp neighbors
command on R1. Note the interface that is used on each device.
Use the following commands to complete Table 1’s facts about R1:
show interfaces
interface-id
show protocols
show ip route connected
show ip interface
Table 1: Related Interface Facts
Gather OSPF Facts That Can Affect the R1-R2 Neighbor Relationship
Gather OSPF facts in Table 2, first for R1. Use the following commands in order:
show ip ospf interface brief
show ip ospf interface
interface-idshow ip ospf
show ip ospf neighbor
Table 2: OSPF Interface Facts
Complete Table 2, using the same sequence of commands, this time for R2.
Reflect on the information in both tables versus your recollection of why two routers might not become OSPF neighbors, or why they might become neighbors but fail to add IP routes to the routing table.
For reference, Tables 1 and 2 show the results that you should have gathered in the previous topic, with the potential issues highlighted.
Table 1: Related Interface Facts (Completed)
Table 2: OSPF Facts (Completed)
In this topic, work through the potential issues in the following order. For any fixes, change R2 rather than R1. For any access control list (ACL) changes, the lab will specify the steps.
Configure R2 to Match R1: Dead Interval
show
command output, resist the urge to look at the configuration files. Instead, look at the settings per show
commands, and then attempt to configure to make R2’s configuration work with R1’s.show ip ospf interface
command on both routers to confirm the values.ip ospf dead-interval 40
interface subcommand.In this case, R1 uses default hello and dead interval settings (10 and 40, respectively). R2 originally used the default hello interval of 10 and a configured dead interval of 50. Configuring the dead interval on R2 to match R1 solved the problem.
Confirm the R1-R2 Neighbor Relationship Works
Even though the log message suggested that the neighbor relationship on R2 initialized, you should confirm that it works, reaches a FULL state, and results in working IP routes, by using these steps:
Use the show ip ospf neighbor
command. How many neighbors does R2 have? Does it list R1, with router ID 1.1.1.1? (It should.)
Use the show ip route ospf
command. How many OSPF-learned IPv4 routes does R2 have? Does it have a route to R1’s LAN subnet 172.16.1.0/24? (It should.)
Outbound ACL on R2 G0/0/0 Interface
The previous steps showed that the R1-R2 neighbor relationship came up, even though R2 has an ACL enabled. The next few steps investigate the ACL.
show ip interfaces g0/0/0
command.show access-lists
command displays the ACL. Think through the matching logic in the ACL. Should the ACL match OSPF packets with a permit or deny action?In fact, the ACL in this case has no effect on OSPF. For packets that the router creates, like OSPF messages, Cisco IOS bypasses all outbound ACLs. That is why the existence of the outbound ACL on R2 had no effect on the R1-R2 neighbor relationship.
In this topic, you will gather facts that could impact the R1-R3 neighbor relationship. In the next topic, you will analyze the suspicious settings and make configuration changes until the R1-R3 OSPF neighbor relationship is fully functional.
Confirm R3 Lacks OSPF Neighbor and Routes
First, from R3, confirm that it has no OSPF neighbor relationship with R1 and that it has no OSPF-learned routes.
Use the show ip ospf neighbor
command. How many neighbors does R3 have?
Use the show ip route ospf
command. How many IPv4 routes does R3 have? Does it have a route to R1’s LAN subnet 172.16.1.0/24?
Later, once you have repaired the OSPF neighbor relationship, you will use these same steps to verify that OSPF works between R1 and R3.
Gather IP Facts That Can Affect the R1-R3 Neighbor Relationship
Rather than looking at the configuration, practice finding all the settings that impact OSPF neighbors, using the following commands and questions. Take the time to consider where to find each fact in the suggested commands.
Confirm which interfaces R1 and R3 use to connect to each other, using the show cdp neighbors
command on each router. Note the interface that is used on each device.
Use the following commands to complete Table 1’s facts about R1:
show interfaces
interface-id
show protocols
show ip route connected
show ip interface
Table 1: Related Interface Facts
Gather OSPF Facts That Can Affect the R1-R3 Neighbor Relationship
Gather OSPF facts in Table 2, first for R1. Use the following commands in order:
show ip ospf interface brief
show ip ospf interface
interface-idshow ip ospf
show ip ospf neighbor
Table 2: OSPF Interface Facts
Complete Table 2, using the same sequence of commands, this time for R3.
Reflect on the information in both tables versus your recollection of why two routers might not become OSPF neighbors, or why they might become neighbors but fail to add IP routes to the routing table.
For reference, Tables 1 and 2 show the results that you should have gathered in the previous topic, with the potential issues highlighted.
Table 1: Related Interface Facts (Completed)
Table 2: OSPF Facts (Completed)
In this topic, work through the potential issues in the following order. For any fixes, change R3 rather than R1. For any ACL changes, the lab will specify the steps.
Configure R3 to Match R1: IP Subnet Mismatch
show
command output, resist the urge to look at the configuration files. Instead, look at the settings per show
commands, and then change R3’s configuration to work with R1’s.show protocols
or show ip ospf interface
command to find those values.show ip route connected
command to find the connected route on the interface, which reveals the subnet ID calculated by the router for each interface.ip address 172.16.13.3 255.255.255.192
interface subcommand.Check the R1-R3 Neighbor Status
Because you fixed a configuration mistake that would impact the R1-R3 neighbor relationship, take a moment to check the OSPF neighbor status and check whether R3 has learned OSPF routes from R1, using these steps:
Use the show ip ospf neighbor
command. How many neighbors does R3 have? Does it list R1, with router ID 1.1.1.1? (It should not at this point.)
Use the show ip route ospf
command. How many OSPF-learned IPv4 routes does R3 have? Does it have a route to R1’s LAN subnet 172.16.1.0/24? (It should not at this point.)
Configure R3 to Match R1: Priority 0 on R3
show ip ospf interface
command to find those values.show ip ospf neighbor
command output. However, they will have problems adding routes to their IP routing tables because of confusion about the contents of the link-state advertisements (LSAs).In this case, the priority value may have looked suspicious, but it does not cause a problem, because R1 has a non-0 value. To prove the fact that R3’s priority 0 setting does not cause a problem, leave it unchanged. Then, complete the remaining steps to fix the neighbor relationship, which will confirm that the priority settings did not cause a problem.
Inbound ACL on R3 G0/0/0 Interface
Cisco IOS bypasses outbound ACLs for packets generated by the router itself. However, Cisco IOS considers all packets entering the interface for any ACL enabled in the inbound direction. Use these next steps to consider what happens with the ACL on R3.
show ip interfaces g0/0/0
command on R3.show access-lists
command to display the ACL. Think through the matching logic in the ACL. Should the ACL match OSPF packets with a permit or deny action?permit
commands match OSPF packets, because OSPF does not use TCP or UDP. As a result, all incoming OSPF packets match the implied deny all at the end of the ACL, preventing OSPF neighbor discovery and preventing the neighbor relationship.ip access-list extended R3-ACL
permit ospf any any
Check the R1-R3 Neighbor Status Again
Repeat your checks of both the neighbors and OSPF-learned routes from R3 to confirm that OSPF works between R1 and R3.
show ip ospf neighbor
command. How many neighbors does R3 have? Does it list R1, with router ID 1.1.1.1? (It should.)show ip route ospf
command. How many OSPF-learned IPv4 routes does R3 have? Does it have a route to R1’s LAN subnet 172.16.1.0/24? (It should.)In this topic, you will gather facts that could impact the R1-R4 neighbor relationship. In the next topic, you will analyze the suspicious settings and make configuration changes until the R1-R4 OSPF neighbor relationship is fully functional.
Confirm R4 Lacks OSPF Neighbor and Routes
First, from R4, confirm that it has no OSPF neighbor relationship with R1 and that it has no OSPF-learned routes.
Use the show ip ospf neighbor
command. How many neighbors does R4 have?
Use the show ip route ospf
command. How IPv4 routes does R4 have? Does it have a route to R1’s LAN subnet 172.16.1.0/24?
Later, once you have repaired the OSPF neighbor relationship, you will use these same steps to verify that OSPF works between R1 and R4.
Gather IP Facts That Can Affect the R1-R4 Neighbor Relationship
Rather than looking at the configuration, practice finding all the settings that impact OSPF neighbors, using the following commands and questions. Take the time to consider where to find each fact in the suggested commands.
Confirm which interfaces R1 and R4 use to connect to each other, using the show cdp neighbors
command on each router. Note the interface that is used on each device.
Use the following commands to complete Table 1’s facts about R1:
show interfaces
interface-id
show protocols
show ip route connected
show ip interface
Table 1: Related Interface Facts
Gather OSPF Facts That Can Affect the R1-R4 Neighbor Relationship
Gather OSPF facts in Table 2, first for R1. Use the following commands in order:
show ip ospf interface brief
show ip ospf interface
interface-idshow ip ospf
show ip ospf neighbor
Table 2: OSPF Interface Facts
Complete Table 2, using the same sequence of commands, this time for R4.
Reflect on the information in both tables versus your recollection of why two routers might not become OSPF neighbors, or why they might become neighbors but fail to add IP routes to the routing table.
For reference, Tables 1 and 2 show the results that you should have gathered in the previous topic, with the potential issues highlighted.
Table 1: Related Interface Facts (Completed)
Table 2: OSPF Facts (Completed)
In this topic, work through the potential issues in the following order. For any fixes, change R4 rather than R1.
Check the R1-R4 Neighbor Status
First, confirm that the R1-R4 OSPF neighbor relationship does not work from R4.
Use the show ip ospf neighbor
command. How many neighbors does R4 have? Does it list R1, with router ID 1.1.1.1? (It should not at this point.)
Use the show ip route ospf
command. How many OSPF-learned IPv4 routes does R4 have? Does it have a route to R1’s LAN subnet 172.16.1.0/24? (It should not at this point.)
Enable the R4 WAN Interface
show
command output, resist the urge to look at the configuration files. Instead, look at the settings per show
commands, and then change R4’s configuration to work with R1’s.interface g0/0/0
no shutdown
Check the R1-R4 Neighbor Status
show ip ospf neighbor
command on R4. How many neighbors does R4 have? Does it list R1, with router ID 1.1.1.1? (It should at this point.)show ip route ospf
command. How many OSPF-learned IPv4 routes does R4 have? Does it have a route to R1’s LAN subnet 172.16.1.0/24? (It should not at this point.)These steps show one scenario in which two routers can be OSPF neighbors while other problems prevent them from using any routes based on the information learned from that neighbor. One remaining issue must be fixed before R1 and R4 can add routes to the routing table based on the LSAs learned over their neighbor relationship.
Configure R4 to Match R1: OSPF Network Type
show ip ospf interface
command to find those values.interface g0/0/0
no ip ospf network point-to-point
Check the R1-R4 Neighbor Status Again
Remember, the routers already had a neighbor relationship but could not add routes based on any learned LSAs due to the network type mismatch. The most recent configuration change should have solved this issue. Repeat your checks of both the neighbors and OSPF-learned routes from R4 to confirm that OSPF works between R1 and R4.
show ip ospf neighbor
command. How many neighbors does R4 have? Does it list R1, with router ID 1.1.1.1? (It should.)show ip route ospf
command. How many OSPF-learned IPv4 routes does R4 have? Does it have a route to R1’s LAN subnet 172.16.1.0/24? (It should.)Congratulations! You have successfully completed this lab.
Training Resources
Learn More