Lab Objective:
The focus of this lab is to understand OSPF implementation and configuration in Cisco IOS routers. Additional technologies tested include Stub/NSSA areas 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 legacy network x.x.x.x y.y.y.y area <area> OSPF configuration commands, configure OSPF as illustrated in the topology. All areas should be configured as normal OSPF areas EXCEPT for area 4, which should be configured as an NSSA. Verify your configuration using the appropriate commands.
Task 3
Configure the following static routes on R4 and redistribute them as Type 1 External routes:
192.168.1.0/24 via 150.4.4.254
192.168.2.0/24 via 150.4.4.254
Next, configure your OSPF network so that the forward address in the Type 5 LSAs indicates that traffic should be sent to R3 (ASBR Type 5 LSAs) and NOT to R4 (ASBR Type 7 LSAs). In other words, ensure that the forward address of the Type 5 LSAs is set to 0.0.0.0. Verify your configuration using the appropriate commands.
Task 4
Configure a Loopback11 interface on R1 with the IP address 11.11.11.11/32. Redistribute this interface into OSPF using default metric type and metric values. Following the route redistribution, configure OSPF so that all routers are able to ping this subnet from their LAN subnets, i.e. from their 150.x.x.x addresses. Verify your configuration.
Task 5
Configure OSPF so that the 150.3.3.0/24 subnet connected to R3s LAN segment and as well as the 150.4.4.0/24 subnet connected to R4s LAN segment are not advertised to any other area. Do NOT use any ACL or prefix-list based filtering methods when implementing this solution. However, ensure that R1 and R2 are still able to ping 150.3.3.3 as well as 150.4.4.4. Verify your configuration using the appropriate commands.
Task 6
Configure OSPF so that the 150.1.1.0/24 and 150.2.2.0/24 subnets are NOT advertised only to area 3. They should still be advertised to other areas. Do NOT use any distribute lists when completing this task. Verify your configuration using the appropriate commands.
Lab Validation
Task 1
| Router(config)#hostname R1 R1(config)#interface fastethernet 0/0 R1(config-if)#no shutdown R1(config-if)#ip address 150.1.1.1 255.255.255.0 R1(config-if)#exit R1(config)#interface serial 0/0 R1(config-if)#no shutdown R1(config-if)#ip address 10.0.1.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)#no shutdown 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.1.2 255.255.255.252 R2(config-if)#exit R2(config)#interface serial 0/1 R2(config-if)#ip address 10.0.0.9 255.255.255.252 R2(config-if)#no shutdown R2(config-if)#exit |
| Router(config)#hostname R3 R3(config)#interface fastethernet 0/0 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)#ip address 10.0.0.6 255.255.255.252 R3(config-if)#no shutdown R3(config-if)# clock rate 128000 R3(config-if)#exit R3(config)#interface serial 1/1 R3(config-if)#ip address 10.0.0.10 255.255.255.252 R3(config-if)#no shutdown R3(config-if)# clock rate 128000 R3(config-if)#exit R3(config)#interface serial 1/2 R3(config-if)#ip address 10.0.0.13 255.255.255.252 R3(config-if)#no shutdown R3(config-if)# clock rate 128000 R3(config-if)#exit |
| Router(config)#hostname R4 R4(config)#interface fastethernet 0/0 R4(config-if)#ip address 150.4.4.4 255.255.255.0 R4(config-if)#exit R4(config)#interface serial 0/0 R4(config-if)#ip address 10.0.0.14 255.255.255.252 R4(config-if)#no shutdown R4(config-if)#exit |
Task 2
| R1(config)#router ospf 1 R1(config-router)#router-id 1.1.1.1 R1(config-router)#network 10.0.0.1 0.0.0.0 area 2 R1(config-router)#network 10.0.0.5 0.0.0.0 area 3 R1(config-router)#network 150.1.1.1 0.0.0.0 area 2 R1(config-router)#exit |
| R2(config)#router ospf 2 R2(config-router)#router-id 2.2.2.2 R2(config-router)#network 10.0.0.2 0.0.0.0 area 2 R2(config-router)#network 10.0.0.9 0.0.0.0 area 0 R2(config-router)#network 150.2.2.2 0.0.0.0 area 2 R2(config-router)#exit |
| R3(config)#router ospf 3 R3(config-router)#router-id 3.3.3.3 R3(config-router)#network 10.0.0.6 0.0.0.0 area 3 R3(config-router)#network 10.0.0.10 0.0.0.0 area 0 R3(config-router)#network 10.0.0.13 0.0.0.0 area 4 R3(config-router)#network 150.3.3.3 0.0.0.0 area 0 R3(config-router)#area 4 nssa R3(config-router)#exit |
| R4(config)#router ospf 4 R4(config-router)#router-id 4.4.4.4 R4(config-router)#network 150.4.4.4 0.0.0.0 area 4 R4(config-router)#network 10.0.0.14 0.0.0.0 area 4 R4(config-router)#area 4 nssa R4(config-router)#exit |
Verify your configuration using the show ip ospf neighbor command:
| R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface |
| R2#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface |
| R3#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
The first part of this task is straightforward and is completed as follows:
| R4(config)#ip route 192.168.1.0 255.255.255.255 150.4.4.254 R4(config)#ip route 192.168.2.0 255.255.255.255 150.4.4.254 R4(config)#router ospf 4 R4(config-router)#redistribute static subnets metric-type 1 R4(config-router)#exit |
The second part of this task requires some additional thought. By default, the forward address of the external LSAs will be set to 0.0.0.0, meaning traffic should be forwarded to the ASBR, unless the next hop IP address is included in network statement configuration, i.e. is advertised by OSPF. This can be verified by checking the Link State Database (LSDB) on R1, R3 or R3:
| R1#show ip ospf database external
OSPF Router with ID (1.1.1.1) (Process ID 1) Type-5 AS External Link States Routing Bit Set on this LSA Routing Bit Set on this LSA |
To modify this default behavior, you have to configure R3, the ABR, to suppress the forward address. This task is completed as follows:
| R3(config)#router ospf 3 R3(config-router)#area 4 nssa translate type7 suppress-fa R3(config-router)#exit |
Following this configuration change, the LSDB on R1 now shows the following entries:
| R1#show ip ospf database external
OSPF Router with ID (1.1.1.1) (Process ID 1) Type-5 AS External Link States Routing Bit Set on this LSA Routing Bit Set on this LSA |
The forward address of 0.0.0.0 indicates that the traffic should be sent to the ASBR. By default, R3 will be designated ASBR because it translates the Type 3 LSAs to Type 5 LSAs, which are then flooded throughout the OSPF domain. You can verify that the Type 4 LSA for the ASBR exists using theshow ip ospf database asbr-summary command:
| R1#show ip ospf database asbr-summary
OSPF Router with ID (1.1.1.1) (Process ID 1) Summary ASB Link States (Area 2) LS age: 67 |
Task 4
The first part of this task is straightforward and requires route redistribution configuration:
| R1(config)#interface loopback 11 R1(config-if)#ip address 11.11.11.11 255.255.255.255 R1(config-if)#exit R1(config)#router ospf 1 R1(config-router)#redistribute connected subnets R1(config-router)#exit |
To complete the second part of this task, we have to remember that by default, a Type 5 LSA has a domain-flooding scope; however, it is NOT advertised into stub or NSSA areas. As a result of this default behavior, all other routers in the network will have an LSA for this subnet, except for R4. Validate this by looking at the Link State Database on R4:
| R4#show ip ospf database
OSPF Router with ID (4.4.4.4) (Process ID 4) Router Link States (Area 4) Link ID ADV Router Age Seq# Checksum Link count Summary Net Link States (Area 4) Link ID ADV Router Age Seq# Checksum Type-7 AS External Link States (Area 4) Link ID ADV Router Age Seq# Checksum Tag |
Because the Type 5 LSA will not be flooded into area 4, you need to configure the ABR (R3) to advertise a default route to R4. This is completed as follows:
| R3(config)#router ospf 3 R3(config-router)#area 4 nssa default-information-originate R3(config-router)#exit |
Following this configuration, the LSDB on R4 shows the following entries:
| R4#show ip ospf database
OSPF Router with ID (4.4.4.4) (Process ID 4) Router Link States (Area 4) Link ID ADV Router Age Seq# Checksum Link count Summary Net Link States (Area 4) Link ID ADV Router Age Seq# Checksum Type-7 AS External Link States (Area 4) Link ID ADV Router Age Seq# Checksum Tag |
Finally, verify that all routers can ping the 11.11.11.11/32 address from their LAN interfaces:
| R2#ping 11.11.11.11 repeat 10 source fastethernet 0/0
Type escape sequence to abort. |
| R3#ping 11.11.11.11 repeat 10 source fastethernet 0/0
Type escape sequence to abort. |
| R4#ping 11.11.11.11 repeat 10 source fastethernet 0/0
Type escape sequence to abort. |
Task 5
This task requires the use of the area <area> range command, which can also be used for route filtering. Prior to any changes, R1 and R2s routing tables show the following entries:
| R1#show ip route ospf | include 150. 150.2.0.0/24 is subnetted, 1 subnets O 150.2.2.0 [110/65] via 10.0.0.2, 00:09:46, Serial0/0 150.3.0.0/24 is subnetted, 1 subnets O IA 150.3.3.0 [110/65] via 10.0.0.6, 00:09:46, Serial0/1 150.4.0.0/24 is subnetted, 1 subnets O IA 150.4.4.0 [110/846] via 10.0.0.6, 00:09:46, Serial0/1 |
| R2#show ip route ospf | include 150. 150.1.0.0/24 is subnetted, 1 subnets O 150.1.1.0 [110/65] via 10.0.0.1, 00:09:53, Serial0/0 150.3.0.0/24 is subnetted, 1 subnets O 150.3.3.0 [110/65] via 10.0.0.10, 01:19:47, Serial0/1 150.4.0.0/24 is subnetted, 1 subnets O IA 150.4.4.0 [110/846] via 10.0.0.10, 00:09:53, Serial0/1 |
Complete this task by configuring both R3 and R2 as follows:
| R2(config)#router ospf 2 R2(config-router)#area 0 range 150.3.3.0 255.255.255.0 not-advertise R2(config-router)#exit |
| R3(config)#router ospf 3 R3(config-router)#area 0 range 150.3.3.0 255.255.255.0 not-advertise R3(config-router)#area 4 range 150.4.4.0 255.255.255.0 not-advertise R3(config-router)#exit |
Following this configuration change, the routing tables on R1 and R2 show the following:
| R1#show ip route ospf | include 150. 150.2.0.0/24 is subnetted, 1 subnets O 150.2.2.0 [110/65] via 10.0.0.2, 00:02:34, Serial0/0 |
| R2#show ip route ospf | include 150. 150.1.0.0/24 is subnetted, 1 subnets O 150.1.1.0 [110/65] via 10.0.0.1, 00:01:01, Serial0/0 150.3.0.0/24 is subnetted, 1 subnets O 150.3.3.0 [110/65] via 10.0.0.10, 00:01:01, Serial0/1 |
NOTE: The 150.3.3.0/24 prefix will show up in R2s routing table because this router also resides in area 0 along with R3. The configuration of thearea <area> range command on BOTH routers, i.e. R2 and R3 prevents this from being advertised outside of area 0 to any other area as required in the task.
To ensure that R1 and R2 are still able to ping both the 150.3.3.0/24 and 150.4.4.0/24 subnets, you need to advertise a default route via OSPF on R3. This is completed as follows:
| R3(config)#router ospf 3 R3(config-router)#default-information originate always R3(config-router)#exit |
Following this change, the routing tables on R1 and R2 show the following entries:
| R1#show ip route ospf 10.0.0.0/30 is subnetted, 4 subnets O IA 10.0.0.8 [110/128] via 10.0.0.2, 00:11:04, Serial0/0 O IA 10.0.0.12 [110/845] via 10.0.0.6, 00:11:04, Serial0/1 192.168.1.0/32 is subnetted, 1 subnets O E1 192.168.1.0 [110/84] via 10.0.0.6, 00:11:04, Serial0/1 192.168.2.0/32 is subnetted, 1 subnets O E1 192.168.2.0 [110/84] via 10.0.0.6, 00:11:04, Serial0/1 150.2.0.0/24 is subnetted, 1 subnets O 150.2.2.0 [110/65] via 10.0.0.2, 00:11:04, Serial0/0 O*E2 0.0.0.0/0 [110/1] via 10.0.0.6, 00:00:38, Serial0/1 |
| R2#show ip route ospf 10.0.0.0/30 is subnetted, 4 subnets O IA 10.0.0.12 [110/845] via 10.0.0.10, 00:09:42, Serial0/1 O IA 10.0.0.4 [110/845] via 10.0.0.10, 00:09:42, Serial0/1 11.0.0.0/32 is subnetted, 1 subnets O E2 11.11.11.11 [110/20] via 10.0.0.1, 00:09:42, Serial0/0 192.168.1.0/32 is subnetted, 1 subnets O E1 192.168.1.0 [110/84] via 10.0.0.10, 00:09:42, Serial0/1 192.168.2.0/32 is subnetted, 1 subnets O E1 192.168.2.0 [110/84] via 10.0.0.10, 00:09:42, Serial0/1 150.1.0.0/24 is subnetted, 1 subnets O 150.1.1.0 [110/65] via 10.0.0.1, 00:09:42, Serial0/0 150.3.0.0/24 is subnetted, 1 subnets O 150.3.3.0 [110/65] via 10.0.0.10, 00:09:42, Serial0/1 O*E2 0.0.0.0/0 [110/1] via 10.0.0.10, 00:00:54, Serial0/1 |
Finally, verify that R1 and R2 can still ping the 150.3.3.0/24 and 150.4.4.0/24 subnets:
| R1#ping 150.3.3.3 source fastethernet 0/0 repeat 10
Type escape sequence to abort. Type escape sequence to abort. |
| R2#ping 150.3.3.3 source fastethernet 0/0 repeat 10
Type escape sequence to abort. Type escape sequence to abort. |
Task 6
To complete this task, use the area <area> filter-list prefix <name> in command on R1 and R3 to prevent Type 3 LSAs for the 150.1.1.0/24 and 150.2.2.0/24 subnets from being advertised into area 3. For verification, prior to filtering changes, the LSDBs on R1 and R3 show:
| R1#show ip ospf database
OSPF Router with ID (1.1.1.1) (Process ID 1) [Truncated Output]Summary Net Link States (Area 3) Link ID ADV Router Age Seq# Checksum |
| R3#show ip ospf database
OSPF Router with ID (3.3.3.3) (Process ID 3) [Truncated Output]Summary Net Link States (Area 3) Link ID ADV Router Age Seq# Checksum |
Complete this task by filtering the Type 3 LSAs for the 150.1.1.0/24 and 150.2.2.0/24 from being advertised into area 3. The area <area> filter-list prefix <name> out command prevents Type 3 LSAs from being advertised out of the specified area(s):
| R1(config)#ip prefix-list FILTER seq 5 deny 150.1.1.0/24 R1(config)#ip prefix-list FILTER seq 7 deny 150.2.2.0/24 R1(config)#ip prefix-list FILTER seq 9 permit 0.0.0.0/0 le 32 R1(config)#router ospf 1 R1(config-router)#area 1 filter-list prefix FILTER in R1(config-router)#exit |
| R3(config)#ip prefix-list FILTER seq 5 deny 150.1.1.0/24 R3(config)#ip prefix-list FILTER seq 7 deny 150.2.2.0/24 R3(config)#ip prefix-list FILTER seq 9 permit 0.0.0.0/0 le 32 R3(config)#router ospf 3 R3(config-router)#area 1 filter-list prefix FILTER in R3(config-router)#exit |
Following this configuration, the LSDBs on R1 and R3 show:
| R1#show ip ospf database
OSPF Router with ID (1.1.1.1) (Process ID 1) Router Link States (Area 2) [Truncated Output]Summary Net Link States (Area 3) Link ID ADV Router Age Seq# Checksum |
| R3#show ip ospf database
OSPF Router with ID (3.3.3.3) (Process ID 3) [Truncated Output]Summary Net Link States (Area 3) Link ID ADV Router Age Seq# Checksum |
Final Router Configurations
R1
|
R1#term len 0 Current configuration : 1259 bytes R1# |
R2
|
R2#term len 0 Current configuration : 1014 bytes R2# |
R3
|
R3#term len 0 Current configuration : 1758 bytes R3# |
R4
|
R4#term len 0 Current configuration : 1073 bytes R4# |
