CCNA Exploration: Routing Protocols and Concepts Chapter 2 Case Study Objectives: • • • • • Describe the general role a router plays in networks. Describe direct connected networks and the different router interfaces. Describe static routes with exit interfaces. Examine how packets get forwarded when using static routes. Identify how to manage and troubleshoot static routes. Intro: Yada Inc. emailed you; they are having issues with their network. According to their email, some of their internal PCs are not being able to reach the internet. Also, Yada people need an alternate link to the internet in the case of a failure on their main link. You decide to place a visit to their office to check the problem. Below is your summary about their problems/needs: 1. 2. PC1 is not able to reach the internet Set up an alternate internet link Topology: © 2009 Cisco Learning Institute CCNA Exploration: Routing Protocols and Concepts Chapter 2 Case Study The Scenario: You decide to begin by problem 1 and after it is solved, move on to the alternate internet link configuration. Problem 1 – PC1 reaches PC2 but fails reaching Internet According to Yada technical reports, PC1 does not reach the internet but reaches PC2 with no problems. You take a look on the topology handed to you (shown above). From PC1, you issue pings targeting a random address at the internet (www.cisco.com, for example). You watch while all packets are being dropped. You decide to ping hop by hop to identify the failure point. From PC1 you ping R1’s fa0/0 interface and since all pings are successful, you conclude the link between PC1 and R1’s fa0/0 interface is working fine. Based on the topology, a packet going to the internet from network 1 must do it via R4. From PC1, you send pings to R4’s fa0/1 interface. Again, the pings are successful. Still from PC1, you send a few packets to PC2. All pings from PC1 to PC2 are also successful Question 1: What those successful pings mean? Answer: It means: 1. PC1 is correctly configured (PC1’s default gateway information points correctly to R1’s fa0/0 IP address and PC1 has an unique network 1 IP address). 2. The link between R1 and R4 is working fine. 3. R4 has, inside its routing table, a route to network 1 and R1 has, inside its routing table, a route to network 4. Even though the entire path between PC1 and R4 is fine, PC1 is still not able to reach the internet. You decide to take a look at R1’s and R4’s routing tables. Their routing tables are listed 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 © 2009 Cisco Learning Institute CCNA Exploration: Routing Protocols and Concepts Chapter 2 Case Study Gateway of last resort is not set C 192.168.1.0 C 192.168.2.0 C 192.168.3.0 S 192.168.4.0 S 192.168.6.0 S 192.168.5.0 R1# is directly connected, FastEthernet0/0 is directly connected, FastEthernet0/1 is directly connected, Serial0/0 [1/50] via 192.168.2.2, Serial0/0 [1/50] via 192.168.2.2, Serial0/0 [1/50] via 192.168.3.2, Serial0/0 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 70.63.129.1 to network 0.0.0.0 C 70.63.129.0 C 192.168.2.0 C 192.168.6.0 C 192.168.4.0 S 192.168.1.0 R4# is directly connected, Serial0/1 is directly connected, FastEthernet0/1 is directly connected, Serial0/0 is directly connected, FastEthernet0/0 [1/50] via 192.168.2.1, FastEthernet0/1 Besides R4’s routing table looks ok, R1’s routing table reveals R1 has no default route information. This is keeping PC1 from reaching the internet. Question 2: Which line of R1’s routing table shows no default was configured? Answer: Gateway of last resort is not set Question 3: How a missing default route is keeping PC1 from reaching the internet but doesn’t keep it from reach network 4 which is also under R4? Answer: R1 has a route to network 4 and R4 also has a route to network 1. This allows R1 send/receive packets to/from network 4 but a random address on the internet (an address outside Yada’s network) match no route into R1’s routing table. Because R1 has no specific route to the internet address, it tries to send the packet using the default route which was not set. At this point, R1 is out of ways (routes) to route such packet and has no option but drop it. © 2009 Cisco Learning Institute CCNA Exploration: Routing Protocols and Concepts Chapter 2 Case Study You notice the problem and add a default route to R1’s routing table point to R4’s fa0/1 interface. The command used to create the new default route looks like this: R1(config)# ip route 0.0.0.0 0.0.0.0 192.168.2.2 50 Question 4: What is the number 50 on the command above used for? Answer: It is route’s administrative distance. You issue pings from PC1 again and all of them are successful this time. Problem 2 – Setting up an Alternate Link Yada Inc. also needs an alternate link to allow network 1 to reach the internet. The idea behind an alternate link is simple: The routing table must be configured in a way that allows a secondary route to automatically appear in the routing table in the case the main link fails. PC1 uses R1 to reach remote networks and R1, by its turn, uses R4’s fa0/1 interface as its main link to the internet. R1’s routing table must be adjusted to use R2’s serial0/0 interface as an alternate link to internet if the main link (R1’s fa0/1 interface) fails. R1 must also route packets through the main link again as soon as it gets back online. The alternate path to the internet will be: R1, R2, R3, R4 and Internet. Or more specifically: R1’s serial0/0, R2’s serial0/0, R2’s serial0/1, R3’s serial0/0, R3’s serial0/1, R4’s serial0/0, R4’s serial0/1 and finally the Internet. Before you make R1’s serial0/0 interface an alternate link you decide to make sure the entire alternate path is working. You double check the cables and connections between the routers with the proper tools and conclude no layer 1 or layer 2 problems exist within the topology. Since you are sure the network is free of layer 1 and 2 problems, you start looking for routing (layer 3) problems. To ensure no packets will be sent through R1’s se0/0, you place R1’s fa0/1 interface in administratively shutdown state. Question 5: What Cisco IOS command is used to place an interface in administratively shutdown state? © 2009 Cisco Learning Institute CCNA Exploration: Routing Protocols and Concepts Chapter 2 Case Study Answer: router(config-if)# shutdown R1’s fa0/1 is down. From PC1 you issue pings to: R1’s fa0/0 (192.168.1.1/24) – all pings are successful R2’s se0/0 (192.168.3.2/24) – all pings are successful R3’s se0/0 (192.168.5.2/24) – all pings are successful R4’s se0/0 (192.168.6.2/24) – all pings are successful cisco.com (or any other random address on the internet) – all pings fail No packets are traveling through R1’s fa0/1 and even though the pings from PC1 to Yada’s internal network devices are successful, pings from PC1 to a random address on internet fail. Because you ensured no layer 1 or 2 problems exists, you assume there is a layer 3 problem on one of the internal network devices. To find the failure point you decide to use a command called traceroute. As you know, traceroute sends packets to each hop (router), within a path, from a specific source to a specific destination and lists the addresses of the routers used on that path. Different platforms implement traceroute in different ways even though they are still the same tool. On Cisco IOS platform (as on most Unix systems), it is called traceroute but under MS Windows it is called tracert. Note: In order to speed things up, traceroute allows the tracing process to be done with no DNS reverse resolution at each hop (option –d on the command line - MS windows implementation). This keeps the source device from trying to resolve IP addresses back to DNS names at each router resulting in a IP address-only traceroute output. This option ensures faster traceroute responses because no per-hop address resolution is done. Notice that different platforms might have different option parameters to perform the same function. On this Case Study, all user PCs were running MS Windows. From PC1, you issue a non DNS reverse address resolution traceroute to cisco.com: C:\> tracert –d cisco.com Tracing route to cisco.com [198.133.219.25] over a maximum of 30 hops: 1 2 3 4 5 6 7 8 1 ms * * * * * * * 3 ms * * * * * * * 1 ms 192.168.1.1 * * * * * * * The output of traceroute shows R1 as the last hop reachable by PC1. © 2009 Cisco Learning Institute CCNA Exploration: Routing Protocols and Concepts Chapter 2 Case Study Question 6: How does traceroute work ? Answer : Traceroute takes advantage of the TTL (Time To Live) IPv4 header field and of ICMP ‘Time Exceeded’ messages. More information about Cisco IOS traceroute implementation can be found on cisco.com at: http://www.cisco.com/en/US/products/sw/iosswrel/ps1831/products_tech_note09186a00800a6057.shtml# traceroute Note: keep in mind that because traceroute depends on ICMP messages, it might lead to false routing failures if any of the routers within the path is configured not to send ICMP messages. Since the former default route in R1 used to point to R1’s fa0/1 interface which was brought administratively down by you (last step), R1’s default route was removed from the routing table. With no default route, R1 is not able to reach cisco.com or addresses out of Yada’s network. As you did before, you create a default route in R1 but pointing to R2’s serial 0/0 interface. Once the new default route is created in R1, you re-issue the traceroute command from PC1. The outout is shown below: C:\> tracert –d cisco.com Tracing route to cisco.com [198.133.219.25] over a maximum of 30 hops: 1 2 3 4 5 6 7 8 1 ms 2 ms * * * * * * 3 ms 1 ms * * * * * * 1 ms 192.168.1.1 1 ms 192.168.3.2 * * * * * * Even though a default route point to R2 exists in R1, PC1 is still not able to reach the internet. The output of the last traceroute leads to a possible problem in R2. You decide to double-check its routing table to ensure it is ok: R2#sh ip route Codes: C - connected, S - static, I - IGRP, 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, E - EGP i - IS-IS, 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 S 192.168.1.0/24 [1/0] via 192.168.3.1 © 2009 Cisco Learning Institute CCNA Exploration: Routing Protocols and Concepts Chapter 2 Case Study C 192.168.3.0/24 is directly connected, Serial0/0 C 192.168.5.0/24 is directly connected, Serial0/1 S 192.168.6.0/24 [1/0] via 192.168.5.2 R2# As the routing table clearly reveals, R2 has no default routes set. Question 7: How does a lack of a default routes in R2 would keep PC1 from reaching internet but still allow it to reach the internal devices? Answer: R2’s routing table has routes to most of the internal networks which ensure partial internal connectivity (only partial because R2 would not be able to reach network 2 if necessary, no routes to it) but, because it has no default route, it does not know how forward packets with addresses different from the internal networks and ends up discarding them. You add a default route on R2’s routing table and issue pings from PC1 to cisco.com again. All pings are successful this time. Below is the successful traceroute output via the alternate path: C:\> tracert –d cisco.com Tracing route to cisco.com [198.133.219.25] over a maximum of 30 hops: 1 1 ms 3 ms 1 ms 192.168.1.1 2 1 ms 3 ms 1 ms 192.168.3.2 3 1 ms 3 ms 1 ms 192.168.5.2 4 1 ms 3 ms 1 ms 192.168.6.2 5 50 ms 51 ms 13 ms 70.63.129.1 . . output continues showing routers/hops . out on the internet listing all routers on . the path between PC1 and cisco.com . . . The connectivity through the alternate path is assured and now you need to set some of the internal devices to automatically adjust their routing tables when the main link changes its state. R1 and R4 are the routers which must have their routing tables/configuration adjusted. As you know, R1 and R4 must have two static routes to the same destination but pointing to different next hops. One of the routes will be active and placed on the routing tables as long as the main link to internet (the Ethernet link between R1 and R4) is operational. When the main link is down, the first route will be automatically replaced by the second one. Because routing tables only stores the best route to a destination, the static routes must have different administrative distances. If a router has 2 different routes to a same destination, the route with lower © 2009 Cisco Learning Institute CCNA Exploration: Routing Protocols and Concepts Chapter 2 Case Study administrative distance is considered more reliable by the router and therefore, a better route. The route with lower administrative distance will always be the one placed on the routing table. You check R1’s and R4’s configuration and notice that, even though R4 is already properly configured, no such configuration was done on R1 and thus, it will need to be adjusted. Here is part of the configuration you found was already correctly done on R4: R4# sh running | inc ip route ip route 192.168.1.0 255.255.255.0 192.168.2.1 ip route 192.168.1.0 255.255.255.0 192.168.6.1 ip route 192.168.2.0 255.255.255.0 192.168.6.1 ip route 192.168.3.0 255.255.255.0 192.168.2.1 ip route 192.168.3.0 255.255.255.0 192.168.6.1 ip route 192.168.5.0 255.255.255.0 192.168.2.1 ip route 192.168.5.0 255.255.255.0 192.168.6.1 ip route 0.0.0.0 0.0.0.0 70.63.129.1 50 60 50 50 60 50 60 Question 8: Why there is static route to reach network 192.168.2.0/24 in R4 if this network is direct connected to R4? Answer: The static route was created for redundancy. Since network 192.168.2.0/24 is assigned to an Ethernet link, it could happen more than 2 end devices (R1 and R4) be connected to it. If R4’s fa0/1 becomes unavailable, R4 would still be able to reach a device connected to 192.168.2.0/24 via R3. Since connected routes have smaller AD than static routes, the static route will only be placed in R4’s routing table if R4’s fa0/1 becomes unavailable. On R1, you create 2 default static routes but with different administrative distances: One using R4 as next hop and with administrative distance=50 and another pointing to R2 and administrative distance=60. The commands are listed below: R1(config)# ip route 0.0.0.0 0.0.0.0 192.168.2.2 50 R1(config)# ip route 0.0.0.0 0.0.0.0 192.168.3.2 60 Because on R1 the route via R4 has lower AD (AD=50) it is placed on the R1’s routing table. When the link between R1 and R4 is down, the first route becomes an invalid route (R1’s fa0/1 is down) and the R1 removes it from its routing table. Since the first route is no longer a valid route, the second route, AD=60, becomes the best route and is placed on the routing table. R1’s default route now uses R2 as its next hop. As soon as R1’s fa0/1 is up again, the lower AD assigned to the first route ensures it will replace the second route on the R1’s routing table allowing R1 to forward packets directly via R4 again. To ensure your configuration works, you issue a few traceroutes from PC1. The first one is done with R1’s fa0/1 up and running: R1(config)# int fa0/1 R1(config-if)# no shutdown © 2009 Cisco Learning Institute CCNA Exploration: Routing Protocols and Concepts Chapter 2 Case Study C:\> tracert –d cisco.com Tracing route to cisco.com [198.133.219.25] over a maximum of 30 hops: 1 1 ms 3 ms 1 ms 192.168.1.1 1 1 ms 3 ms 1 ms 192.168.2.2 2 50 ms 51 ms 13 ms 70.63.129.1 . . output continues showing routers/hops . out on the internet listing all routers on . the path between PC1 and cisco.com . . The output shows PC1 reaches the internet straight via R4 when R1’s fa0/1 is operational. This is the desired behavior. You shut R1’s fa0/1 interface down and run traceroute again from PC1: R1(config)# int fa0/1 R1(config-if)# shutdown C:\> tracert –d cisco.com Tracing route to cisco.com [198.133.219.25] over a maximum of 30 hops: 1 1 ms 3 ms 1 ms 192.168.1.1 1 1 ms 3 ms 1 ms 192.168.3.2 1 1 ms 3 ms 1 ms 192.168.5.2 1 1 ms 3 ms 1 ms 192.168.6.2 2 50 ms 51 ms 13 ms 70.63.129.1 . . output continues showing routers/hops . out on the internet listing all routers on . the path between PC1 and cisco.com . . According to traceroute output, when R1’s fa0/1 is down, PC1 reaches the internet using the alternate path via R2 which is also the desired behavior. Question 9: Why the link via R1’s fa0/1 chosen to be the main link? Answer: The path R1, R4, Internet is shorter and has an Ethernet link. Since the path R1, R2, R3, R4, Internet is longer and slower (all links are serial links). The first path is the best and elected the main link. © 2009 Cisco Learning Institute