5.1.5.8 Lab - Configuring OSPFv2 Advanced Features
5.1.5.8 Lab - Configuring OSPFv2 Advanced Features
5.1.5.8 Lab - Configuring OSPFv2 Advanced Features
Topology
Addressing Table
Device
R1
Interface
IP Address
Subnet Mask
Default Gateway
G0/0
192.168.1.1
255.255.255.0
N/A
S0/0/0 (DCE)
192.168.12.1
255.255.255.252
N/A
S0/0/1
192.168.13.1
255.255.255.252
N/A
Lo0
209.165.200.225
255.255.255.252
N/A
S0/0/0
192.168.12.2
255.255.255.252
N/A
S0/0/1 (DCE)
192.168.23.1
255.255.255.252
N/A
G0/0
192.168.3.1
255.255.255.0
N/A
S0/0/0 (DCE)
192.168.13.2
255.255.255.252
N/A
S0/0/1
192.168.23.2
255.255.255.252
N/A
PC-A
NIC
192.168.1.3
255.255.255.0
192.168.1.1
PC-C
NIC
192.168.3.3
255.255.255.0
192.168.3.1
R2
R3
Objectives
Part 1: Build the Network and Configure Basic Device Settings
Part 2: Configure and Verify OSPF Routing
Part 3: Change OSPF Metrics
Part 4: Configure and Propagate a Static Default Route
Part 5: Configure OSPF Authentication
2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 1 of 9
Background / Scenario
Open Shortest Path First (OSPF) has advanced features to allow changes to be made to control metrics,
default route propagation, and security.
In this lab, you will adjust OSPF metrics on the router interfaces, configure OSPF route propagation, and use
Message Digest 5 (MD5) authentication to secure OSPF routing information.
Note: The routers used with CCNA hands-on labs are Cisco 1941 Integrated Services Routers (ISRs) with
Cisco IOS Release 15.2(4)M3 (universalk9 image). Other routers and Cisco IOS versions can be used.
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.
Note: Make sure that the routers have been erased and have no startup configurations. If you are unsure,
contact your instructor.
Required Resources
3 Routers (Cisco 1941 with Cisco IOS Release 15.2(4)M3 universal image or comparable)
2 PCs (Windows 7, Vista, or XP with terminal emulation program, such as Tera Term)
Console cables to configure the Cisco IOS devices via the console ports
Set the clock rate for all DCE serial interfaces at 128000.
j.
2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 2 of 9
PID
1
1
1
Area
0
0
0
IP Address/Mask
192.168.13.1/30
192.168.12.1/30
192.168.1.1/24
Cost
64
64
1
State
P2P
P2P
DR
Nbrs F/C
1/1
1/1
0/0
2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 3 of 9
Issue the show ip ospf interface brief command to view the new cost settings.
R1# show ip ospf interface brief
Interface
Se0/0/1
Se0/0/0
Gi0/0
PID
1
1
1
Area
0
0
0
IP Address/Mask
192.168.13.1/30
192.168.12.1/30
192.168.1.1/24
Cost
781
781
1
State
P2P
P2P
DR
Nbrs F/C
1/1
1/1
0/0
PID
1
1
1
Area
0
0
0
IP Address/Mask
192.168.13.1/30
192.168.12.1/30
192.168.1.1/24
Cost
7812
7812
1
State
P2P
P2P
DR
Nbrs F/C
0/0
0/0
0/0
Note: If the router had Fast Ethernet interfaces instead of Gigabit Ethernet interfaces, then the cost would
now be 10 on those interfaces.
b. Apply the ip ospf cost 16000 command to the S0/0/1 interface on R1. A cost of 16,000 is higher than the
accumulated cost of the route through R2 which is 15,624.
2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 4 of 9
Issue the show ip ospf interface brief command on R1 to view the cost change to S0/0/1.
R1# show ip ospf interface brief
Interface
Se0/0/1
Se0/0/0
Gi0/0
PID
1
1
1
Area
0
0
0
IP Address/Mask
192.168.13.1/30
192.168.12.1/30
192.168.1.1/24
Cost
16000
7812
1
State
P2P
P2P
DR
Nbrs F/C
1/1
1/1
0/0
d. Re-issue the show ip route ospf command on R1 to display the effect this change has made on the
routing table. All OSPF routes for R1 are now being routed through R2.
R1# show ip route ospf
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
i - IS-IS, su - IS-IS summary, 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, H - NHRP, l - LISP
+ - replicated route, % - next hop override
Gateway of last resort is not set
O
O
Explain why the route to the 192.168.3.0/24 network on R1 is now going through R2?
OSPF will choose the route with the least accumulated cost. The route with the lowest accumulated cost is:
R1-S0/0/0 + R2-S0/0/1 + R3-G0/0, or 781 + 781 + 1 = 1,563. This metric is smaller than the accumulated
cost of R1-S0/0/1 + R3-G0/0, or 1565 + 1 = 1,566
2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 5 of 9
b. Issue the show ip route command on R1 to verify the propagation of the static route from R2.
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
i - IS-IS, su - IS-IS summary, 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, H - NHRP, l - LISP
+ - replicated route, % - next hop override
Gateway of last resort is 192.168.12.2 to network 0.0.0.0
O*E2
C
L
O
C
L
C
L
O
c.
Verify end-to-end connectivity by issuing a ping from PC-A to the ISP interface address 209.165.200.225.
Were the pings successful? yes
2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 6 of 9
d. Issue the u all command, which is the shortest version of the undebug all command on R2 to disable
debugging.
e. Configure OSPF authentication on R2, interface S0/0/0. Use the same MD5 password you entered for
R1.
f.
Issue a show ip ospf interface s0/0/0 command on R2. This command displays the type of
authentication at the bottom of the output.
R2# show ip ospf interface s0/0/0
Serial0/0/0 is up, line protocol is up
Internet Address 192.168.12.2/30, Area 0, Attached via Network Statement
Process ID 1, Router ID 2.2.2.2, Network Type POINT_TO_POINT, Cost: 7812
Topology-MTID
Cost
Disabled
Shutdown
Topology Name
0
7812
no
no
Base
Transmit Delay is 1 sec, State POINT_TO_POINT
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:03
Supports Link-local Signaling (LLS)
Cisco NSF helper support enabled
IETF NSF helper support enabled
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 1, Adjacent neighbor count is 1
Adjacent with neighbor 1.1.1.1
Suppress hello for 0 neighbor(s)
Message digest authentication enabled
Youngest key id is 1
2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 7 of 9
Issue the show ip ospf neighbor command on R3. R1 no longer has an adjacency with R3.
R3# show ip ospf neighbor
Neighbor ID
2.2.2.2
Pri
State
FULL/ -
Dead Time
Address
00:00:31
192.168.23.1
Interface
Serial0/0/1
d. Set up area authentication on R3 and assign the same MD5 password to interface S0/0/0.
R3(config)# router ospf 1
R3(config-router)# area 0 authentication message-digest
R3(config-router)# interface s0/0/0
R3(config-if)# ip ospf message-digest-key 1 md5 MD5KEY
e. Issue the show ip ospf neighbor command on R3. Notice that R1 is now showing as a neighbor, but R2
is missing.
R3# show ip ospf neighbor
Neighbor ID
1.1.1.1
Pri
State
FULL/ -
Dead Time
Address
00:00:38
192.168.13.1
Interface
Serial0/0/0
g. Assign MD5KEY as the MD5 password for the link between R2 and R3.
h. Issue the show ip ospf neighbor command on all routers to verify that all adjacencies have been reestablished.
R1# show ip ospf neighbor
Neighbor ID
3.3.3.3
2.2.2.2
Pri
0
0
State
FULL/
FULL/
Dead Time
00:00:39
00:00:35
Address
192.168.13.2
192.168.12.2
Interface
Serial0/0/1
Serial0/0/0
Dead Time
00:00:36
00:00:32
Address
192.168.23.2
192.168.12.1
Interface
Serial0/0/1
Serial0/0/0
Pri
0
0
State
FULL/
FULL/
2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 8 of 9
Pri
0
0
State
FULL/
FULL/
Dead Time
00:00:33
00:00:39
Address
192.168.23.1
192.168.13.1
Interface
Serial0/0/1
Serial0/0/0
Reflection
1. What is the easiest and preferred method of manipulating OSPF route costs?
2. What does the default-information originate command do for a network using the OSPF routing protocol?
it is used to inject a default route into an OSPF area which will propagate the default route to other OSPF
routers
3. Why is it a good idea to use OSPF authentication?
it's necessary to prevent malicious or incorrect routing information form being introduced by hackers into the
routing table
Ethernet Interface #1
Ethernet Interface #2
Serial Interface #1
Serial Interface #2
1800
1900
2801
2811
2900
Note: To find out how the router is configured, look at the interfaces to identify the type of router and how many
interfaces the router has. There is no way to effectively list all the combinations of configurations for each router
class. This table includes identifiers for the possible combinations of Ethernet and Serial interfaces in the device.
The table does not include any other type of interface, even though a specific router may contain one. An
example of this might be an ISDN BRI interface. The string in parenthesis is the legal abbreviation that can be
used in Cisco IOS commands to represent the interface.
2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 9 of 9