100% found this document useful (1 vote)
173 views10 pages

Lab - 5 - OSPF

The document describes configuring basic OSPFv2 routing on a network topology consisting of 3 routers (R1, R2, R3) and 3 PCs. The steps include building the network, configuring IP addresses, enabling OSPF routing on each router with network statements, and verifying the OSPF neighbor relationships form and routing tables update correctly. It also covers examining the automatically assigned router IDs and configuring IDs to override the default.

Uploaded by

Lipp00 M0MA
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
100% found this document useful (1 vote)
173 views10 pages

Lab - 5 - OSPF

The document describes configuring basic OSPFv2 routing on a network topology consisting of 3 routers (R1, R2, R3) and 3 PCs. The steps include building the network, configuring IP addresses, enabling OSPF routing on each router with network statements, and verifying the OSPF neighbor relationships form and routing tables update correctly. It also covers examining the automatically assigned router IDs and configuring IDs to override the default.

Uploaded by

Lipp00 M0MA
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 10

Lab_5: Configuring Basic OSPFv2

Topology

Addressing Table

Default
Device Interface IP Address Subnet Mask Gateway

G0/2 172.16.1.17 255.255.255.240 N/A


R1
G0/0 192.168.10.1 255.255.255.252 N/A
G0/1 192.168.10.5 255.255.255.252 N/A
G0/2 10.10.10.1 255.255.255.0 N/A
R2 G0/0 192.168.10.2 255.255.255.252 N/A
G0/1 192.168.10.9 255.255.255.252 N/A
G0/2 172.16.1.33 255.255.255.248 N/A
R3 G0/0 192.168.10.6 255.255.255.252 N/A
G0/1 192.168.10.10 255.255.255.252 N/A
PC1 NIC 172.16.1.20 255.255.255.240 172.16.1.17
PC2 NIC 10.10.10.10 255.255.255.0 10.10.10.1
PC3 NIC 172.16.1.35 255.255.255.248 172.16.1.33
Objectives

✓ Build the Network and Configure Basic Device Settings

✓ Configure and Verify OSPF Routing

✓ Change Router ID Assignments

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

Part 1: Build the Network and Configure Basic Device Settings

In Part 1, you set up the network topology and configure basic settings on the PC hosts and routers.

Step 1: Cable the network as shown in the topology.

Step 2: Configure basic settings for each router.

a. Configure device name as shown in the topology.

b. Configure the IP address listed in the Addressing Table for all interfaces.

c. Copy the running configuration to the startup configuration.


Step 3: Configure PC hosts.

Step 4: Test connectivity.

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.

Part 2: Configure and Verify OSPF Routing

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.

Step 1: Configure OSPF on R1.

a. Use the router ospf command in global configuration mode to enable OSPF on R1.

R1(config)# router ospf 1

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.

R1(config-router) #network 172.16.1.16 0.0.0.15 area 0


Configure the router to advertise the 192.168.10.0/30 network attached to the G0/0 interface.
R1(config-router) # network 192.168.10.0 0.0.0.3 area 0
Configure the router to advertise the 192.168.10.4/30 network attached to the G0/1 interface.

R1(config-router) # network 192.168.10.4 0.0.0.3 area 0


Step 2: Configure OSPF on R2 and R3.

Enable OSPF routing on the R2 router using the router ospf command. Use a process ID of 1.
R2(config)#router ospf 1

R2(config-router) #network 10.10.10.0 0.0.0.255 area 0

R2(config-router) #network 192.168.10.0 0.0.0.3 area 0

03:50:19: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.10.5 on GigabitEthernet0/0 from


LOADING to FULL, Loading Done
Notice that when the network for the link from R1 to R2 is 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.

R2(config-router) #network 192.168.10.8 0.0.0.3 area 0

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

R3(config-router)#network 172.16.1.32 0.0.0.7 area 0


R3(config-router)#network 192.168.10.4 0.0.0.3 area 0
03:54:30: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.10.5 on GigabitEthernet0/0 from
LOADING to FULL, Loading Done
R3(config-router)#network 192.168.10.8 0.0.0.3 area 0
R3(config-router)#
03:55:04: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.10.9 on GigabitEthernet0/1 from
LOADING to FULL, Loading Done

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.

Task: Configure OSPF Router IDs


The OSPF router ID is used to uniquely identify the router in the OSPF routing domain. A router
ID is an IP address. Cisco routers derive the Router ID in one of three ways and with the
following precedence:

1. IP address configured with the OSPF router-id command.


2. Highest IP address of any of the router’s loopback addresses.
3. Highest active IP address on any of the router’s physical interfaces.

Step 1: Examine the current router IDs in the topology.

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

Routing Protocol is "ospf 1"


Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 192.168.10.10
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
172.16.1.32 0.0.0.7 area 0
192.168.10.4 0.0.0.3 area 0
192.168.10.8 0.0.0.3 area 0
Routing Information Sources:
Gateway Distance Last Update
192.168.10.5 110 00:02:31
192.168.10.9 110 00:01:57
192.168.10.10 110 00:01:57
Distance: (default is 110)

R3# show ip ospf

Routing Process "ospf 1" with ID 192.168.10.10


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 4 times
Area ranges are
Number of LSA 6. Checksum Sum 0x03aea8
Number of opaque link LSA 0. Checksum Sum 0x000000
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
R3#show ip ospf interface

GigabitEthernet0/2 is up, line protocol is up


