EN Manual
User Manual:
Open the PDF directly: View PDF
.
Page Count: 246
CCNPv6 ROUTE
Chapter 3 Lab 3-1, Single-Area OSPF Link Costs and Interface
Priorities Instructor Version
Topology
Objectives
•
Configure single-area OSPF on a router.
•
Advertise loopback interfaces into OSPF.
•
Verify OSPF adjacencies.
•
Verify OSPF routing information exchange.
•
Modify OSPF link costs.
•
Change interface priorities.
•
Utilize debugging commands for troubleshooting OSPF.
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 1 of 17
CCNPv6 ROUTE
Background
You are responsible for configuring the new network to connect your company’s engineering, marketing, and
accounting departments, represented by the loopback interfaces on each of the three routers. The physical
devices have just been installed and connected by Fast Ethernet and serial cables. Configure OSPF to allow
full connectivity between all departments.
Note: This lab uses Cisco 1841 routers with Cisco IOS Release 12.4(24)T1 and the Advanced IP Services
image c1841-advipservicesk9-mz.124-24.T1.bin. The switch is a Cisco WS-C2960-24TT-L with the Cisco IOS
image c2960-lanbasek9-mz.122-46.SE.bin. You can use other routers (such as a 2801 or 2811), switches
(such as a 2950), and Cisco IOS Software versions if they have comparable capabilities and features.
Depending on the router or switch model and Cisco IOS Software version, the commands available and
output produced might vary from what is shown in this lab.
Required Resources
•
3 routers (Cisco 1841 with Cisco IOS Release 12.4(24)T1 Advanced IP Services or comparable)
•
1 switch (Cisco 2960 with the Cisco IOS Release 12.2(46)SE C2960-LANBASEK9-M image or
comparable)
•
Serial and Ethernet cables
Step 1: Configure addressing and loopbacks.
a. Using the addressing scheme in the diagram, apply IP addresses to the Fast Ethernet interfaces on R1,
R2, and R3. Create Loopback1 on R1, Loopback2 on R2, and Loopback3 on R3, and address them
according to the diagram.
Note: Depending on the router models you have, you might need to add clock rates to the DCE end of
each connection (newer equipment adds this automatically). Verify connectivity across each serial link.
R1# configure terminal
R1(config)# interface Loopback1
R1(config-if)# description Engineering Department
R1(config-if)# ip address 10.1.1.1 255.255.255.0
R1(config-if)# exit
R1(config)# interface FastEthernet0/0
R1(config-if)# ip address 10.1.200.1 255.255.255.0
R1(config-if)# no shutdown
R2# configure terminal
R2(config)# interface Loopback2
R2(config-if)# description Marketing Department
R2(config-if)# ip address 10.1.2.1 255.255.255.0
R2(config-if)# exit
R2(config)# interface FastEthernet0/0
R2(config-if)# ip address 10.1.200.2 255.255.255.0
R2(config-if)# no shutdown
R3# configure terminal
R3(config)# interface Loopback3
R3(config-if)# description Accounting Department
R3(config-if)# ip address 10.1.3.1 255.255.255.0
R3(config-if)# exit
R3(config)# interface FastEthernet0/0
R3(config-if)# ip address 10.1.200.3 255.255.255.0
R3(config-if)# no shutdown
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 2 of 17
CCNPv6 ROUTE
Leave the switch in its default (blank) configuration. By default, all switch ports are in VLAN1 and are not
administratively down.
b. Configure the serial interfaces on R1 and R2 with the IP addresses shown in the diagram. Add the
clockrate command where needed.
R1(config)# interface Serial 0/0/0
R1(config-if)# ip address 10.1.100.1 255.255.255.0
R1(config-if)# clockrate 64000
R1(config-if)# bandwidth 64
R1(config-if)# no shutdown
R2(config)# interface Serial 0/0/0
R2(config-if)# ip address 10.1.100.2 255.255.255.0
R2(config-if)# bandwidth 64
R2(config-if)# no shutdown
Note: The bandwidth command on the serial interfaces is used to match the actual bandwidth of the link.
By default, OSPF calculates the cost of links based on the default interface bandwidth which may be
either 128 or 1544 Kb/s, depending on the WIC type. In this case the bandwidth 64 command is used
because the real bandwidth of the serial interfaces is set to 64 Kbps. Refer to Step 5 for information on
modifying OSPF link costs.
c.
Verify that the appropriate interfaces are up and that you can ping across each link.
Step 2: Add physical interfaces to OSPF.
a. Enter the OSPF configuration prompt using the router ospf process_number command. The process
number is a locally significant number that does not affect how OSPF works. For this lab, use process
number 1 on all the routers.
b. Add interfaces with the network address wildcard_mask area area command. The address is an IP
address. The mask is an inverse mask, similar to the kind used in an access list. The area is the OSPF
area to put the interface. For this lab, use area 0, the backbone area, for all interfaces.
This command can be confusing at first. What it means is that any interface with an IP address that
matches the address and wildcard mask combination in the network statement is added to the OSPF
process in that area. The wildcard mask used in the network command has no influence on the actual IP
subnet mask that is advertised with a network on an interface. The network command selects interfaces
to be included into OSPF, but OSPF advertises the real subnet mask of the network attached to that
interface (with the only exception being loopback interfaces).
For example, the command network 10.1.200.1 0.0.0.0 area 0 adds the interface with the IP address of
10.1.200.1 and its network to the OSPF process into area 0. The wildcard mask of 0.0.0.0 means that all
32 bits of the IP address have to be an exact match. A 0 bit in the wildcard mask means that portion of
the interface IP must match the address. A 1 bit means that the bit in the interface IP does not have to
match that portion of the IP address.
The command network 10.1.100.0 0.0.0.255 area 0 means that any interface whose IP address matches
10.1.100.0 for the first 3 octets will match the command and add it to area 0. The last octet is all 1s,
because in the wildcard mask it is 255. This means that an interface with an IP of 10.1.100.1, 10.1.100.2,
or 10.1.100.250 would match this address and wildcard combination and get added to OSPF.
Instead of using wildcard masks in the network command, it is possible to use subnet masks. The router
converts the subnet masks to the wildcard format automatically. An easy way to calculate a wildcard
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 3 of 17
CCNPv6 ROUTE
mask from the subnet mask is to subtract the octet value for each octet from 255. For example, a subnet
mask of 255.255.255.252 (/30) becomes 0.0.0.3 to capture all interfaces on that subnet:
255.255.255.255
– 255.255.255.252
= 0. 0. 0. 3
Note: Another option for adding individual directly connected networks into the OSPF process is to use
the ip ospf process-id area area-id interface command that is available with Cisco IOS version 12.3(11)T
and later.
c.
Enter the commands on R1. Exit to privileged EXEC mode and type debug ip ospf adj. The debug
command lets you watch OSPF neighbors come up and see neighbor relationships.
R1(config)# router
R1(config-router)#
R1(config-router)#
R1(config-router)#
R1#
ospf 1
network 10.1.100.0 0.0.0.255 area 0
network 10.1.200.0 0.0.0.255 area 0
end
R1# debug ip ospf adj
OSPF adjacency events debugging is on
d. Add network statements to the other two routers.
R2(config)# router ospf 1
R2(config-router)# network 10.1.100.0 0.0.0.255 area 0
R2(config-router)# network 10.1.200.0 0.0.0.255 area 0
R3(config)# router ospf 1
R3(config-router)# network 10.1.200.0 0.0.0.255 area 0
e. Observe the debug output on R1. When you are finished, turn off debugging on R1 with the undebug all
command.
f.
What is the advantage of adding networks with a wildcard mask instead of using classful network
addresses?
_______________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________
Using wildcard masks to add network addresses provides more control in determining which interfaces
participate in the OSPF process.
In OSPF, interfaces can be assigned to different areas. Many times, a router is routing inside of a major
network, but different interfaces belong to different areas. You need the level of control given by wildcard
masks to assign different interfaces to their appropriate areas and not restrict an entire major network to
be in one area. There might be networks connected to a router that the administrator does not want to
advertise but which are in the same major network as the OSPF-enabled interface. Without using
wildcard masks, it would be practically impossible to implement this.
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 4 of 17
CCNPv6 ROUTE
Step 3: Use OSPF show commands.
a. The show ip protocols command displays basic high-level routing protocol information. The output lists
each OSPF process, the router ID, and which networks OSPF is routing for in each area. This information
can be useful in debugging routing operations.
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 10.1.1.1
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
10.1.100.0 0.0.0.255 area 0
10.1.200.1 0.0.0.0 area 0
Reference bandwidth unit is 100 mbps
Routing Information Sources:
Gateway
Distance
Last Update
Distance: (default is 110)
b. The show ip ospf command displays the OSPF process ID and router ID.
R1# show ip ospf
Routing Process "ospf 1" with ID 10.1.1.1
Start time: 00:17:44.612, Time elapsed: 00:10:51.408
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Link-local Signaling (LLS)
Supports area transit capability
Router is not originating router-LSAs with maximum metric
Initial SPF schedule delay 5000 msecs
Minimum hold time between two consecutive SPFs 10000 msecs
Maximum wait time between two consecutive SPFs 10000 msecs
Incremental-SPF disabled
Minimum LSA interval 5 secs
Minimum LSA arrival 1000 msecs
LSA group pacing timer 240 secs
Interface flood pacing timer 33 msecs
Retransmission pacing timer 66 msecs
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
Number of areas transit capable is 0
External flood list length 0
Area BACKBONE(0)
Number of interfaces in this area is 2
Area has no authentication
SPF algorithm last executed 00:03:21.132 ago
SPF algorithm executed 5 times
Area ranges are
Number of LSA 4. Checksum Sum 0x021A30
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
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 5 of 17
CCNPv6 ROUTE
Notice the router ID listed in the output. The R1 ID is 10.1.1.1, even though you have not added this
loopback into the OSPF process. The router chooses the router ID using the highest IP on a loopback
interface when OSPF is configured. If an additional loopback interface with a higher IP address is added
after OSPF is turned on, it does not become the router ID unless the router is reloaded, the OSPF
configuration is removed and reentered, or the OSPF-level command router-id is used to modify the RID
manually and the clear ip ospf process command is subsequently entered. If no loopback interfaces are
present on the router, the router selects the highest available IP address among interfaces that are
activated using the no shutdown command. If no IP addresses are assigned to interfaces, the OSPF
process does not start.
c.
The show ip ospf neighbor command displays important neighbor status, including the adjacency state,
address, router ID, and connected interface.
R1# show ip ospf neighbor
Neighbor ID
10.1.2.1
10.1.3.1
10.1.2.1
Pri
1
1
0
State
FULL/BDR
FULL/DR
FULL/ -
Dead Time
00:00:36
00:00:35
00:00:36
Address
10.1.200.2
10.1.200.3
10.1.100.2
Interface
FastEthernet0/0
FastEthernet0/0
Serial0/0/0
If you need more detail than the standard one-line summaries of neighbors, use the show ip ospf
neighbor detail command. However, generally, the regular command gives you all that you need.
d. The show ip ospf interface interface_type number command shows interface timers and network types.
R1# show ip ospf interface FastEthernet 0/0
FastEthernet0/0 is up, line protocol is up
Internet Address 10.1.200.1/24, Area 0
Process ID 1, Router ID 10.1.1.1, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DROTHER, Priority 1
Designated Router (ID) 10.1.3.1, Interface address 10.1.200.3
Backup Designated router (ID) 10.1.2.1, Interface address 10.1.200.2
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:09
Supports Link-local Signaling (LLS)
Cisco NSF helper support enabled
IETF NSF helper support enabled
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 2, Adjacent neighbor count is 2
Adjacent with neighbor 10.1.3.1 (Designated Router)
Adjacent with neighbor 10.1.2.1
Suppress hello for 0 neighbor(s)
e. A variation of the previous command is the show ip ospf interface brief command, which displays each
interface that is participating in the OSPF process on the router, the area it is in, its IP address, cost,
state, and number of neighbors.
R1# show ip ospf interface brief
Interface
PID
Area
IP Address/Mask
Fa0/0
1
0
10.1.200.1/24
Se0/0/0
1
0
10.1.100.1/24
f.
Cost
1
1
State
DROTH
P2P
Nbrs F/C
2/2
1/1
The show ip ospf database command displays the various LSAs in the OSPF database, organized by
area and type.
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 6 of 17
CCNPv6 ROUTE
R1# show ip ospf database
OSPF Router with ID (10.1.1.1) (Process ID 1)
Router Link States (Area 0)
Link ID
10.1.1.1
10.1.2.1
10.1.3.1
ADV Router
10.1.1.1
10.1.2.1
10.1.3.1
Age
1782
1783
1720
Seq#
0x80000002
0x80000001
0x80000002
Checksum
0x001AC7
0x001DC2
0x00F077
Link count
3
3
1
Net Link States (Area 0)
Link ID
10.1.200.1
ADV Router
10.1.1.1
Age
1719
Seq#
Checksum
0x80000002 0x00EC3C
OSPF Router with ID (10.1.1.1) (Process ID 1)
Step 4: Add loopback interfaces to OSPF.
a. All three routers have loopback interfaces, but they are not yet advertised in the routing process. You can
verify this with the show ip route command on the three routers.
R1# show ip route
Codes: 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
Gateway of last resort is not set
C
C
C
10.0.0.0/24 is subnetted, 3 subnets
10.1.1.0 is directly connected, Loopback1
10.1.100.0 is directly connected, Serial0/0/0
10.1.200.0 is directly connected, FastEthernet0/0
R2# show ip route
Codes: 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
Gateway of last resort is not set
C
C
C
10.0.0.0/24 is subnetted, 3 subnets
10.1.2.0 is directly connected, Loopback2
10.1.100.0 is directly connected, Serial0/0/0
10.1.200.0 is directly connected, FastEthernet0/0
R3# show ip route
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 7 of 17
CCNPv6 ROUTE
Codes: 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
Gateway of last resort is not set
C
O
C
10.0.0.0/24 is subnetted, 3 subnets
10.1.3.0 is directly connected, Loopback3
10.1.100.0 [110/65] via 10.1.200.2, 00:06:39, FastEthernet0/0
[110/65] via 10.1.200.1, 00:06:39, FastEthernet0/0
10.1.200.0 is directly connected, FastEthernet0/0
b. For each router, the only loopback address displayed is the locally connected one. Add the loopbacks into
the routing process for each router using the same network command previously used to add the
physical interfaces.
R1(config)# router ospf 1
R1(config-router)# network 10.1.1.0 0.0.0.255 area 0
R2(config)# router ospf 1
R2(config-router)# network 10.1.2.0 0.0.0.255 area 0
R3(config)# router ospf 1
R3(config-router)# network 10.1.3.0 0.0.0.255 area 0
c.
Verify that these networks have been added to the routing table using the show ip route command.
R1# show ip route
Codes: 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
Gateway of last resort is not set
O
O
C
C
C
10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
10.1.2.1/32 [110/2] via 10.1.200.2, 00:00:03, FastEthernet0/0
10.1.3.1/32 [110/2] via 10.1.200.3, 00:00:03, FastEthernet0/0
10.1.1.0/24 is directly connected, Loopback1
10.1.100.0/24 is directly connected, Serial0/0/0
10.1.200.0/24 is directly connected, FastEthernet0/0
Now you can see the loopbacks of the other routers, but their subnet mask is incorrect, because the
default network type on loopback interfaces advertises them as /32 (host) routes. As you can see in the
output of the show ip ospf interface Lo1 command, the default OSPF network type for a loopback
interface is LOOPBACK, causing the OSPF to advertise host routes instead of actual network masks.
R1# show ip ospf interface Lo1
Loopback1 is up, line protocol is up
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 8 of 17
CCNPv6 ROUTE
Internet Address 10.1.1.1/24, Area 0
Process ID 1, Router ID 10.1.1.1, Network Type LOOPBACK, Cost: 1
Loopback interface is treated as a stub Host
Note: The OSPF network type of LOOPBACK is a Cisco-proprietary extension that is not configurable but that
is present on loopback interfaces by default. In some applications such as MPLS, the possible discrepancy
between the real loopback interface mask and the advertised address/mask can lead to reachability or
functionality issues, and care must be taken to either use /32 mask on loopbacks, or whenever a different
mask is used, the OSPF network type must be changed to point-to-point.
d. To change this default behavior use the ip ospf network point-to-point command in interface
configuration mode for each loopback. After the routes propagate, you see the correct subnet masks
associated with those loopback interfaces.
R1(config)# interface loopback1
R1(config-if)# ip ospf network point-to-point
R2(config)# interface loopback2
R2(config-if)# ip ospf network point-to-point
R3(config)# interface loopback3
R3(config-if)# ip ospf network point-to-point
R1# show ip route
Codes: 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
Gateway of last resort is not set
O
O
C
C
C
10.0.0.0/24 is subnetted, 5 subnets
10.1.3.0 [110/2] via 10.1.200.3, 00:00:01, FastEthernet0/0
10.1.2.0 [110/2] via 10.1.200.2, 00:00:01, FastEthernet0/0
10.1.1.0 is directly connected, Loopback1
10.1.100.0 is directly connected, Serial0/0/0
10.1.200.0 is directly connected, FastEthernet0/0
e. Use the following Tcl script to verify connectivity to all addresses in the topology.
R1# tclsh
foreach address {
10.1.1.1
10.1.2.1
10.1.3.1
10.1.100.1
10.1.100.2
10.1.200.1
10.1.200.2
10.1.200.3
} {
ping $address }
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 9 of 17
CCNPv6 ROUTE
Step 5: Modify OSPF link costs.
When you use the show ip route command on R1, you see that the most direct route to the R2 loopback is
through its Ethernet connection. Next to this route is a pair in the form [administrative distance / metric ]. The
default administrative distance of OSPF on Cisco routers is 110. The metric depends on the link type. OSPF
always chooses the route with the lowest metric, which is a sum of all link costs.
You can modify a single link cost by using the interface command ip ospf cost cost. Use this command on
both ends of the link. In the following commands, the link cost of the Fast Ethernet connection between the
three routers is changed to a cost of 50. Notice the change in the metrics in the routing table.
R1(config)# interface FastEthernet 0/0
R1(config-if)# ip ospf cost 50
R2(config)# interface FastEthernet 0/0
R2(config-if)# ip ospf cost 50
R3(config)# interface FastEthernet 0/0
R3(config-if)# ip ospf cost 50
R1# show ip route
Codes: 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
Gateway of last resort is not set
O
O
C
C
C
10.0.0.0/24 is subnetted, 5 subnets
10.1.3.0 [110/51] via 10.1.200.3, 00:01:40, FastEthernet0/0
10.1.2.0 [110/51] via 10.1.200.2, 00:01:40, FastEthernet0/0
10.1.1.0 is directly connected, Loopback1
10.1.100.0 is directly connected, Serial0/0/0
10.1.200.0 is directly connected, FastEthernet0/0
For reference, here are some default link costs (taken from Cisco.com):
•
64-kb/s serial link: 1562
•
T1 (1.544-Mb/s serial link): 64
•
E1 (2.048-Mb/s serial link): 48
•
Ethernet: 10
•
Fast Ethernet: 1
•
FDDI: 1
•
X25: 5208
•
ATM: 1
OSPF uses a reference bandwidth of 100 Mb/s for cost calculation. The formula to calculate the cost is the
reference bandwidth divided by the interface bandwidth. For example, in the case of Ethernet, is the cost is
100 Mb/s / 10 Mb/s = 10.
The above link costs do not include Gigabit Ethernet, which is significantly faster than Fast Ethernet, but
would still have a cost of 1 using the default reference bandwidth of 100 Mb/s.
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 10 of 17
CCNPv6 ROUTE
The cost calculation can be adjusted to account for network links that are faster than 100 Mb/s by using the
auto-cost reference-bandwidth command to change the reference bandwidth. For example, to change the
reference bandwidth to 1000 Mb/s (Gigabit Ethernet), use the following commands:
R1(config)# router ospf 1
R1(config-router)# auto-cost reference-bandwidth 1000
% OSPF: Reference bandwidth is changed.
Please ensure reference bandwidth is consistent across all routers.
Note: If the ip ospf cost cost command is used on the interface, as is the case here, it overrides this
formulated cost.
Note: The above example is for reference only and should not be entered on R1.
Step 6: Modify interface priorities to control the DR and BDR election.
If you use the show ip ospf neighbor detail command on any of the routers, you see that for the Ethernet
network, R3 is the DR (designated router) and R2 is the BDR (backup designated router). These designations
are determined by the interface priority for all routers in that network, which you see in the show output.
The default priority is 1. If all the priorities are the same (which happens by default), the DR election is then
based on router IDs. The highest router ID router becomes the DR, and the second highest becomes the
BDR. All other routers become DROTHERs.
Note: If your routers do not have this exact behavior, it might be because of the order in which the routers
came up. Sometimes a router does not leave the DR position unless its interface goes down and another
router takes over. Your routers might not behave exactly like the example.
Use the ip ospf priority number interface command to change the OSPF priorities on R1 and R2 to make R1
the DR and R2 the BDR. After changing the priority on both interfaces, look at the output of the show ip ospf
neighbor detail command. You can also see the change with the show ip ospf neighbor command, but it
requires more interpretation because it comes up with states per neighbor, rather than stating the DR and
BDR on a neighbor adjacency network.
R1(config)# interface FastEthernet 0/0
R1(config-if)# ip ospf priority 10
R2(config)# interface FastEthernet 0/0
R2(config-if)# ip ospf priority 5
R1# show ip ospf neighbor detail
Neighbor 10.1.2.1, interface address 10.1.200.2
In the area 0 via interface FastEthernet0/0
Neighbor priority is 5, State is FULL, 12 state changes
DR is 10.1.200.1 BDR is 10.1.200.2
Options is 0x52
LLS Options is 0x1 (LR)
Dead timer due in 00:00:37
Neighbor is up for 00:01:32
Index 3/3, retransmission queue length 0, number of retransmission 0
First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
Last retransmission scan length is 0, maximum is 0
Last retransmission scan time is 0 msec, maximum is 0 msec
Neighbor 10.1.3.1, interface address 10.1.200.3
In the area 0 via interface FastEthernet0/0
Neighbor priority is 1, State is FULL, 12 state changes
DR is 10.1.200.1 BDR is 10.1.200.2
Options is 0x52
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 11 of 17
CCNPv6 ROUTE
LLS Options is 0x1 (LR)
Dead timer due in 00:00:30
Neighbor is up for 00:01:12
Index 1/1, retransmission queue length 0, number of retransmission 3
First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
Last retransmission scan length is 1, maximum is 1
Last retransmission scan time is 0 msec, maximum is 0 msec
Neighbor 10.1.2.1, interface address 10.1.100.2
In the area 0 via interface Serial0/0/0
Neighbor priority is 0, State is FULL, 12 state changes
DR is 0.0.0.0 BDR is 0.0.0.0
Options is 0x52
LLS Options is 0x1 (LR)
Dead timer due in 00:00:35
Neighbor is up for 00:01:44
Index 2/2, retransmission queue length 0, number of retransmission 2
First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
Last retransmission scan length is 2, maximum is 2
Last retransmission scan time is 0 msec, maximum is 0 msec
Note: To make a router take over as DR, use the clear ip ospf process command on all the routers after
changing the priorities. Another method of demonstrating the election process and priorities is to shutdown
and reactivate all ports on the switch simultaneously. The switch can be configured with spanning-tree
portfast default and all ports can be shutdown and reactivated using the following commands.
interface range fa0/1 - 24
shutdown
no shutdown
What is the purpose of a DR in OSPF?
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
The most important function of the DR is to represent the multi-access segment by generating the Type-2
LSA on behalf of that segment. Without the Type-2 LSA originated by the DR, on a multi-access segment with
n routers, each router would be required to generate its own Type-1 LSA containing n-1 entries (also called
links), one entry for each neighbor, to indicate a full reachability. The link-state database on each router would
then contain n(n-1) links collected from Type-1 LSAs originated by the n routers on this segment.
With the Type-2 LSA representing the multi-access segment itself, each of the n routers attached to the
segment inserts only one entry in their Type-1 LSAs, describing a connection to the multi-access segment
represented by the Type-2 LSA. The DR will, in addition to its own Type-1 LSA, generate a Type-2 LSA
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 12 of 17
CCNPv6 ROUTE
containing n entries, in turn indicating a connection from the multi-access segment to each of its attached
routers. Essentially, the multi-access segment will be described as each router having a link to the segment
and the segment in turn having a link to each router. The link-state database on each router will now contain
only n+1 links which is, for large n, significantly lower than the former count n(n-1).
What is the purpose of a BDR in OSPF?
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
A BDR is a backup designated router. Its purpose is to take over as the DR if the current DR goes down.
When the BDR becomes the DR, a new BDR election is held for the next BDR.
Challenge: Topology Change
OSPF, like many link-state routing protocols, is reasonably fast when it comes to convergence. To test this,
have R3 send a large number of pings to the R1 loopback. By default, the pings take the path from R3 to R1
over Fast Ethernet because it has the lowest total path cost.
a. Check the path from R3 to R1 by performing a traceroute on R3 to the loopback of R1.
R3# traceroute 10.1.1.1
Type escape sequence to abort.
Tracing the route to 10.1.1.1
1 10.1.200.1 0 msec 0 msec *
Note: Read the next substep carefully before trying out the commands on routers.
b. Initiate a ping from R3 to the R1 loopback with a high repeat number using the command ping ip repeat
number command. While this ping is going on, shut down the R1 Fa0/0 interface.
R3# ping 10.1.1.1 repeat 10000
R1(config)# interface FastEthernet 0/0
R1(config-if)# shutdown
Did you notice that some packets were dropped but then the pings started returning again?
_______________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________
Yes. Some pings were dropped because of the time it took for the OSPF adjacency to time out and for
the network topology to reconverge.
How do you think OSPF convergence compares to other routing protocols, such as RIP? What about
EIGRP?
_______________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 13 of 17
CCNPv6 ROUTE
OSPF should perform better than RIP in this situation because it has a shorter dead time compared to the
RIP hold-down time. If you are using the default settings, OSPF might not perform as well as EIGRP,
which has a shorter dead time than OSPF. However, the hello and dead intervals for both protocols can
be adjusted to provide a fair comparison.
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 14 of 17
CCNPv6 ROUTE
Router Interface Summary Table
Router Model
Router Interface Summary
Ethernet Interface
Ethernet Interface
Serial Interface
#1
#2
#1
Serial Interface
#2
1700
Fast Ethernet 0
(FA0)
Fast Ethernet 1
(FA1)
Serial 0 (S0)
Serial 1 (S1)
1800
Fast Ethernet 0/0
(FA0/0)
Fast Ethernet 0/1
(FA0/1)
Serial 0/0/0
(S0/0/0)
Serial 0/0/1
(S0/0/1)
2600
Fast Ethernet 0/0
(FA0/0)
Fast Ethernet 0/1
(FA0/1)
Serial 0/0 (S0/0)
Serial 0/1 (S0/1)
2800
Fast Ethernet 0/0
(FA0/0)
Fast Ethernet 0/1
(FA0/1)
Serial 0/0/0
(S0/0/0)
Serial 0/0/1
(S0/0/1)
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. Rather than list all 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 might contain one. For example, for an ISDN BRI interface, the string in parenthesis
is the legal abbreviation that can be used in Cisco IOS commands to represent the interface.
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 15 of 17
CCNPv6 ROUTE
Device Configurations (Instructor version)
Router R1
hostname R1
!
interface Loopback1
description Engineering Department
ip address 10.1.1.1 255.255.255.0
!
interface FastEthernet0/0
ip address 10.1.200.1 255.255.255.0
ip ospf cost 50
ip ospf priority 10
no shutdown
!
interface Serial0/0/0
ip address 10.1.100.1 255.255.255.0
clock rate 64000
bandwidth 64
no shutdown
!
router ospf 1
network 10.1.1.0 0.0.0.255 area 0
network 10.1.100.0 0.0.0.255 area 0
network 10.1.200.0 0.0.0.255 area 0
!
end
Router R2
hostname R2
!
interface Loopback2
description Marketing Department
ip address 10.1.2.1 255.255.255.0
ip ospf network point-to-point
!
interface FastEthernet0/0
ip address 10.1.200.2 255.255.255.0
ip ospf cost 50
ip ospf priority 5
no shutdown
!
interface Serial0/0/0
ip address 10.1.100.2 255.255.255.0
bandwidth 64
no shutdown
!
router ospf 1
network 10.1.2.0 0.0.0.255 area 0
network 10.1.100.0 0.0.0.255 area 0
network 10.1.200.0 0.0.0.255 area 0
!
end
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 16 of 17
CCNPv6 ROUTE
Router R3
hostname R3
!
interface Loopback3
description Accounting Department
ip address 10.1.3.1 255.255.255.0
ip ospf network point-to-point
!
interface FastEthernet0/0
ip address 10.1.200.3 255.255.255.0
ip ospf cost 50
no shutdown
!
router ospf 1
network 10.1.3.0 0.0.0.255 area 0
network 10.1.200.0 0.0.0.255 area 0
!
end
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 17 of 17
CCNPv6 ROUTE
Chapter 3 Lab 3-2, Multi-Area OSPF with Stub Areas and
Authentication Instructor Version
Topology
Objectives
•
Configure multiple-area OSPF on a router.
•
Verify multiple-area behavior.
•
Configure OSPF stub, totally stubby, and not-so-stubby areas.
•
Configure OSPF authentication.
Background
You are responsible for configuring the new network to connect your company’s engineering, marketing, and
accounting departments, represented by loopback interfaces on each of the three routers. The physical
devices have just been installed and connected by serial cables. Configure multiple-area OSPF to allow full
connectivity between all departments.
R3 also has a loopback representing a connection to another autonomous system that is not part of OSPF.
Note: This lab uses Cisco 1841 routers with Cisco IOS Release 12.4(24)T1 and the Advanced IP Services
image c1841-advipservicesk9-mz.124-24.T1.bin. You can use other routers (such as a 2801 or 2811) and
Cisco IOS Software versions if they have comparable capabilities and features. Depending on the router
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 1 of 18
CCNPv6 ROUTE
model and Cisco IOS Software version, the commands available and output produced might vary from what is
shown in this lab.
Required Resources
•
3 routers (Cisco 1841 with Cisco IOS Release 12.4(24)T1 Advanced IP Services or comparable)
•
Serial and console cables
Step 1: Configure addressing and loopbacks.
a. Using the addressing scheme in the diagram, apply IP addresses to the serial interfaces on R1, R2, and
R3. Create loopbacks on R1, R2, and R3, and address them according to the diagram.
Note: Depending on the router models you have, you might need to add clock rates to the DCE end of
each connection (newer equipment adds this automatically). Verify connectivity across each serial link.
R1# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)# interface loopback 1
R1(config-if)# description Engineering Department
R1(config-if)# ip address 10.1.1.1 255.255.255.0
R1(config-if)# interface serial 0/0/0
R1(config-if)# ip address 10.1.12.1 255.255.255.0
R1(config-if)# clockrate 64000
R1(config-if)# no shutdown
R2# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)# interface loopback 2
R2(config-if)# description Marketing Department
R2(config-if)# ip address 10.1.2.1 255.255.255.0
R2(config-if)# interface serial 0/0/0
R2(config-if)# ip address 10.1.12.2 255.255.255.0
R2(config-if)# no shutdown
R2(config-if)# interface serial 0/0/1
R2(config-if)# ip address 10.1.23.2 255.255.255.0
R2(config-if)# clockrate 64000
R2(config-if)# no shutdown
R3# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)# interface loopback 3
R3(config-if)# description Accounting Department
R3(config-if)# ip address 10.1.3.1 255.255.255.0
R3(config-if)# interface loopback 20
R3(config-if)# description Connection to another AS
R3(config-if)# ip address 172.20.200.1 255.255.255.0
R3(config-if)# interface serial 0/0/1
R3(config-if)# ip address 10.1.23.3 255.255.255.0
R3(config-if)# no shutdown
Step 2: Add interfaces into OSPF.
a. Create OSPF process 1 on routers R1 and R2. Configure the subnet of the serial link between R1 and R2
to be in OSPF area 0 using the network command. Add loopback 1 on R1 and loopback 2 on R2 into
OSPF area 0. Change the network type on the loopback interfaces so that they are advertised with the
correct subnet.
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 2 of 18
CCNPv6 ROUTE
R1(config)# router ospf 1
R1(config-router)# network 10.1.12.0 0.0.0.255 area 0
R1(config-router)# network 10.1.1.0 0.0.0.255 area 0
R1(config-router)# exit
R1(config)# interface loopback 1
R1(config-if)# ip ospf network point-to-point
R2(config)# router ospf 1
R2(config-router)# network 10.1.12.0 0.0.0.255 area 0
R2(config-router)# network 10.1.2.0 0.0.0.255 area 0
R2(config-router)# exit
R2(config)# interface loopback 2
R2(config-if)# ip ospf network point-to-point
Note: Another option for adding individual directly connected networks into the OSPF process is to use
the ip ospf process-id area area-id interface command that is available with Cisco IOS version 12.3(11)T
and later.
b. Verify that both routers have OSPF neighbors using the show ip ospf neighbors command.
R1# show ip ospf neighbor
Neighbor ID
10.1.2.1
Pri
0
State
FULL/
-
Dead Time
00:00:38
Address
10.1.12.2
Interface
Serial0/0/0
-
Dead Time
00:00:35
Address
10.1.12.1
Interface
Serial0/0/0
R2# show ip ospf neighbor
Neighbor ID
10.1.1.1
c.
Pri
0
State
FULL/
Verify that the routers can see each other’s loopback with the show ip route command.
R1# show ip route
Codes: 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
Gateway of last resort is not set
C
O
C
10.0.0.0/24 is subnetted, 3 subnets
10.1.12.0 is directly connected, Serial0/0/0
10.1.2.0 [110/65] via 10.1.12.2, 00:00:10, Serial0/0/0
10.1.1.0 is directly connected, Loopback1
R2# show ip route
Codes: 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
Gateway of last resort is not set
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 3 of 18
CCNPv6 ROUTE
C
C
O
C
10.0.0.0/24 is subnetted, 4 subnets
10.1.12.0 is directly connected, Serial0/0/0
10.1.2.0 is directly connected, Loopback2
10.1.1.0 [110/65] via 10.1.12.1, 00:00:30, Serial0/0/0
10.1.23.0 is directly connected, Serial0/0/1
d. Add the subnet between R2 and R3 into OSPF area 23 using the network command. Add loopback 3 on
R3 into area 23.
R2(config)# router ospf 1
R2(config-router)# network 10.1.23.0 0.0.0.255 area 23
R3(config)# router ospf 1
R3(config-router)# network 10.1.23.0 0.0.0.255 area 23
R3(config-router)# network 10.1.3.0 0.0.0.255 area 23
R3(config-router)# exit
R3(config)# interface loopback 3
R3(config-if)# ip ospf network point-to-point
e. Verify that this neighbor relationship comes up using the show ip ospf neighbors command.
R2# show ip ospf neighbor
Neighbor ID
10.1.1.1
10.1.3.1
f.
Pri
0
0
State
FULL/
FULL/
-
Dead Time
00:00:36
00:00:36
Address
10.1.12.1
10.1.23.3
Interface
Serial0/0/0
Serial0/0/1
If you look at the output of the show ip route command on R1, you see a route to the R3 loopback.
Notice that it is identified as an inter-area route.
R1# show ip route
Codes: 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
Gateway of last resort is not set
C
O IA
O
C
O IA
10.0.0.0/24 is subnetted, 5 subnets
10.1.12.0 is directly connected, Serial0/0/0
10.1.3.0 [110/129] via 10.1.12.2, 00:00:28, Serial0/0/0
10.1.2.0 [110/65] via 10.1.12.2, 00:01:38, Serial0/0/0
10.1.1.0 is directly connected, Loopback1
10.1.23.0 [110/128] via 10.1.12.2, 00:01:38, Serial0/0/0
g. Issue the show ip route command on R2. Notice that R2 has no inter-area routes because R2 is in both
areas. It is an ABR, or area border router.
R2# show ip route
Codes: 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
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 4 of 18
CCNPv6 ROUTE
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
C
O
C
O
C
10.0.0.0/24 is subnetted, 5 subnets
10.1.12.0 is directly connected, Serial0/0/0
10.1.3.0 [110/65] via 10.1.23.3, 00:00:50, Serial0/0/1
10.1.2.0 is directly connected, Loopback2
10.1.1.0 [110/65] via 10.1.12.1, 00:02:00, Serial0/0/0
10.1.23.0 is directly connected, Serial0/0/1
h. Using a Tcl script, verify connectivity to all interfaces from any router, with the exception of loopback 20
on R3 (172.20.200.1), which has not yet been configured as part of OSPF.
i.
Use the following Tcl script to verify that you can ping all addresses in the topology.
R1# tclsh
R1(tcl)#
foreach address {
10.1.1.1
10.1.2.1
10.1.3.1
10.1.12.1
10.1.12.2
10.1.23.2
10.1.23.3
172.20.200.1
} {
ping $address }
Step 3: Configure a stub area.
a. Under the OSPF process on R2 and R3, make area 23 the stub area using the area area stub command.
The adjacency between the two routers might go down during the transition period, but it should come
back up afterwards.
R2(config)# router ospf 1
R2(config-router)# area 23 stub
R3(config)# router ospf 1
R3(config-router)# area 23 stub
b. Confirm that it comes up by using the show ip ospf neighbors command.
R2# show ip ospf neighbor
Neighbor ID
10.1.1.1
10.1.3.1
Pri
0
0
State
FULL/
FULL/
-
Dead Time
00:00:36
00:00:36
Address
10.1.12.1
10.1.23.3
Interface
Serial0/0/0
Serial0/0/1
-
Dead Time
00:00:31
Address
10.1.23.2
Interface
Serial0/0/1
R3# show ip ospf neighbor
Neighbor ID
10.1.2.1
c.
Pri
0
State
FULL/
Using the show ip route command, you can see that R3 now has a default route pointing toward R2. A
stub area does not receive any external routes. It receives a default route and OSPF inter-area routes.
R3# show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 5 of 18
CCNPv6 ROUTE
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
Gateway of last resort is 10.1.23.2 to network 0.0.0.0
C
O IA
C
O IA
O IA
C
O*IA
172.20.0.0/24 is subnetted, 1 subnets
172.20.200.0 is directly connected, Loopback20
10.0.0.0/24 is subnetted, 5 subnets
10.1.12.0 [110/128] via 10.1.23.2, 00:00:56, Serial0/0/1
10.1.3.0 is directly connected, Loopback3
10.1.2.0 [110/65] via 10.1.23.2, 00:00:56, Serial0/0/1
10.1.1.0 [110/129] via 10.1.23.2, 00:00:56, Serial0/0/1
10.1.23.0 is directly connected, Serial0/0/1
0.0.0.0/0 [110/65] via 10.1.23.2, 00:00:56, Serial0/0/1
d. Look at the output of the show ip ospf command to see what type each area is.
R2# show ip ospf
Routing Process "ospf 1" with ID 10.1.2.1
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Link-local Signaling (LLS)
Supports area transit capability
It is an area border router
Initial SPF schedule delay 5000 msecs
Minimum hold time between two consecutive SPFs 10000 msecs
Maximum wait time between two consecutive SPFs 10000 msecs
Incremental-SPF disabled
Minimum LSA interval 5 secs
Minimum LSA arrival 1000 msecs
LSA group pacing timer 240 secs
Interface flood pacing timer 33 msecs
Retransmission pacing timer 66 msecs
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 2. 1 normal 1 stub 0 nssa
Number of areas transit capable is 0
External flood list length 0
Area BACKBONE(0)
Number of interfaces in this area is 2
Area has no authentication
SPF algorithm last executed 00:02:11.680 ago
SPF algorithm executed 5 times
Area ranges are
Number of LSA 4. Checksum Sum 0x01A85A
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
Area 23
Number of interfaces in this area is 1
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 6 of 18
CCNPv6 ROUTE
It is a stub area
generates stub default route with cost 1
Area has no authentication
SPF algorithm last executed 00:01:38.276 ago
SPF algorithm executed 8 times
Area ranges are
Number of LSA 6. Checksum Sum 0x027269
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
What are the advantages of having a router receive a default route rather than a more specific route?
_______________________________________________________________________________
_______________________________________________________________________________
Router memory and processing are conserved because the router has fewer routes to contend with.
Why do all routers in a stub area need to know that the area is a stub?
_______________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________
Routers need to know that an area is a stub for consistency so that no routers generate type 5 LSAs or
other OSPF features (such as virtual links) in an area in which they cannot exist.
Step 4: Configure a totally stubby area.
A modified version of a stubby area is a totally stubby area. A totally stubby area ABR only allows in a single,
default route from the backbone. To configure a totally stubby area, you only need to change a command at
the ABR, R2 in this scenario. Under the router OSPF process, you will enter the area 23 stub no-summary
command to replace the existing stub command for area 23. The no-summary option tells the router that this
area will not receive summary (inter-area) routes.
a. To see how this works, issue the show ip route command on R3. Notice the inter-area routes, in addition
to the default route generated by R2.
R3# show ip route
Codes: 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
Gateway of last resort is 10.1.23.2 to network 0.0.0.0
172.20.0.0/24 is subnetted, 1 subnets
172.20.200.0 is directly connected, Loopback20
10.0.0.0/24 is subnetted, 5 subnets
O IA
10.1.12.0 [110/128] via 10.1.23.2, 00:00:56, Serial0/0/1
C
10.1.3.0 is directly connected, Loopback3
O IA
10.1.2.0 [110/65] via 10.1.23.2, 00:00:56, Serial0/0/1
C
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 7 of 18
CCNPv6 ROUTE
O IA
10.1.1.0 [110/129] via 10.1.23.2, 00:00:56, Serial0/0/1
C
10.1.23.0 is directly connected, Serial0/0/1
O*IA 0.0.0.0/0 [110/65] via 10.1.23.2, 00:00:56, Serial0/0/1
b. Look at the output of the show ip ospf database command on R2 to see which LSAs are in its OSPF
database.
R2# show ip ospf database
OSPF Router with ID (10.1.2.1) (Process ID 1)
Router Link States (Area 0)
Link ID
10.1.1.1
10.1.2.1
ADV Router
10.1.1.1
10.1.2.1
Age
435
358
Seq#
Checksum Link count
0x80000004 0x0056D6 3
0x80000003 0x0057D2 3
Summary Net Link States (Area 0)
Link ID
10.1.3.0
10.1.23.0
ADV Router
10.1.2.1
10.1.2.1
Age
174
354
Seq#
Checksum
0x80000001 0x00EFEF
0x80000001 0x0009C3
Router Link States (Area 23)
Link ID
10.1.2.1
10.1.3.1
ADV Router
10.1.2.1
10.1.3.1
Age
188
188
Seq#
Checksum Link count
0x80000004 0x00298C 2
0x80000004 0x00B762 3
Summary Net Link States (Area 23)
Link ID
0.0.0.0
10.1.1.0
10.1.2.0
10.1.12.0
c.
ADV Router
10.1.2.1
10.1.2.1
10.1.2.1
10.1.2.1
Age
207
209
209
209
Seq#
0x80000001
0x80000002
0x80000002
0x80000002
Checksum
0x003BF4
0x0022C0
0x00948D
0x009E3A
Enter the stub no-summary command on R2 (the ABR) under the OSPF process.
R2(config)# router ospf 1
R2(config-router)# area 23 stub no-summary
d. Go back to R3 and issue the show ip route command again. Notice that it shows only one incoming
route from OSPF.
R3# show ip route
Codes: 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
Gateway of last resort is 10.1.23.2 to network 0.0.0.0
C
172.20.0.0/24 is subnetted, 1 subnets
172.20.200.0 is directly connected, Loopback20
10.0.0.0/24 is subnetted, 2 subnets
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 8 of 18
CCNPv6 ROUTE
C
10.1.3.0 is directly connected, Loopback3
C
10.1.23.0 is directly connected, Serial0/0/1
O*IA 0.0.0.0/0 [110/65] via 10.1.23.2, 00:00:10, Serial0/0/1
e. Look at the show ip ospf database output to see which routes are in area 23.
R3# show ip ospf database
OSPF Router with ID (10.1.3.1) (Process ID 1)
Router Link States (Area 23)
Link ID
10.1.2.1
10.1.3.1
ADV Router
10.1.2.1
10.1.3.1
Age
275
276
Seq#
Checksum Link count
0x80000004 0x00298C 2
0x80000004 0x00B762 3
Summary Net Link States (Area 23)
Link ID
0.0.0.0
ADV Router
10.1.2.1
Age
68
Seq#
Checksum
0x80000002 0x0039F5
What are the advantages of making an area totally stubby instead of a regular stub area? What are the
disadvantages?
_______________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________
By making an area totally stubby, routers in the area only see intra-area routes and a default route. This
can save a lot of router memory and processor time. However, as with any type of route aggregation, the
loss of routing detail makes it possible for a non-optimal route to be chosen.
Why did only the ABR need to know that the area was totally stubby rather than all routers in the area?
_______________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________
The ABR is the gateway to the rest of the area and therefore is the boundary that all inter-area LSAs
need to pass through. Because of this, it only needs to filter out the type 3 LSAs and let the default route
through.
Step 5: Configure a not-so-stubby area.
Not-so-stubby areas (NSSAs) are similar to regular stub areas, except that they allow routes to be
redistributed from an ASBR into that area with a special LSA type, which gets converted to a normal external
route at the ABR.
a. Change area 23 into an NSSA. NSSAs are not compatible with stub areas, so the first thing to do is issue
the no area 23 stub command on routers R2 and R3. Next, issue the area area nssa command on
routers R2 and R3 to change area 23 to an NSSA. To generate an external route into the NSSA, use the
redistribute connected subnets command on R3. This adds the previously unreachable loopback 20
into OSPF. Be sure to include the subnets keyword; otherwise, only classful networks are redistributed.
R2(config)# router ospf 1
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 9 of 18
CCNPv6 ROUTE
R2(config-router)# no area 23 stub
R2(config-router)# area 23 nssa
R3(config)# router
R3(config-router)#
R3(config-router)#
R3(config-router)#
ospf 1
no area 23 stub
area 23 nssa
redistribute connected subnets
b. In the output of the show ip ospf command on R2, notice that area 23 is an NSSA and that R2 is
performing the LSA type 7 to type 5 translation. If there are multiple ABRs to an NSSA, the ABR with the
highest router ID performs the translation.
R2# show ip ospf
Routing Process "ospf 1" with ID 10.1.2.1
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Link-local Signaling (LLS)
Supports area transit capability
It is an area border and autonomous system boundary router
Redistributing External Routes from,
Initial SPF schedule delay 5000 msecs
Minimum hold time between two consecutive SPFs 10000 msecs
Maximum wait time between two consecutive SPFs 10000 msecs
Incremental-SPF disabled
Minimum LSA interval 5 secs
Minimum LSA arrival 1000 msecs
LSA group pacing timer 240 secs
Interface flood pacing timer 33 msecs
Retransmission pacing timer 66 msecs
Number of external LSA 1. Checksum Sum 0x00CA2F
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 2. 1 normal 0 stub 1 nssa
Number of areas transit capable is 0
External flood list length 0
Area BACKBONE(0)
Number of interfaces in this area is 2
Area has no authentication
SPF algorithm last executed 00:03:11.636 ago
SPF algorithm executed 9 times
Area ranges are
Number of LSA 4. Checksum Sum 0x01AC53
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
Area 23
Number of interfaces in this area is 1
It is a NSSA area
Perform type-7/type-5 LSA translation
Area has no authentication
SPF algorithm last executed 00:00:16.408 ago
SPF algorithm executed 16 times
Area ranges are
Number of LSA 6. Checksum Sum 0x025498
Number of opaque link LSA 0. Checksum Sum 0x000000
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 10 of 18
CCNPv6 ROUTE
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
c.
Look at the show ip route output on R2. Notice that the external route comes in as type N2 from R3. This
is because it is a special NSSA external route.
R2# show ip route
Codes: 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
Gateway of last resort is not set
O N2
C
O
C
O
C
172.20.0.0/24 is subnetted, 1 subnets
172.20.200.0 [110/20] via 10.1.23.3, 00:00:41, Serial0/0/1
10.0.0.0/24 is subnetted, 5 subnets
10.1.12.0 is directly connected, Serial0/0/0
10.1.3.0 [110/65] via 10.1.23.3, 00:00:47, Serial0/0/1
10.1.2.0 is directly connected, Loopback2
10.1.1.0 [110/65] via 10.1.12.1, 00:03:42, Serial0/0/0
10.1.23.0 is directly connected, Serial0/0/1
d. Look at the show ip route output on R1. Notice that the route is now a regular E2 external route,
because R2 has performed the type 7 to type 5 translation.
R1# show ip route
Codes: 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
Gateway of last resort is not set
172.20.0.0/24 is subnetted, 1 subnets
172.20.200.0 [110/20] via 10.1.12.2, 00:01:22, Serial0/0/0
10.0.0.0/24 is subnetted, 5 subnets
C
10.1.12.0 is directly connected, Serial0/0/0
O IA
10.1.3.0 [110/129] via 10.1.12.2, 00:02:06, Serial0/0/0
O
10.1.2.0 [110/65] via 10.1.12.2, 00:04:22, Serial0/0/0
C
10.1.1.0 is directly connected, Loopback1
O IA
10.1.23.0 [110/128] via 10.1.12.2, 00:04:22, Serial0/0/0
O E2
e. Look at the show ip route output on R3. Notice that it no longer has a default route in it, but inter-area
routes are coming in.
Note: An NSSA does not have the default route injected by the ABR (R2) automatically. It is possible to
make the ABR inject the default route into the NSSA using the area 23 nssa default-informationoriginate command on R2.
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 11 of 18
CCNPv6 ROUTE
R3# show ip route
Codes: 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
Gateway of last resort is not set
172.20.0.0/24 is subnetted, 1 subnets
172.20.200.0 is directly connected, Loopback20
10.0.0.0/24 is subnetted, 5 subnets
O IA
10.1.12.0 [110/128] via 10.1.23.2, 00:02:11, Serial0/0/1
C
10.1.3.0 is directly connected, Loopback3
O IA
10.1.2.0 [110/65] via 10.1.23.2, 00:02:11, Serial0/0/1
O IA
10.1.1.0 [110/129] via 10.1.23.2, 00:02:11, Serial0/0/1
C
10.1.23.0 is directly connected, Serial0/0/1
C
f.
Yet another type of area is a totally-stubby NSSA that combines the property of an NSSA area (injecting
external routing information into OSPF) with a totally stubby behavior (accepting only default route from
the backbone). Issue the area 23 nssa no-summary command on R2, similar to converting a stub area
into a totally stubby area.
R2(config)# router ospf 1
R2(config-router)# area 23 nssa no-summary
g. Check the routing table on R3. Notice that the inter-area routes have been replaced by a single default
route.
R3# show ip route
Codes: 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
Gateway of last resort is 10.1.23.2 to network 0.0.0.0
172.20.0.0/24 is subnetted, 1 subnets
172.20.200.0 is directly connected, Loopback20
10.0.0.0/24 is subnetted, 2 subnets
C
10.1.3.0 is directly connected, Loopback3
C
10.1.23.0 is directly connected, Serial0/0/1
O*IA 0.0.0.0/0 [110/65] via 10.1.23.2, 00:00:20, Serial0/0/1
C
h. On R2, look at the show ip ospf database output to see the various LSA types.
R2# show ip ospf database
OSPF Router with ID (10.1.2.1) (Process ID 1)
Router Link States (Area 0)
Link ID
ADV Router
Age
Seq#
Checksum Link count
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 12 of 18
CCNPv6 ROUTE
10.1.1.1
10.1.2.1
10.1.1.1
10.1.2.1
944
383
0x80000004 0x0056D6 3
0x80000004 0x005BCB 3
Summary Net Link States (Area 0)
Link ID
10.1.3.0
10.1.23.0
ADV Router
10.1.2.1
10.1.2.1
Age
242
862
Seq#
Checksum
0x80000001 0x00EFEF
0x80000001 0x0009C3
Router Link States (Area 23)
Link ID
10.1.2.1
10.1.3.1
ADV Router
10.1.2.1
10.1.3.1
Age
257
209
Seq#
Checksum Link count
0x80000007 0x00B0F7 2
0x80000007 0x003FCD 3
Summary Net Link States (Area 23)
Link ID
0.0.0.0
ADV Router
10.1.2.1
Age
34
Seq#
Checksum
0x80000001 0x00C265
Type-7 AS External Link States (Area 23)
Link ID
10.1.3.0
ADV Router
10.1.3.1
Age
200
Seq#
Checksum Tag
0x80000001 0x0076FC 0
Type-5 AS External Link States
Link ID
10.1.3.0
ADV Router
10.1.2.1
Age
199
Seq#
Checksum Tag
0x80000001 0x00CA2F 0
Where would it be useful to make an area into an NSSA?
_______________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________
An NSSA is useful if you want to allow an area to inject external routes into an OSPF domain while still
retaining some of the stub characteristics of the area such as not accepting external routes that are
originated in other areas.
Step 6: Configure OSPF interface authentication.
For security purposes, you can configure OSPF interfaces to use authentication.
a. Configure the link between R2 and R3 for plaintext authentication. To set up plaintext authentication on
an interface, type ip ospf authentication at the interface command prompt. Then set the password to
cisco with the ip ospf authentication-key key-string command.
R2(config)# interface serial 0/0/1
R2(config-if)# ip ospf authentication
R2(config-if)# ip ospf authentication-key cisco
R3(config)# interface serial 0/0/1
R3(config-if)# ip ospf authentication
R3(config-if)# ip ospf authentication-key cisco
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 13 of 18
CCNPv6 ROUTE
Note: While configuring the authentication, the adjacency might go down if the dead timer expires on one
of the routers. The relationship should be reestablished once authentication is configured on both sides.
b. Verify the authentication using the show ip ospf interface interface command.
R2# show ip ospf interface serial 0/0/1
Serial0/0/1 is up, line protocol is up
Internet Address 10.1.23.2/24, Area 23
Process ID 1, Router ID 10.1.2.1, Network Type POINT_TO_POINT, Cost: 64
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:09
Supports Link-local Signaling (LLS)
Index 1/3, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 4
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 10.1.3.1
Suppress hello for 0 neighbor(s)
Simple password authentication enabled
c.
MD5 authentication encrypts the password for stronger security. Configure the link between R1 and R2
for MD5 authentication using the ip ospf authentication message-digest interface command. Then set
the password to cisco with the ip ospf message-digest-key key_number md5 key-string command.
Make sure that the key number is the same on both routers. In this case, use 1 for simplicity.
R1(config)# interface serial 0/0/0
R1(config-if)# ip ospf authentication message-digest
R1(config-if)# ip ospf message-digest-key 1 md5 cisco
R2(config)# interface serial 0/0/0
R2(config-if)# ip ospf authentication message-digest
R2(config-if)# ip ospf message-digest-key 1 md5 cisco
Note: The MD5 key number works differently than key chains. The router uses the most recently added
key for authenticating sent packets. The key number does not have a direct influence on this behavior,
that is, if the interface was configured with the MD5 key number 10 and later the key with number 5 was
added, the router would use the key number 5 to digitally sign outbound sent packets. If a router having
several MD5 keys on an interface detects that at least one of its neighbors has not yet started using the
most recently added key, it engages in a simple key migration procedure: it sends each OSPF packet
multiple times, with each instance of the packet authenticated by a particular MD5 key configured on the
interface, one instance for each key. This ensures a smooth, gradual migration.
d. Verify the configuration using the show ip ospf interface interface command.
R1# show ip ospf interface serial 0/0/0
Serial0/0/0 is up, line protocol is up
Internet Address 10.1.12.1/24, Area 0
Process ID 1, Router ID 10.1.1.1, Network Type POINT_TO_POINT, Cost: 64
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:08
Supports Link-local Signaling (LLS)
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 14 of 18
CCNPv6 ROUTE
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)
Message digest authentication enabled
Youngest key id is 1
Why is configuring authentication for OSPF, or any routing protocol, a good idea?
_______________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________
Configuring routing protocol authentication is beneficial because without it, you could have a rogue router
on a subnet advertising false routes.
e. Use the following Tcl script to verify connectivity to all addresses in the topology.
R1# tclsh
R1(tcl)#
foreach address {
10.1.1.1
10.1.2.1
10.1.3.1
10.1.12.1
10.1.12.2
10.1.23.2
10.1.23.3
172.20.200.1
} {
ping $address }
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 15 of 18
CCNPv6 ROUTE
Router Interface Summary Table
Router Interface Summary
Ethernet Interface
Serial Interface
#2
#1
Router Model
Ethernet Interface
#1
Serial Interface
#2
1700
Fast Ethernet 0
(FA0)
Fast Ethernet 1
(FA1)
Serial 0 (S0)
Serial 1 (S1)
1800
Fast Ethernet 0/0
(FA0/0)
Fast Ethernet 0/1
(FA0/1)
Serial 0/0/0
(S0/0/0)
Serial 0/0/1
(S0/0/1)
2600
Fast Ethernet 0/0
(FA0/0)
Fast Ethernet 0/1
(FA0/1)
Serial 0/0 (S0/0)
Serial 0/1 (S0/1)
2800
Fast Ethernet 0/0
(FA0/0)
Fast Ethernet 0/1
(FA0/1)
Serial 0/0/0
(S0/0/0)
Serial 0/0/1
(S0/0/1)
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. Rather than list all 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 might contain one. For example, for an ISDN BRI interface, the string in parenthesis
is the legal abbreviation that can be used in Cisco IOS commands to represent the interface.
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 16 of 18
CCNPv6 ROUTE
Device Configurations (Instructor version)
Router R1
hostname R1
!
interface Loopback1
description Engineering Department
ip address 10.1.1.1 255.255.255.0
ip ospf network point-to-point
!
interface Serial0/0/0
ip address 10.1.12.1 255.255.255.0
ip ospf authentication message-digest
ip ospf message-digest-key 1 md5 cisco
clock rate 64000
no shutdown
!
router ospf 1
network 10.1.1.0 0.0.0.255 area 0
network 10.1.12.0 0.0.0.255 area 0
!
end
Router R2
hostname R2
!
interface Loopback2
description Marketing Department
ip address 10.1.2.1 255.255.255.0
ip ospf network point-to-point
!
interface Serial0/0/0
ip address 10.1.12.2 255.255.255.0
ip ospf authentication message-digest
ip ospf message-digest-key 1 md5 cisco
no shutdown
!
interface Serial0/0/1
ip address 10.1.23.2 255.255.255.0
ip ospf authentication
ip ospf authentication-key cisco
clock rate 64000
no shutdown
!
router ospf 1
area 23 nssa no-summary
network 10.1.2.0 0.0.0.255 area 0
network 10.1.12.0 0.0.0.255 area 0
network 10.1.23.0 0.0.0.255 area 23
!
end
Router R3
hostname R3
!
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 17 of 18
CCNPv6 ROUTE
interface Loopback3
description Accounting Department
ip address 10.1.3.1 255.255.255.0
ip ospf network point-to-point
!
interface Loopback20
description Connection to another AS
ip address 172.20.200.1 255.255.255.0
!
interface Serial0/0/1
ip address 10.1.23.3 255.255.255.0
ip ospf authentication
ip ospf authentication-key cisco
no shutdown
!
router ospf 1
area 23 nssa
redistribute connected subnets
network 10.1.3.0 0.0.0.255 area 23
network 10.1.23.0 0.0.0.255 area 23
!
end
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 18 of 18
CCNPv6 ROUTE
Chapter 3 Lab 3-3, OSPF Virtual Links and Area Summarization
Instructor Version
Topology
Objectives
•
Configure multi-area OSPF on a router.
•
Verify multi-area behavior.
•
Create an OSPF virtual link.
•
Summarize an area.
•
Generate a default route into OSPF.
Background
You are responsible for configuring the new network to connect your company’s engineering, marketing, and
accounting departments, represented by loopback interfaces on each of the three routers. The physical
devices have just been installed and connected by serial cables. Configure multiple-area OSPF to allow full
connectivity between all departments.
In addition, R1 has a loopback interface representing a connection to the Internet. This connection will not be
added into OSPF. R3 will have four additional loopback interfaces representing connections to branch offices.
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 1 of 14
CCNPv6 ROUTE
Note: This lab uses Cisco 1841 routers with Cisco IOS Release 12.4(24)T1 and the Advanced IP Services
image c1841-advipservicesk9-mz.124-24.T1.bin. You can use other routers (such as a 2801 or 2811) and
Cisco IOS Software versions if they have comparable capabilities and features. Depending on the router
model and Cisco IOS Software version, the commands available and output produced might vary from what is
shown in this lab.
Required Resources
•
3 routers (Cisco 1841 with Cisco IOS Release 12.4(24)T1 Advanced IP Services or comparable)
•
Serial and console cables
Step 1: Configure addressing and loopbacks.
Using the addressing scheme in the diagram, apply IP addresses to the serial interfaces on R1, R2, and R3.
Create loopbacks on R1, R2, and R3, and address them according to the diagram.
R1# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)# interface loopback 1
R1(config-if)# description Engineering Department
R1(config-if)# ip address 10.1.1.1 255.255.255.0
R1(config-if)# interface loopback 30
R1(config-if)# ip address 172.30.30.1 255.255.255.252
R1(config-if)# interface serial 0/0/0
R1(config-if)# ip address 10.1.12.1 255.255.255.0
R1(config-if)# clockrate 64000
R1(config-if)# no shutdown
R2# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)# interface loopback 2
R2(config-if)# description Marketing Department
R2(config-if)# ip address 10.1.2.1 255.255.255.0
R2(config-if)# interface serial 0/0/0
R2(config-if)# ip address 10.1.12.2 255.255.255.0
R2(config-if)# no shutdown
R2(config-if)# interface serial 0/0/1
R2(config-if)# ip address 10.1.23.2 255.255.255.0
R2(config-if)# clockrate 64000
R2(config-if)# no shutdown
R3# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)# interface loopback 3
R3(config-if)# description Accounting Department
R3(config-if)# ip address 10.1.3.1 255.255.255.0
R3(config-if)# interface loopback 100
R3(config-if)# ip address 192.168.100.1 255.255.255.0
R3(config-if)# interface loopback 101
R3(config-if)# ip address 192.168.101.1 255.255.255.0
R3(config-if)# interface loopback 102
R3(config-if)# ip address 192.168.102.1 255.255.255.0
R3(config-if)# interface loopback 103
R3(config-if)# ip address 192.168.103.1 255.255.255.0
R3(config-if)# interface serial 0/0/1
R3(config-if)# ip address 10.1.23.3 255.255.255.0
R3(config-if)# no shutdown
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 2 of 14
CCNPv6 ROUTE
Step 2: Add interfaces into OSPF.
a. Create OSPF process 1 on all three routers. Using the network command, configure the subnet of the
serial link between R1 and R2 to be in OSPF area 0. Add loopback 1 on R1 and loopback 2 on R2 into
OSPF area 0.
Note: The default behavior of OSPF for loopback interfaces is to advertise a 32-bit host route. To ensure
that the full /24 network is advertised, use the ip ospf network point-to-point command. Change the
network type on the loopback interfaces so that they are advertised with the correct subnet.
R1(config)# router ospf 1
R1(config-router)# network 10.1.12.0 0.0.0.255 area 0
R1(config-router)# network 10.1.1.0 0.0.0.255 area 0
R1(config-router)# exit
R1(config)# interface loopback 1
R1(config-if)# ip ospf network point-to-point
R2(config)# router ospf 1
R2(config-router)# network 10.1.12.0 0.0.0.255 area 0
R2(config-router)# network 10.1.2.0 0.0.0.255 area 0
R2(config-router)# exit
R2(config)# interface loopback 2
R2(config-if)# ip ospf network point-to-point
b. Verify that you can see OSPF neighbors in the show ip ospf neighbors output on both routers. Verify
that the routers can see each other’s loopback with the show ip route command.
R1# show ip ospf neighbor
Neighbor ID
10.1.2.1
Pri
0
State
FULL/
-
Dead Time
00:00:38
Address
10.1.12.2
Interface
Serial0/0/0
R1# show ip route
Codes: 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
Gateway of last resort is not set
C
O
C
C
10.0.0.0/24 is subnetted, 3 subnets
10.1.12.0 is directly connected, Serial0/0/0
10.1.2.0 [110/65] via 10.1.12.2, 00:00:10, Serial0/0/0
10.1.1.0 is directly connected, Loopback1
172.30.0.0/30 is subnetted, 1 subnets
172.30.30.0 is directly connected, Loopback30
R2# show ip ospf neighbor
Neighbor ID
172.30.30.1
Pri
0
State
FULL/
-
Dead Time
00:00:35
Address
10.1.12.1
Interface
Serial0/0/0
R2# show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 3 of 14
CCNPv6 ROUTE
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
Gateway of last resort is not set
C
C
O
C
c.
10.0.0.0/24 is subnetted, 4 subnets
10.1.12.0 is directly connected, Serial0/0/0
10.1.2.0 is directly connected, Loopback2
10.1.1.0 [110/65] via 10.1.12.1, 00:00:30, Serial0/0/0
10.1.23.0 is directly connected, Serial0/0/1
Add the subnet between R2 and R3 into OSPF area 23 using the network command. Add loopback 3 on
R3 into area 23.
R2(config)# router ospf 1
R2(config-router)# network 10.1.23.0 0.0.0.255 area 23
R3(config)# router ospf 1
R3(config-router)# network 10.1.23.0 0.0.0.255 area 23
R3(config-router)# network 10.1.3.0 0.0.0.255 area 23
R3(config-router)# exit
R3(config)# interface loopback 3
R3(config-if)# ip ospf network point-to-point
d. Verify that this neighbor relationship comes up with the show ip ospf neighbors command.
R2# show ip ospf neighbor
Neighbor ID
172.30.30.1
192.168.103.1
Pri
0
0
State
FULL/
FULL/
-
Dead Time
00:00:36
00:00:36
Address
10.1.12.1
10.1.23.3
Interface
Serial0/0/0
Serial0/0/1
e. Using a Tcl script, verify connectivity to all interfaces from any router, with the exception of loopback 30
on R1, and R3 loopbacks 100 through 103.
R1# tclsh
R1(tcl)#
foreach address {
10.1.1.1
10.1.2.1
10.1.3.1
10.1.12.1
10.1.12.2
10.1.23.2
10.1.23.3
172.30.30.1
192.168.100.1
192.168.101.1
192.168.102.1
192.168.103.1
Step 3: Create a virtual link.
a. Add loopbacks 100 through 103 on R3 to the OSPF process in area 100 using the network command.
Change the network type to advertise the correct subnet mask.
All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information.
Page 4 of 14
CCNPv6 ROUTE
R3(config)# router ospf 1
R3(config-router)# network 192.168.100.0 0.0.3.255 area 100
R3(config-router)# exit
R3(config)# interface loopback 100
R3(config-if)# ip ospf network point-to-point
R3(config-if)# interface loopback 101
R3(config-if)# ip ospf network point-to-point
R3(config-if)# interface loopback 102
R3(config-if)# ip ospf network point-to-point
R3(config-if)# interface loopback 103
R3(config-if)# ip ospf network point-to-point
b. Look at the output of the show ip route command on R2. Notice that the routes to those networks do not
appear. The reason for this behavior is that area 100 on R3 is not connected to the backbone. It is only
connected to area 23. If an area is not connected to the backbone, its routes are not advertised outside of
its area.
R2# show ip route
Codes: 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
Gateway of last resort is not set
C
O
C
O
C
10.0.0.0/24 is subnetted, 5 subnets
10.1.12.0 is directly connected, Serial0/0/0
10.1.3.0 [110/65] via 10.1.23.3, 00:01:00, Serial0/0/1
10.1.2.0 is directly connected, Loopback2
10.1.1.0 [110/65] via 10.1.12.1, 00:03:10, Serial0/0/0
10.1.23.0 is directly connected, Serial0/0/1
What would happen if routes could pass between areas without going through the backbone?
_______________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________
Routing loops might occur because any route could get advertised to different areas. By passing through
the backbone, type 3 LSAs are generated by their respective areas and not sent back in.
You can get around this situation by creating a virtual link. A virtual link is an OSPF feature that creates a
logical extension of the backbone area across a regular area, without actually adding any physical
interfaces into area 0.
Note: Prior to creating a virtual link you need to identify the OSPF router ID for the routers involved (R2
and R3), using a command such as show ip ospf, show ip protocols or show ip ospf interface. The
output for the show ip ospf command on R1 and R3 is shown below.
R2# show ip ospf
Routing Process "ospf 1" with ID 10.1.2.1
Source Exif Data:
File Type : PDF
File Type Extension : pdf
MIME Type : application/pdf
PDF Version : 1.6
Linearized : Yes
Author : Cisco Systems
Create Date : 2019:03:04 22:55:02+05:30
Modify Date : 2019:03:04 22:55:02+05:30
Title :
Tagged PDF : No
XMP Toolkit : Adobe XMP Core 5.2-c001 63.139439, 2010/09/27-13:37:26
Metadata Date : 2019:03:04 22:55:02+05:30
Creator Tool : Adobe Acrobat Pro 10.0.0
Format : application/pdf
Creator : Cisco Systems
Document ID : uuid:ca46552d-cca9-4fdb-b2bd-3f4c677d8e94
Instance ID : uuid:c67f0851-c933-4069-8e26-04d60a764b02
Producer : Adobe Acrobat Pro 10.0.0
Page Count : 246
EXIF Metadata provided by EXIF.tools