Lab - 5 - OSPF
Lab - 5 - OSPF
Topology
Addressing Table
Default
Device Interface IP Address Subnet Mask Gateway
Background / Scenario
Open Shortest Path First (OSPF) is a link-state routing protocol for IP networks. OSPFv2 is defined
for IPv4 networks, and OSPFv3 is defined for IPv6 networks. OSPF detects changes in the topology,
such as link failures, and converges on a new loop-free routing structure very quickly. It computes
each route using algorithm, a shortest path first algorithm.
In this lab, you will configure the network topology with OSPFv2 routing, change the router ID
assignments, configure passive interfaces, adjust OSPF metrics, and use a number of CLI commands
to display and verify OSPF routing information. Depending on the model and Cisco IOS version, the
commands available and output produced might vary from what is shown in the labs. Refer to the
Router Interface Summary Table at the end of this lab for the correct interface identifiers.
Required Resources
✓ 3 Routers (Cisco 2911 with Cisco IOS Release 15.2(4)M3 universal image or comparable)
✓ 3 PCs
✓ Ethernet and serial cables as shown in the topology
In Part 1, you set up the network topology and configure basic settings on the PC hosts and routers.
b. Configure the IP address listed in the Addressing Table for all interfaces.
The routers should be able to ping one another, and each PC should be able to ping its default
gateway. The PCs are unable to ping other PCs until OSPF routing is configured. Verify and
troubleshoot if necessary.
In Part 2, you will configure OSPFv2 routing on all routers in the network and then verify that
routing tables are updated correctly. After OSPF has been verified, you will configure OSPF
authentication on the links for added security.
a. Use the router ospf command in global configuration mode to enable OSPF on R1.
Note: The OSPF process id is kept locally and has no meaning to other routers on the network.
b. Configure the network statements for the networks on R1. Use an area ID of 0.
Configure the LAN network 172.16.1.16/28 to be included in the OSPF updates that are sent out
of R1. The OSPF network command uses a combination of network-address and wildcard-mask
similar to that which can be used by EIGRP. Unlike EIGRP, the wildcard mask in OSPF is
required. Use an area ID of 0 for the OSPF area-id parameter. 0 will be used for the OSPF area
ID in all of the network statements in this topology.
Enable OSPF routing on the R2 router using the router ospf command. Use a process ID of 1.
R2(config)#router ospf 1
Step 3: Configure OSPF on the R3 router using the router ospf and network commands.
Use a process ID of 1. Configure the router to advertise the three directly connected networks.
When you are finished, return to privileged EXEC mode.
R3(config)#router ospf 1
Notice that when the networks for the serial links from R3 to R1 and R3 to R2 are added to the
OSPF configuration, the router sends a notification message to the console stating that a neighbor
relationship with another OSPF router has been established.
Since no router IDs or loopback interfaces have been configured on the three routers, the router
ID for each router is determined by the highest IP address of any active interface.
What is the router ID for R1?
What is the router ID for R2?
What is the router ID for R3?
The router ID can also be seen in the output of the show ip protocols, show ip ospf, and show ip
ospf interfaces commands.
R3#show ip protocols
Note: Some IOS versions do not support the router-id command. If this command is not available,
continue to the next Task.
R1(config)#router ospf 1
R1(config)#router-id 11.11.11.11
Router(config-router)#Reload or use "clear ip ospf process"
command, for this to take effect
If this command is used on an OSPF router process which is already active (has neighbors), the new
router-ID is used at the next reload or at a manual OSPF process restart. To manually restart the OSPF
process, use the clear ip ospf process command
Router#show ip ospf
Routing Process "ospf 1" with ID 11.11.11.11
Supports only single TOS(TOS0) routes
Supports opaque LSA
SPF schedule delay 5 secs, Hold time between two SPFs 10 secs
Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs
Number of external LSA 0. Checksum Sum 0x000000
Number of opaque AS LSA 0. Checksum Sum 0x000000
Number of DCbitless external and opaque AS LSA 0
Number of DoNotAge external and opaque AS LSA 0
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
External flood list length 0
Area BACKBONE(0)
Number of interfaces in this area is 3
Area has no authentication
SPF algorithm executed 8 times
Step 3: Use the show ip ospf neighbor command on router R2 to verify that the router ID of R1
has been changed.
R1#show ip ospf neighbor
b. Issue the show ip route command to verify that all networks display in the routing table on all
routers.
The show ip protocols command is a quick way to verify vital OSPF configuration information.
This information includes the OSPF process ID, the router ID, networks the router is advertising, the
neighbors the router is receiving updates from, and the default administrative distance, which is 110
for OSPF.
Issue the show ip ospf interface brief command to display a summary of OSPF-enabled interfaces.
Each PC should be able to ping the other PCs in the topology. Verify and troubleshoot if necessary.