Internet address is 172.16.1.33/29, Area 0
Process ID 1, Router ID 192.168.10.10, Network Type BROADCAST,
Cost: 1
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 192.168.10.10, Interface address
172.16.1.33
No backup designated router on this network
Timer intervals configured, Hello 10, Dead 40, Wait 40,
Retransmit 5
Hello due in 00:00:07
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 0, Adjacent neighbor count is 0
Suppress hello for 0 neighbor(s)
GigabitEthernet0/0 is up, line protocol is up
Internet address is 192.168.10.6/30, Area 0
Process ID 1, Router ID 192.168.10.10, Network Type BROADCAST,
Cost: 1
Transmit Delay is 1 sec, State BDR, Priority 1
Designated Router (ID) 192.168.10.5, Interface address
192.168.10.5
Backup Designated Router (ID) 192.168.10.10, Interface address
192.168.10.6
Timer intervals configured, Hello 10, Dead 40, Wait 40,
Retransmit 5
Hello due in 00:00:00
Index 2/2, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 192.168.10.5 (Designated Router)
Suppress hello for 0 neighbor(s)
Step 2: Use the router-id command to change the router ID on the R1 router.

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

R1# clear ip ospf process


Reset ALL OSPF processes? [no]:yes

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

Neighbor ID Pri State Dead Time Address Interface


192.168.10.9 1 FULL/DR 00:00:37 192.168.10.2 GigabitEthernet0/0
192.168.10.10 1 FULL/DR 00:00:34 192.168.10.6 GigabitEthernet0/1
Step 4: Verify OSPF neighbors and routing information.
a. Issue the show ip ospf neighbor command to verify that each router lists the other routers in the
network as neighbors.

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.

R1# show ip route


Codes: L - local, C - connected, S - static, R - RIP, M -
mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS
inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 1 subnets
O 10.10.10.0/24 [110/2] via 192.168.10.2, 00:05:42,
GigabitEthernet0/0
172.16.0.0/16 is variably subnetted, 3 subnets, 3 masks
C 172.16.1.16/28 is directly connected, GigabitEthernet0/2
L 172.16.1.17/32 is directly connected, GigabitEthernet0/2
O 172.16.1.32/29 [110/2] via 192.168.10.6, 00:23:14,
GigabitEthernet0/1
192.168.10.0/24 is variably subnetted, 5 subnets, 2 masks
C 192.168.10.0/30 is directly connected, GigabitEthernet0/0
L 192.168.10.1/32 is directly connected, GigabitEthernet0/0
C 192.168.10.4/30 is directly connected, GigabitEthernet0/1
L 192.168.10.5/32 is directly connected, GigabitEthernet0/1
O 192.168.10.8/30 [110/2] via 192.168.10.2, 00:05:42,
GigabitEthernet0/0
[110/2] via 192.168.10.6, 00:05:42, GigabitEthernet0/1
Step 5: Verify OSPF protocol

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.

R1# show ip protocols


Routing Protocol is "ospf 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 11.11.11.11
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
172.16.1.16 0.0.0.15 area 0
192.168.10.0 0.0.0.3 area 0
192.168.10.4 0.0.0.3 area 0
Routing Information Sources:
Gateway Distance Last Update
11.11.11.11 110 00:07:30
192.168.10.5 110 00:24:49
192.168.10.9 110 00:07:30
192.168.10.10 110 00:07:32
Distance: (default is 110)

Step 6: Verify OSPF process information


Use the show ip ospf command to examine the OSPF process ID and router ID. This command
displays the OSPF area information, as well as the last time the SPF algorithm was calculated.

R1# 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 9 times
Area ranges are
Number of LSA 7. Checksum Sum 0x0350d9
Number of opaque link LSA 0. Checksum Sum 0x000000

Step 7: Verify OSPF interface settings.

Issue the show ip ospf interface brief command to display a summary of OSPF-enabled interfaces.

R1# show ip ospf interface brief


Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 192.168.10.1 YES manual up up
GigabitEthernet0/1 192.168.10.5 YES manual up up
GigabitEthernet0/2 172.16.1.17 YES manual up up

Step 8: Verify end-to-end connectivity.

Each PC should be able to ping the other PCs in the topology. Verify and troubleshoot if necessary.

Note: It may be necessary to disable the PC firewall to ping between PCs.

Step 9: Configure OSPF Cost


Use the show ip route command on the R1 router to view the OSPF cost to reach the 10.10.10.0/24
network.
R1#show ip route
10.0.0.0/24 is subnetted, 1 subnets
O 10.10.10.0/24 [110/2] via 192.168.10.2, 00:16:32,
GigabitEthernet0/0
172.16.0.0/16 is variably subnetted, 3 subnets, 3 masks
C 172.16.1.16/28 is directly connected, GigabitEthernet0/2
L 172.16.1.17/32 is directly connected, GigabitEthernet0/2
O 172.16.1.32/29 [110/2] via 192.168.10.6, 00:34:04,
GigabitEthernet0/1
192.168.10.0/24 is variably subnetted, 5 subnets, 2 masks
C 192.168.10.0/30 is directly connected, GigabitEthernet0/0
L 192.168.10.1/32 is directly connected, GigabitEthernet0/0
C 192.168.10.4/30 is directly connected, GigabitEthernet0/1
L 192.168.10.5/32 is directly connected, GigabitEthernet0/1
O 192.168.10.8/30 [110/2] via 192.168.10.2, 00:16:32,
GigabitEthernet0/0
[110/2] via 192.168.10.6, 00:16:32, GigabitEthernet0/1

You might also like