Lab 11.6.
1: Basic OSPF Configuration Lab
Scenario : Basic OSPF Configuration
Topology Diagram
Note : Use 1841 Router and 2960 Switch
Addressing Table
Default
Device Interface IP Address Subnet Mask
Gateway
Fa0/0 172.16.1.17 255.255.255.240 N/A
R1 S0/0/0 192.168.10.1 255.255.255.252 N/A
S0/0/1 192.168.10.5 255.255.255.252 N/A
Fa0/0 10.10.10.1 255.255.255.0 N/A
R2 S0/0/0 192.168.10.2 255.255.255.252 N/A
S0/0/1 192.168.10.9 255.255.255.252 N/A
Fa0/0 172.16.1.33 255.255.255.248 N/A
R3 S0/0/0 192.168.10.6 255.255.255.252 N/A
S0/0/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
1
CCNA Exploration
Routing Protocols and Concepts: OSPF Lab 11.6.1: Basic OSPF Configuration Lab
Task 1: Prepare the Network.
Step 1: Cable a network that is similar to the one in the Topology Diagram.
You can use any current router in your lab as long as it has the required interfaces shown in the
topology.
To connect serial cable : Firstly, turn off the router and add WIC-2T module and turn on the
router again as shown below.
Note: If you use 1700, 2500, or 2600 routers, the router outputs and interface descriptions will
appear different.
Step 2: Clear any existing configurations on the routers.
2|Page
CCNA Exploration
Routing Protocols and Concepts: OSPF Lab 11.6.1: Basic OSPF Configuration Lab
Task 2: Perform Basic Router Configurations.
Perform basic configuration of the R1, R2, and R3 routers according to the above table:
Task 3: Configure and Activate Serial and Ethernet Addresses.
Step 1: Configure interfaces on R1, R2, and R3.
Configure the interfaces on the R1, R2, and R3 routers with the IP addresses from the table
under the Topology Diagram.
Router(config)#hostname R1
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip address 172.16.1.17 255.255.255.240
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface serial 0/0/0
R1(config-if)#ip address 192.168.10.1 255.255.255.252
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface serial 0/0/1
R1(config-if)#ip address 192.168.10.5 255.255.255.252
R1(config-if)#no shutdown
R1(config-if)#exit
Note : This is configuration done for only R1. Please do the similar configuration on R2 and R3.
Please refer to the above table for IP Address details.
Step 2: Verify IP addressing and interfaces.
Use the show ip interface brief command to verify that the IP addressing is correct and
that the interfaces are active.
When you have finished, be sure to save the running configuration to the NVRAM of the router.
Step 3: Configure Ethernet interfaces of PC1, PC2, and PC3.
Configure the Ethernet interfaces of PC1, PC2, and PC3 with the IP addresses and default
gateways from the table under the Topology Diagram.
Configuration on PC1 :
3|Page
CCNA Exploration
Routing Protocols and Concepts: OSPF Lab 11.6.1: Basic OSPF Configuration Lab
Step 4: Test the PC configuration by pinging the default gateway from the PC.
Task 4: Configure OSPF on the R1 Router
Step 1: Use the router ospf command in global configuration mode to enable OSPF on the
R1 router. Enter a process ID of 1 for the process-ID parameter.
R1(config)#router ospf 1
R1(config-router)#
Step 2: Configure the network statement for the LAN network.
Once you are in the Router OSPF configuration sub-mode, 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
R1(config-router)#
Step 3: Configure the router to advertise the 192.168.10.0/30 network attached to the
Serial0/0/0 interface.
4|Page
CCNA Exploration
Routing Protocols and Concepts: OSPF Lab 11.6.1: Basic OSPF Configuration Lab
R1(config-router)#network 192.168.10.0 0.0.0.3 area 0
R1(config-router)#
Step 4: Configure the router to advertise the 192.168.10.4/30 network attached to the
Serial0/0/1 interface.
R1(config-router)#network 192.168.10.4 0.0.0.3 area 0
R1(config-router)#
Step 5: When you are finished with the OSPF configuration for R1, return to privileged
EXEC mode.
R1(config-router)#end
%SYS-5-CONFIG_I: Configured from console by console R1#
Task 5: Configure OSPF on the R2 and R3 Routers
Step 1: 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)#
Step 2: Configure the router to advertise the LAN network 10.10.10.0/24 in the OSPF
updates.
R2(config-router)#network 10.10.10.0 0.0.0.255 area 0
R2(config-router)#
Step 3: Configure the router to advertise the 192.168.10.0/30 network attached to the
Serial0/0/0 interface.
R2(config-router)#network 192.168.10.0 0.0.0.3 area 0
R2(config-router)#
00:07:27: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.10.5 on Serial0/0/0
from EXCHANGE to FULL, Exchange Done
Notice that when the network for the serial 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.
Step 4: Configure the router to advertise the 192.168.10.8/30 network attached to the
Serial0/0/1 interface.
When you are finished, return to privileged EXEC mode.
R2(config-router)#network 192.168.10.8 0.0.0.3 area 0
R2(config-router)#end
%SYS-5-CONFIG_I: Configured from console by console
R2#
5|Page
CCNA Exploration
Routing Protocols and Concepts: OSPF Lab 11.6.1: Basic OSPF Configuration Lab
Step 5: 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
R3(config-router)#
00:17:46: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.10.5 on Serial0/0/0
from LOADING to FULL, Loading Done
R3(config-router)#network 192.168.10.8 0.0.0.3 area 0
R3(config-router)#
00:18:01: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.10.9 on Serial0/0/1
from EXCHANGE to FULL, Exchange Done
R3(config-router)#end
%SYS-5-CONFIG_I: Configured from console by console
R3#
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 6: 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
6|Page
CCNA Exploration
Routing Protocols and Concepts: OSPF Lab 11.6.1: Basic OSPF Configuration Lab
<output omitted>
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
<output omitted>
R3#show ip ospf interface
FastEthernet0/0 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:00
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)
<output omitted>
R3#
Step 2: Use loopback addresses to change the router IDs of the routers in the topology.
R1(config)#interface loopback 0
R1(config-if)#ip address 10.1.1.1 255.255.255.255
R2(config)#interface loopback 0
R2(config-if)#ip address 10.2.2.2 255.255.255.255
R3(config)#interface loopback 0
R3(config-if)#ip address 10.3.3.3 255.255.255.255
Step 3: Reload the routers to force the new Router IDs to be
used.
When a new Router ID is configured, it will not be used until the OSPF process is restarted. Make
sure that the current configuration is saved to NRAM, and then use the reload command to
restart each of the routers..
When the router is reloaded, what is the router ID for R1? ____________________
When the router is reloaded, what is the router ID for R2? ____________________
7|Page
CCNA Exploration
Routing Protocols and Concepts: OSPF Lab 11.6.1: Basic OSPF Configuration Lab
When the router is reloaded, what is the router ID for R3? ____________________
Step 4: Use the show ip ospf neighbors command to verify that the router IDs have
changed.
R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address
Interface
10.3.3.3 0 FULL/ - 00:00:30 192.168.10.6
Serial0/0/1
10.2.2.2 0 FULL/ - 00:00:33 192.168.10.2
Serial0/0/0
R2#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address
Interface
10.3.3.3 0 FULL/ - 00:00:36 192.168.10.10
Serial0/0/1
10.1.1.1 0 FULL/ - 00:00:37 192.168.10.1
Serial0/0/0
R3#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address
Interface
10.2.2.2 0 FULL/ - 00:00:34 192.168.10.9
Serial0/0/1
10.1.1.1 0 FULL/ - 00:00:38 192.168.10.5
Serial0/0/0
Step 5: 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 Task 7.
R1(config)#router ospf 1
R1(config-router)#router-id 10.4.4.4
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#(config-router)#end
R1#clear ip ospf process
Reset ALL OSPF processes? [no]:yes
R1#
8|Page
CCNA Exploration
Routing Protocols and Concepts: OSPF Lab 11.6.1: Basic OSPF Configuration Lab
Step 6: Use the show ip ospf neighbor command on router R2 to verify that the router
ID of R1 has been changed.
R2#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address
Interface
10.3.3.3 0 FULL/ - 00:00:36 192.168.10.10
Serial0/0/1
10.4.4.4 0 FULL/ - 00:00:37 192.168.10.1
Serial0/0/0
Step 7: Remove the configured router ID with the no form of the router-id command.
R1(config)#router ospf 1
R1(config-router)#no router-id 10.4.4.4
Reload or use “clear ip ospf process” command, for this to take effect
Step 8: Restart the OSPF process using the clear ip ospf process command.
Restarting the OSPF process forces the router to use the IP address configured on the Loopback
0 interface as the Router ID.
R1(config-router)#end
R1#clear ip ospf process
Reset ALL OSPF processes? [no]:yes R1#
Task 7: Verify OSPF Operation
Step 1: On the R1 router, Use the show ip ospf neighbor command to view the
information about the OSPF neighbor routers R2 and R3. You should be able to see the
neighbor ID and IP address of each adjacent router, and the interface that R1 uses to reach that
OSPF neighbor.
R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address
Interface
10.2.2.2 0 FULL/- 00:00:32 192.168.10.2
Serial0/0/0 0 FULL/- 00:00:32 192.168.10.6
10.3.3.3
R1#
Serial0/0/1
Step 2: On the R1 router, use the show ip protocols command to view
information about the routing protocol operation.
Notice that the information that was configured in the previous Tasks, such as protocol, process
ID, neighbor ID, and networks, is shown in the output. The IP addresses of the adjacent
neighbors are also shown.
R1#show ip protocols
9|Page
CCNA Exploration
Routing Protocols and Concepts: OSPF Lab 11.6.1: Basic OSPF Configuration Lab
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 10.1.1.1
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
10.2.2.2 110 00:11:43
10.3.3.3 110 00:11:43
Distance: (default is 110)
R1#
Notice that the output specifies the process ID used by OSPF. Remember, the process ID must
be the same on all routers for OSPF to establish neighbor adjacencies and share routing
information.
Task8: Examine OSPF Routes in the Routing Tables
View the routing table on the R1 router. OSPF routes are denoted in the routing table with an “O”.
R1#show ip route
Codes: C - connected, S - static, I - IGRP, 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 end
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.1.1.1/32 is directly connected, Loopback0
O 10.10.10.0/24 [110/65] via 192.168.10.2, 00:01:02, Serial0/0/0
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.16.1.16/28 is directly connected, FastEthernet0/0
O 172.16.1.32/29 [110/65] via 192.168.10.6, 00:01:12, Serial0/0/1
192.168.10.0/30 is subnetted, 3 subnets
C 192.168.10.0 is directly connected, Serial0/0/0
C 192.168.10.4 is directly connected, Serial0/0/1
O 192.168.10.8 [110/128] via 192.168.10.6, 00:01:12, Serial0/0/1
[110/128] via 192.168.10.2, 00:01:02, Serial0/0/0
10 | P a g e
CCNA Exploration
Routing Protocols and Concepts: OSPF Lab 11.6.1: Basic OSPF Configuration Lab
Task9: Connectivity Verification
1. Ping PC2 and PC3 from PC1
2. Ping PC1 and PC3 from PC2
Following is the screenshot of verification done from PC1.
11 | P a g e