Lab 2. OSPF Configuration Lab: M C Tiêu (Learning Objectives)
Lab 2. OSPF Configuration Lab: M C Tiêu (Learning Objectives)
Lab 2. OSPF Configuration Lab: M C Tiêu (Learning Objectives)
Topology Diagram
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
Page 1 of 5
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
Kết nối mạng như mô hình trên (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.
Note: If you use 1700, 2500, or 2600 routers, the router outputs and interface descriptions will
appear different.
Bước 3: Cấu hình địa chỉ cho 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.
Bước 4: Kiểm tra cấu hình PC : Test the PC configuration by pinging the default gateway
from the PC.
R1(config)#router ospf 1
R1(config-router)#
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.
. Page 2 of 5
R1(config-router)#network 172.16.1.16 0.0.0.15 area 0
R1(config-router)#
Bước 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#
Bước 1: Enable OSPF routing on the R2 router using the router ospf command.
Use a process ID of 1.
R2(config)#router ospf 1
Bước 2: Configure the router to advertise the LAN network 10.10.10.0/24 in the
OSPF updates.
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.
Bước 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.
Bước 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.
. Page 3 of 5
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)#network 192.168.10.8 0.0.0.3 area 0
R3(config-router)#end
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.
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
<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>
. Page 4 of 5
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>
Bước 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? ____________________
When the router is reloaded, what is the router ID for R3? ____________________
Bước 4: Use the show ip ospf neighbors command to verify that the router IDs have
changed.
. Page 5 of 5