Lab Objective:
The focus of this lab is to understand OSPF implementation and configuration in Cisco IOS routers. Additional technologies tested include authentication and route and LSA filtering.
Lab Topology:
The lab network topology is illustrated below:
|
IMPORTANT NOTE If you are using the www.howtonetwork.net racks, please bring up the LAN interfaces connected to the routers by issuing the no shutdown command on the connected switches. If you are using a home lab with no interface fastethernet 0/0 Alternately, you can simply connect the interfaces to a hub or switch if you have one available in your own lab. |
Task 1
Configure hostnames and IP addressing on all routers as illustrated in the network topology.
Task 2
Using interface-based configuration, configure the OSPF backbone (area 0) on the LAN segment between R1 and R4. In the future, additional routers may be added to this segment. Ensure that no DR/BDR election is held on this segment; however, ensure that multiple routers can exist on the same segment. Do NOT modify any OSPF priority values.
Task 3
Using interface-based configuration, configure OSPF area 1 between R1, R3 and R4. Configure MD5 authentication for area 1 using the password ‘CCNP’. Verify your configuration.
Task 4
Using interface-based configuration, configure OSPF area 2 between R1 and R2. R1 should not advertise any inter-area routes into area 2; however, a default route should be advertised by default. This default route should be advertised into area 2 so that it appears in the routing table of R2 with a route metric of 500. Do NOT modify interface bandwidth or cost values when completing this task. Verify the configuration.
Task 5
R2 should inject the 150.2.2.0/24 subnet into area 2 as an External N1 route with a route tag of 2222. Verify your configuration.
Task 6
Configure a secondary subnet of 150.1.1.0/29 on the LAN segment between R1 and R4. Assign the 150.1.1.1/29 address to R1 and 150.1.1.4/29 address to R4. This subnet should not be advertised into area 1; however, R2 should be able to reach it. You are NOT allowed to use any distribute lists or other forms of filters to complete this task. In addition to this, you are NOT allowed to configure any static routes. Verify your OSPF configuration.
Lab Validation
Task 1
| Router(config)#hostname R1 R1(config)#interface fastethernet 0/0 R1(config-if)#no shutdown R1(config-if)#ip address 10.0.1.1 255.255.255.248 R1(config-if)#exit R1(config)#interface serial 0/0 R1(config-if)#no shutdown R1(config-if)#ip address 10.0.0.1 255.255.255.252 R1(config-if)#clock rate 2000000 R1(config-if)#exit R1(config)#interface serial 0/1 R1(config-if)#ip address 10.0.0.5 255.255.255.252 R1(config-if)#exit |
| Router(config)#hostname R2 R2(config)#interface fastethernet 0/0 R2(config-if)#no shutdown R2(config-if)#ip address 150.2.2.2 255.255.255.0 R2(config-if)#exit R2(config)#interface serial 0/0 R2(config-if)#no shutdown R2(config-if)#ip address 10.0.0.2 255.255.255.252 R2(config-if)#exit |
| Router(config)#hostname R3 R3(config)#interface fastethernet 0/0 R3(config-if)#no shutdown R3(config-if)#ip address 150.3.3.3 255.255.255.0 R3(config-if)#exit R3(config)#interface serial 1/0 R3(config-if)#no shutdown R3(config-if)#ip address 10.0.0.6 255.255.255.252 R3(config-if)#clock rate 128000 R3(config-if)#exit R3(config)#interface serial 1/2 R3(config-if)#no shutdown R3(config-if)#ip address 10.0.0.13 255.255.255.252 R3(config-if)#clock rate 128000 R3(config-if)#exit |
| Router(config)#hostname R4 R4(config)#interface fastethernet 0/0 R4(config-if)#no shutdown R4(config-if)# ip add 10.0.1.4 255.255.255.248 R4(config-if)#exit R4(config)#interface serial 0/0 R4(config-if)#no shutdown R4(config-if)#ip address 10.0.0.14 255.255.255.252 R4(config-if)#exit |
Task 2
This task requires that the default OSPF network type be changed from Broadcast to point-to-multipoint, which allows multiple routers on the same segment, but requires no DR/BDR election. This task is completed as follows:
| R1(config)#router ospf 1 R1(config-router)#router-id 1.1.1.1 R1(config-router)#exit R1(config)#interface fastethernet 0/0 R1(config-if)#ip ospf network point-to-multipoint R1(config-if)#ip ospf 1 area 0 R1(config-if)#exit |
| R4(config)#router ospf 4 R4(config-router)#router-id 4.4.4.4 R4(config-router)#exit R4(config)#interface fastethernet 0/0 R4(config-if)#ip ospf network point-to-multipoint R4(config-if)#ip ospf 4 area 0 R4(config-if)#exit |
Verify your configuration using the show ip ospf neighbor command:
| R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface |
| R4#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface |
Task 3
| R1(config)#router ospf 1 R1(config-router)#area 1 authentication message-digest R1(config-router)#exit R1(config)#interface serial 0/1 R1(config-if)#ip ospf 1 area 1 R1(config-if)#ip ospf message-digest-key 1 md5 CCNP R1(config-if)#exit |
| R4(config)#router ospf 4 R4(config-router)#area 1 authentication message-digest R4(config-router)#exit R4(config)#interface serial 0/0 R4(config-if)#ip ospf 4 area 1 R4(config-if)#ip ospf message-digest-key 1 md5 CCNP R4(config-if)#exit |
| R3(config)#router ospf 3 R3(config-router)#router-id 3.3.3.3 R3(config-router)#area 1 authentication message-digest R3(config-router)#exit Enter configuration commands, one per line. End with CNTL/Z. R3(config)#interface fastethernet 0/0 R3(config-if)#ip ospf 3 area 1 R3(config-if)#ip ospf message-digest 1 md5 CCNP R3(config-if)#exit R3(config)#interface serial 1/0 R3(config-if)#ip ospf 3 area 1 R3(config-if)#ip ospf message-digest 1 md5 CCNP R3(config-if)#exit R3(config)#interface serial 1/2 R3(config-if)#ip ospf 3 area 1 R3(config-if)#ip ospf message-digest 1 md5 CCNP R3(config-if)#exit |
Verify your configuration using the show ip ospf neighbor command:
| R3#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface |
You can verify area authentication using the show ip ospf <process> command:
| R3#show ip ospf 3 | begin Area 1 Area 1 Number of interfaces in this area is 3 Area has message digest authentication SPF algorithm last executed 00:00:58.140 ago SPF algorithm executed 6 times Area ranges are Number of LSA 11. Checksum Sum 0x143DCC 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 |
Use the show ip ospf interface <name> to view interface authentication configuration:
| R3#show ip ospf interface serial 1/0 Serial1/0 is up, line protocol is up Internet Address 10.0.0.6/30, Area 1 Process ID 3, Router ID 3.3.3.3, Network Type POINT_TO_POINT, Cost: 781 Enabled by interface config, including secondary ip addresses 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:00 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 3 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 |
Task 4
To complete this task you need to configure R1 as a NSSA totally stubby ABR so that R1 will automatically advertise the default route into area 2. To complete the second part of the task, the area <> default-cost <cost> command is required to specify the default cost of the default route that is advertised into the stub or NSSA area.
Because OSPF cost is cumulative, you need to calculate the cost of 500 by subtracting the cost of the link between R1 and R2 from this number and specifying the remainder using the area <> default-cost <cost> command. Assuming the default cost of 64 for the WAN link between R1 and R2, to configure a cost of 500 perform the following: 500 – 64 = 436. This task is completed as follows:
| R1(config)#router ospf 1 R1(config-router)#area 2 nssa no-summary R1(config-router)#area 2 default-cost 436 R1(config-router)#exit R1(config)#interface serial 0/0 R1(config-if)#ip ospf 1 area 2 R1(config-if)#exit |
| R2(config)#router ospf 2 R2(config-router)#router-id 2.2.2.2 R2(config-router)#area 2 nssa R2(config-router)#exit R2(config)#interface serial 0/0 R2(config-if)#ip ospf 2 area 2 |
Verify your configuration using the show ip ospf neighbor command:
| R2#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface |
Verify the cost of the default route on R2 by looking at the routing table:
| R2#show ip route ospf O*IA 0.0.0.0/0 [110/500] via 10.0.0.1, 00:00:15, Serial0/0 |
The advertised cost can also be viewed by looking at the entry in the LSDB:
| R2#show ip ospf database summary 0.0.0.0
OSPF Router with ID (2.2.2.2) (Process ID 2) Summary Net Link States (Area 2) Routing Bit Set on this LSA |
Task 5
Because only a single interface exists, this can be completed using a single configuration line:
| R2(config)#router ospf 2 R2(config-router)#redistribute connected subnets tag 2222 metric-type 1 R2(config-router)#exit |
Verify your configuration by looking at the entry for this prefix in the Link State Database:
| R1#show ip ospf database external 150.2.2.0
OSPF Router with ID (1.1.1.1) (Process ID 1) Type-5 AS External Link States LS age: 63 |
Task 6
The requirements of this task are two-fold. To complete the first part of this task, you need to prevent the secondary subnet configured on R1 and R4 from being advertised by OSPF. By default, OSPF will advertise all secondary subnets as can be seen in the LSDB on R3:
| R3#show ip ospf database | include 150. 150.1.1.1 1.1.1.1 142 0x80000001 0x00A4FA 150.1.1.1 4.4.4.4 153 0x80000001 0x00543E 150.1.1.4 1.1.1.1 142 0x80000001 0x00900B 150.1.1.4 4.4.4.4 153 0x80000001 0x002C64 150.2.2.0 1.1.1.1 723 0x80000001 0x00CDF1 2222 |
Complete this task by preventing OSPF from advertising secondary subnets as follows:
| R1(config)#interface fastethernet 0/0 R1(config-if)#ip ospf 1 area 0 secondaries none R1(config-if)#exit |
| R4(config)#interface fastethernet 0/0 R4(config-if)#ip ospf 4 area 0 secondaries none R4(config-if)#exit |
Following this configuration, the secondary subnet is no longer advertised by OSPF and is no longer present in the LSDB on R3:
| R3#show ip ospf database | include 150 150.2.2.0 1.1.1.1 1188 0x80000002 0x00CBF2 2222 |
To complete the second part of this task, you need to configure R1 and R4 to advertise a default route to R3 using the default-information originate always command. This allows OSPF to advertise a default route without one existing in the RIB:
| R1(config)#router ospf 1 R1(config-router)#default-information originate always R1(config-router)#exit |
| R4(config)#router ospf 4 R4(config-router)#default-information originate always R4(config-router)#exit |
Following this configuration, R3s RIB contains two default routes: one from R1 and one from R4. This is verified by looking at either the RIB or LSDB on R3:
| R3#show ip route ospf 10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks O IA 10.0.1.1/32 [110/781] via 10.0.0.5, 00:00:52, Serial1/0 O IA 10.0.0.0/30 [110/845] via 10.0.0.5, 00:00:52, Serial1/0 O IA 10.0.1.4/32 [110/781] via 10.0.0.14, 00:00:52, Serial1/2 150.2.0.0/24 is subnetted, 1 subnets O E1 150.2.2.0 [110/865] via 10.0.0.5, 00:00:42, Serial1/0 O*E2 0.0.0.0/0 [110/1] via 10.0.0.14, 00:00:42, Serial1/2 [110/1] via 10.0.0.5, 00:00:43, Serial1/0 |
Finally, verify that R3 can ping the 150.1.1.1 and 150.1.1.4 addresses:
| R3#ping 150.1.1.1 repeat 10 source fastethernet 0/0
Type escape sequence to abort. |
| R3#ping 150.1.1.4 repeat 10 source fastethernet 0/0
Type escape sequence to abort. |
Final Router Configurations
R1
|
R1#term len 0 Current configuration : 1204 bytes R1# |
R2
|
R2#term len 0 Current configuration : 936 bytes R2# |
R3
|
R3#term len 0 Current configuration : 1411 bytes R3# |
R4
|
R4#term len 0 Current configuration : 1105 bytes R4# |
