CCNA Exploration: Routing Protocols and Concepts Chapter 11 Case Study Objectives: • • • • Consolidate OSPF knowledge. Describe the operation of OSPF multi-area. Introduce the concept of route summarization with OSPF. Introduce the concept of OSPF optimization. Intro: Trevni Inc. needed to add 6 more networks under R3 and called for help when the network performance dropped considerably. Topology: © 2009 Cisco Learning Institute CCNA Exploration: Routing Protocols and Concepts Chapter 11 Case Study Scenario: As expected, Trevni growth made necessary adding 6 more networks under R3 but some of the networks are flapping (going up and down in short time intervals) because they are still being tested. Flapping interfaces are a problem to OSPF because forces it to generate and flood extra LSAs to the other OSPF routers. The other OSPF routers, upon receipt of update LSAs, are forced to re-run SPF against their LSDBs. In Trevni’s case, R3 is advertising the change of state of its new links (due to interface flapping) to the rest of the network and forcing extra SPF re-runs. The extra SPF calculation is impacting Trevni’s routing performance. Step 1 – Splitting OSPF in areas Internal OSPF routers within the same area must have the exact same OSPF database. This leads OSPF routers within the same area to run SPF against their own LSDB every time a link change happens within the area. To avoid this problem, 2 techniques are used together: OSPF area segmentation and summary routes. When a specific route is part of a summary route and this specific route goes down, OSPF does not declare the entire summary route as down because the other routes included into the summary might be still up. Because in OSPF summarization can only be done by an ABR or an ASBR, you need to split Trevni’s network into areas to create an ABR and then summarize R3’s new networks into Area 0. Even if a few of the new networks go down, because they all inside a summary route, R1 and R2 won’t be aware of it and will keep the summary route into their routing tables. As shown on the topology above, R3 now has 6 more networks and you decide split Trevni’s OSPF domain in 2 areas. This will allow R4 (now an ABR) to summarize R3’s new networks into one single summary route and advertise it to Area 0, reducing the interface flapping negative impact in the network and improving performance. The areas will be Area 0 (backbone or transit area) and Area 1, a standard area. Area 0 will contain R1, R2 and all the networks connected to them while Area 1 will contain R3 and its networks. R4 will have links connected to Area 0 and to Area 1 which makes it the Area Border Router (ABR). Notice that because R4 also has an interface connected to environment external to the local OSPF AS, it is also acting as an Autonomous System Border Router (ASBR). Question 1: How segmenting OSPF area does improve Trevni network’s routing performance? Answer: By splitting OSPF domain into areas allows smaller OSPF databases (LSDBs), smaller routing table and less SPF calculations. Since R1 and R2 belong to a different area than R3, only R3 will deal with its interface flapping while R1 and R2 be won’t be aware of it. © 2009 Cisco Learning Institute CCNA Exploration: Routing Protocols and Concepts Chapter 11 Case Study You connect the console cable to R3 and change OSPF configuration in it. You start by adding up the just installed networks to R3’s OSPF process 1 (OSPF process ID 1 instance is being currently spoke with R4) and assigning them to area 1. Once the new networks were added, you remove network 3 (192.168.3.0/24) and network 200 (192.168.200.0/30) from OSPF 1 just to add them again back but assigned to area 1 rather than area 0. The commands issued into R3 are documented below for future reference: R3(config)# router R3(config-router)# R3(config-router)# R3(config-router)# R3(config-router)# R3(config-router)# R3(config-router)# ospf 1 no network 192.168.3.0 0.0.0.255 area 0 no network 192.168.200.0 0.0.0.255 area 0 network 192.168.3.0 0.0.0.255 area 1 network 192.168.30.0 0.0.0.255 area 1 network 192.168.200.0 0.0.0.3 area 1 end Question 2: Even though the new networks have subnet mask /27, the OSPF network command uses only one /24 subnet to add such network to OSPF instance 1. Is this correct? What about the other five /27 new networks, don’t they have to be added to OSPF process ID 1? Answer: Yes, it is correct. The mask used in the OSPF network command doesn’t relate to summaries, it only specifies the address range to be added to OSPF. The other networks were also added to OSPF by the single network command with the /24 mask. Because a /24 mask includes all the 6 new networks, only one network command is necessary to add all 6 new networks. OSPF summary routes are done differently. Still in R3, you issue sh ip ospf command to ensure OSPF was well configured. Everything is ok. Because of the area change, you allow a few seconds to OSPF recreate all the neighbor relationships based on the new area and switch the console cable to R4 (now the ABR) to check whether or not the changes were correctly advertised by R3. Below is the output of a sh ip route issued in R4: R4# sh 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 200.200.200.123 to network 0.0.0.0 C O O O O O O 200.200.200.0/24 is directly connected, Serial0/1 192.168.30.0/32 is subnetted, 6 subnets 192.168.30.97 [110/782] via 192.168.200.2, 03:26:01, Serial0/3/1 192.168.30.65 [110/782] via 192.168.200.2, 03:26:01, Serial0/3/1 192.168.30.33 [110/782] via 192.168.200.2, 03:26:01, Serial0/3/1 192.168.30.1 [110/782] via 192.168.200.2, 03:26:01, Serial0/3/1 192.168.30.161 [110/782] via 192.168.200.2, 03:26:01, Serial0/3/1 192.168.30.129 [110/782] via 192.168.200.2, 03:26:01, Serial0/3/1 © 2009 Cisco Learning Institute CCNA Exploration: Routing Protocols and Concepts Chapter 11 Case Study C O O C O S* R4# 192.168.200.0/30 is subnetted, 1 subnets 192.168.200.0 is directly connected, Serial0/3/1 192.168.1.0/32 is subnetted, 1 subnets 192.168.1.1 [110/2] via 192.168.100.1, 03:26:13, Vlan20 192.168.2.0/32 is subnetted, 1 subnets 192.168.2.1 [110/2] via 192.168.100.2, 03:26:13, Vlan20 192.168.100.0/24 is directly connected, Vlan20 192.168.3.0/32 is subnetted, 1 subnets 192.168.3.1 [110/782] via 192.168.200.2, 03:26:08, Serial0/3/1 0.0.0.0/0 [1/0] via 200.200.200.123 R4’s routing table shows all the routes were correctly learnt from R3 via OSPF and placed in R4’s routing table. You issue a few pings from R4 to different IP addresses under the new networks. All of them are successful. You switch to R1 and also check its routing table. R1’s routing table is as below: R1# sh 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 192.168.100.100 to network 0.0.0.0 192.168.30.0/32 is subnetted, 6 subnets 192.168.30.97 [110/783] via 192.168.100.100, 00:00:51, FastEthernet0/0 192.168.30.65 [110/783] via 192.168.100.100, 00:00:51, FastEthernet0/0 192.168.30.33 [110/783] via 192.168.100.100, 00:00:51, FastEthernet0/0 192.168.30.1 [110/783] via 192.168.100.100, 00:00:51, FastEthernet0/0 192.168.30.161 [110/783] via 192.168.100.100, 00:00:51, FastEthernet0/0 192.168.30.129 [110/783] via 192.168.100.100, 00:00:52, FastEthernet0/0 192.168.200.0/30 is subnetted, 1 subnets O IA 192.168.200.0 [110/782] via 192.168.100.100, 00:21:01, FastEthernet0/0 C 192.168.1.0/24 is directly connected, Loopback1 192.168.2.0/32 is subnetted, 1 subnets O 192.168.2.1 [110/2] via 192.168.100.2, 00:21:04, FastEthernet0/0 C 192.168.100.0/24 is directly connected, FastEthernet0/0 192.168.3.0/32 is subnetted, 1 subnets O IA 192.168.3.1 [110/783] via 192.168.100.100, 00:21:04, FastEthernet0/0 O*E2 0.0.0.0/0 [110/1] via 192.168.100.100, 00:00:50, FastEthernet0/0 R1# O O O O O O IA IA IA IA IA IA Because R3 now is no longer into the same area as R1, all routes learnt from Area 1 are now flagged as OSPF inter-area routes (O IA) and placed into R1’s routing table, as expected. OSPF inter-area routes are advertised by the area’s ABR using Type 3 LSAs. You issue a few pings from R1 to different IP addresses under R3’s just added networks and watch flow successfully. You switch to R2 and check its routing table: it looks a lot like R1’s which is expected. Once more, you issue a few pings from (from R2 this time) to different IP addresses under R3’s. All pings are successful, OSPF area segmentation is complete. © 2009 Cisco Learning Institute CCNA Exploration: Routing Protocols and Concepts Chapter 11 Case Study Question 3: R1’s and R2’s have a route which was flagged as O*E2. What is the meaning of this? Answer: This route is the default route learnt from R4. R4 was configured to advertise its default route but because the network used by R4 to reach networks external to Trevni’s OSPF domain (the internet) was not included into R4’s OSPF’s process, OSPF advertises it as an External Route (O*E2). The star means that route was also flagged as a default route. Note: OSPF has 2 types of external routes: type 1 (E1) and type 2 (E2). E1 routes have their metric updated as they travel through the internal OSPF routers while E2 routes keep their original metric untouched. OSPF uses E2 routes by default. Since area segmentation is complete, R4 is now the ABR and can summarize inter-area routes. By summarizing R3’s networks, R4 will inject one single summary route into Area 0, reducing the size of R1’s and R2’s routing tables and “hiding” all the interface flapping from them. Question 4: How a long routing table does impact the routing process? Answer: The routers have to search all the way through routing table in order to find a match and forward packets. The longer the routing tables, the longer the router will take looking through it before forwarding the packet. Because R1 and R2 must forward packets to R4 in order to reach the new networks under R3 and R4 is the ABR connecting area 0 to area 1, you decide to configure R4 to summarize the new networks into one single summary route and inject this single summary route into area 0. You switch back to R4 and configure the summarization. The commands are listed below: R4(config)# router ospf 1 R4(config-router)# area 1 range 192.168.30.0 255.255.255.0 R1(config-router)# end You check R4’s routing table once more and notice its routing table didn’t change much, as you expected. Since R4 is the ABR for area 1, it installs all the routes learnt from R3 into its routing table as internal routes. (as an ABR, R4 is part of area 0 and area 1 simultaneously) You switch the console cable to R1 and analyze its routing table. R1’s routing table, after the R4 was configured to summarize R3’s routes, is shown below: R1#sh 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 © 2009 Cisco Learning Institute CCNA Exploration: Routing Protocols and Concepts Chapter 11 Case Study o - ODR, P - periodic downloaded static route Gateway of last resort is 192.168.100.100 to network 0.0.0.0 O IA 192.168.30.0/24 [110/783] via 192.168.100.100, 00:02:16, FastEthernet0/0 192.168.200.0/30 is subnetted, 1 subnets O IA 192.168.200.0 [110/782] via 192.168.100.100, 00:39:48, FastEthernet0/0 C 192.168.1.0/24 is directly connected, Loopback1 192.168.2.0/32 is subnetted, 1 subnets O 192.168.2.1 [110/2] via 192.168.100.2, 00:39:48, FastEthernet0/0 C 192.168.100.0/24 is directly connected, FastEthernet0/0 192.168.3.0/32 is subnetted, 1 subnets O IA 192.168.3.1 [110/783] via 192.168.100.100, 00:39:49, FastEthernet0/0 O*E2 0.0.0.0/0 [110/1] via 192.168.100.100, 00:02:12, FastEthernet0/0 R1# R1’s routing table clearly shows the difference: Because of the single summary sent by R4, R1 now replaces all 6 routes by only one single summary route. This single summary route includes all the new 6 routes advertised by R3. You check R2’s routing table and notice it also installed the single summary route 192.168.30.0/24 pointing to R4. Question 4: Why, in R4’s routing table, the summary route points to null0? Answer: Cisco OSPF implementation automatically creates a summary route point to null0 into the router which generates the summary (in this case the ABR). This is done to keep packets to inexistent networks from be forwarded, by the ABR, via default route. As an example, suppose R1 pings 192.168.30.203/27. Because the summary route advertised by R4 includes the address pinged by R1, R1 would forward such pings to R4 but since the network 192.168.30.192/27 is not assigned to any interfaces (it is an inexistent network), R4 would have no route to it. R4 would wrongly forward such packets to its default route in a try to reach the destination. In other hand, if the destination network does exist, R4 would have specifically heard of it from R3 and would have installed a more specific route to it into its own routing table. R4, based on the longest match rule, would use the more specific route to forward packets rather the summary pointing to null0. After some monitoring, you conclude R1 and R2 are no longer performing unnecessary SPF calculations and have shorter and optimized LSDBs and Routing Tables. The routing processes on those 2 routers run faster and the overall performance of Trevni Inc. network has improved. © 2009 Cisco Learning Institute