1 / 133

Ch. 7 – Distance Vector Routing Protocols Part 1 of 2: Distance Vector Routing and RIP

Ch. 7 – Distance Vector Routing Protocols Part 1 of 2: Distance Vector Routing and RIP. CCNA 1 version 3.0 Rick Graziani Cabrillo College. Overview. Describe how routing loops can occur in distance vector routing

russ
Download Presentation

Ch. 7 – Distance Vector Routing Protocols Part 1 of 2: Distance Vector Routing and RIP

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Ch. 7 – Distance Vector Routing ProtocolsPart 1 of 2: Distance Vector Routing and RIP CCNA 1 version 3.0 Rick Graziani Cabrillo College

  2. Overview • Describe how routing loops can occur in distance vector routing • Describe several methods used by distance vector routing protocols to ensure that routing information is accurate • Configure RIP • Use the ip classless command • Troubleshoot RIP • Configure RIP for load balancing • Configure static routes for RIP • Verify RIP • Configure IGRP (Part II) • Verify IGRP operation (Part II) • Troubleshoot IGRP (Part II) Rick Graziani graziani@cabrillo.edu

  3. Distance Vector Routing Updates Rick Graziani graziani@cabrillo.edu

  4. Distance Vector Routing Updates • RIP – Hop Count • IGRP and EIGRP – Bandwidth, Delay, Reliability, Load • Cisco’s OSPF – Bandwidth • IS-IS – Cost • BGP – Number of AS or policy No! MTU is never used as a routing metric. Some documentation is incorrect on this item. Rick Graziani graziani@cabrillo.edu

  5. FAQs FAQs – Network Discovery Q: How often does initial network discovery happen? A: Only when the network comes first comes up. Q: Do routers share routing table information after network discovery? A: Yes, distance-vector routing protocols share their entire routing tables periodically (with or without split horizon enabled). Distance vector routing protocols on Cisco routers by default use split horizon with poison reverse (discussed in the next section). Depending upon the distance-vector routing protocol, the frequency of the updates will happen for RIP every 30 seconds, IPX RIP every 60 seconds, and IGRP every 90 seconds. Q: What happens when there is a change in the topology, link goes down, new network is added, new router, is added, etc.? A: Let’s take a look. Rick Graziani graziani@cabrillo.edu

  6. Triggered Updates - Extra Triggered Updates • Routers do not have to wait for the periodic update to hear about changes in the network topology. • Improvements to the distance-vector algorithm is typically made in distance-vector routing protocols, like RIP, to include triggered updates. • Even with triggered updates, large distance vector networks can suffer from long convergence times in some situations. Rick Graziani graziani@cabrillo.edu

  7. Triggered Updates • Triggered updates are sent whenever a router sees a topology change or a change in routing information (from another router). • The router does not have to wait for the period timer, but can send them immediately. • Triggered updates do not need to include the entire routing table but only the modified route(s). • Triggered updates must still be sent to adjacent routers, from router to router, like other routing updates. Rick Graziani graziani@cabrillo.edu

  8. Triggered Updates • Most distance-vector routing protocols limit the frequency of triggered updates so that a flapping link does not put an unnecessary load on the network. (RIP: random 1 to 5 seconds) • Typically, triggered updates can be “triggered” by: • Interface transition to the up or down state • A route has entered or exited an unreachable (down) state (later) • A new route is installed in the routing table Rick Graziani graziani@cabrillo.edu

  9. Routing Loop Issues Routing Loops • Distance vector routing protocols are simple in their implementation and configuration, but this comes at a price. • Pure distance vector routing protocols suffer from possible routing loops. • Routing loops can cause major network problems, from packets getting lost (blackholed) in your network, to bringing down your entire network. • Several remedies to have been added to distance-vector algorithms to help prevent routing loops including: • Split horizon • Hold-down timers • Defining a maximum metric Rick Graziani graziani@cabrillo.edu

  10. Routing Loop Issues What can cause routing loops? • Routing loops can occur when there are: • Incorrect or inconsistent routing updates due to slow convergence after a topology change. (Example coming up next.) • Incorrect or incomplete routing information (see presentation on Discard Routes) • Static routes incorrectly configured with an intermediate address which does not become resolved in the routing table. (see presentation on Static Routes – Additional Information) Rick Graziani graziani@cabrillo.edu

  11. Routing Loop Issues Routing Loop Example • Assume for the remainder of this example that Router C’s preferred path to network 1 is by way of Router B. • Router C’s routing table has a distance of 3 to network 1 via Router B. Rick Graziani graziani@cabrillo.edu

  12. Routing Loop Issues Network 1 Fails • Router E sends an update to Router A. • Router A stops routing packets to network 1. • But Routers B, C, and D continue to do so because they have not yet been informed about the failure. • Router A sends out its update. • Routers B and D stop routing to network1, (via Router A). • However, Router C is still not updated. • To router C, network 1 is still reachable via router B. Rick Graziani graziani@cabrillo.edu

  13. Routing Loop Issues Router C sends a periodic update to Router D • Router C sends a periodic update to Router D indicating a path to network 1 (by way) of via Router B. (4 hops). Router D’s Routing Table information for Network 1 • Current path to Network 1 = Unreachable (down) • Information from Router C: Network 1 : 4 hops by way of Router C • Normally, RouterD ignores this routing information because it usually has a better route, 2 hops, via Router A, but this route is now down. • Router D changes its routing table to reflect this (good) better, but incorrectinformation, Network 1 by way of Router C (4 hops) • Router D propagates the information to Router A. Rick Graziani graziani@cabrillo.edu

  14. Routing Loop Issues Routers A changes its routing table • Router A adds new route to its routing table, get to Network 1 by way of Router D (5 hops). • Propagates the information to Routers B and E. Router B (and Router E) change their routing tables • Router B now believes it can get to Network 1 by way of Router A (6 hops). • Wow! I was about to tell Router C that Network 1 was down via Router B, but now I have new information! • Propagates the incorrect information to Router C. Rick Graziani graziani@cabrillo.edu

  15. Routing Loop Issues Router C changes its routing table • Router Cstill believes it can get to Network 1 by way of Router B (7 hops). • Of course now it believes it is 7 hops instead of 3. • Propagates the newer but still incorrect information to Router D. Here we go again! • Data packets destined for Network 1 get caught in a routing loop, from Routers A to D to C to B to A to D etc. • As routing updates continue between the routers, the hop count gets greater – to infinity? (Not quite – we will see in a moment.) Rick Graziani graziani@cabrillo.edu

  16. Defining a Maximum Problem: Count to infinity Solution: Defining a Maximum • Distance vector routing algorithms are self-correcting, but a routing loop problem can require a count to infinity. • To avoid this prolonged problem, distance vector protocols define infinity as a specific maximum number. • This number refers to a routing metric which may simply be the hop count. • When the metric value exceeds the maximum value, and as each router receives this maximum metric, the network is then considered unreachable. Rick Graziani graziani@cabrillo.edu

  17. Why only a 15 hop count limit? Question: Why does RIP use a hop count as the route metric, and why is its maximum value limited to 15? Answer: “When RIP was designed and implemented, dynamic routing protocols were not widely used. Instead, networks relied mostly on static routing. RIP, even with its hop-count-metric – which seems very poor to us today – was quite a big improvement. Counting intermediate routes is the simplest method to measure the quality of routes. Setting the infinity value for the metric is always a problem of choosing between wider networks and faster convergence when the protocol starts counting. When RIP was invented, it seemed unlikely to have a network with the maximum diameter more more than 15 routers, so 16 was chosen as the infinity value.” (Zinin, Cisco IP Routing) Rick Graziani graziani@cabrillo.edu

  18. Split Horizon • “The effect of split horizon is that a router will send out different routing messages on different interfaces. In effect a router never sends out information on an interface that it learned from that interface.” (Lewis, Cisco TCP/IP Routing) Rick Graziani graziani@cabrillo.edu

  19. Split Horizon • This example from the curriculum is not an example of split hoizon, but using hold-down timers. • “Split-horizon attempts to avoid this situation. If a routing update about Network 1 arrives from Router A, Router B or Router D cannot send information about Network 1 back to Router A. Split-horizon thus reduces incorrect routing information and reduces routing overhead.” • Initially, this is true, but the loop is a result of Router C sending out the updates, because it has not converged. Rick Graziani graziani@cabrillo.edu

  20. Simple Split Horizon Split Horizon Rule – Avoiding Routing Loops • Routers RTA and RTB have their initial routing tables and are ready to exchange routing information via a distance-vector routing protocol like RIP. Split Horizon disabled • If split horizon were disabled the routing updates would include all of the networks in their routing tables including their directly connected networks and any networks learned from any interface. Initial routing tables Rick Graziani graziani@cabrillo.edu

  21. Initial routing tables Split Horizon Disabled • After the initial exchange of updates everything in the routing tables look fine. • Because split horizon disabled, the 10.1.2.0/24 network is sent by both routers, but neither router includes the other’s route to 10.1.2.0/24 (1 hop) in the routing table, because it has a current route with a better metric of 0. 10.1.2.0/24 network is included because split horizon has been disabled New routing tables Rick Graziani graziani@cabrillo.edu

  22. Previous routing tables Split Horizon Disabled • After the next exchange of updates everything in the routing tables look fine and the routing tables are converged. • Because split horizon disabled, the besides the 10.1.2.0/24 network, the networks learned from the other router in the previous update is also sent by both routers. • However, neither router includes the those networks, because it has a current route with a better metric of 0. Networks in red were included because split horizon has been disabled New routing tables Rick Graziani graziani@cabrillo.edu

  23. Previous routing tables Split Horizon Disabled – 10.1.3.0/24 down • Note: Routing tables are not sent at the exactly same time. We will learn about this in Ch. 12 Routing Protocols, that this is done on purpose to avoid collisions on broadcast networks like Ethernet. • Here, the 10.1.3.0/24 network fails, and before RTB sends out its routing update, RTB receives a routing update from RTA. Networks in red were included because split horizon has been disabled New routing tables Rick Graziani graziani@cabrillo.edu

  24. Previous routing tables Split Horizon Disabled – 10.1.3.0/24 down • RTB notices that it has a route to 10.1.3.0/24 via RTA. Even though it is 2 hops it is certainly better than its current situation of “unreachable” so it accepts this better, but incorrect information from RTA. • RTB now forwards all packets destined for 10.1.3.0/24 to RTA at 10.1.2.1. • RTA receives these packets and forwards them to RTB at 10.1.2.2. • RTB forwards them back to RTA at 10.1.2.1. • And so on! The packets get blackholed in this routing loop. Networks in red were included because split horizon has been disabled New routing tables Rick Graziani graziani@cabrillo.edu

  25. Previous routing tables Split Horizon Disabled – 10.1.3.0/24 down • Meanwhile, its RTB’s turn to send its routing update. • RTB increments the hop count to 10.1.3.0/24 to 3 hops and sends it to RTA. • When RTA sends out its next routing table it will increment the hop count to 10.1.3.0/24 to 4 hops and sends it to RTB. • And on and on, until “infinity” which in RIP is 16 hops. Networks in red were included because split horizon has been disabled New routing tables Rick Graziani graziani@cabrillo.edu

  26. Simple Split Horizon Split Horizon Disabled • Once both routers have 16 hops for 10.1.3.0/24, they will both mark this network as unreachable and discontinue forwarding, drop, packets to this network. • This temporary routing loop can be easily avoided by enabling split horizon on the serial 0 interfaces. • Split horizon rule states that router never sends out information on an interface that it learned from that interface • Let’s see! Rick Graziani graziani@cabrillo.edu

  27. Split Horizon Enabled Previous routing tables New routing tables Rick Graziani graziani@cabrillo.edu

  28. Previous routing tables Split Horizon Enabled • As you can see, with split horizon enabled, RTA does not send RTB (out s0) information about 10.1.3.0/24 because it learned it from RTB (sames0), and RTB does not send RTA (out s0) information about 10.1.1.0/24 to RTA because it learned it from RTA (same s0). (This also includes the common network between them. New routing tables Rick Graziani graziani@cabrillo.edu

  29. Previous routing tables Split Horizon Enabled – 10.1.3.0/24 down • RTB notices 10.1.3.0/24 is down and puts this route into hold-down state in its routing table. (hold-down coming next) • RTB immediately sends out a triggered update for only this route (if there were others in the routing table) with a metric of infinity, 16. • RTA receives the triggered update and puts the route for 10.1.3.0/24 into hold-down state. New routing tables Rick Graziani graziani@cabrillo.edu

  30. Previous routing tables Split Horizon Enabled – 10.1.3.0/24 down • Notice that RTA never sends RTB a routing update for 10.1.3.0/24, because split horizon is enabled on these interfaces. New routing tables Rick Graziani graziani@cabrillo.edu

  31. Split Horizon with Poison Reverse Split Horizon with Poison Reverse • Many vendor implementations of distance vector routing protocols like Cisco’s RIP and IGRP apply a special kind of split horizon, called split horizon with poison reverse. • “Split horizon with poison reverse means that, instead of not advertising routes to the source, routes are advertised back to the source with a metric of 16, which will make the source router ignore the route. It is perceived that explicitly telling a router to ignore a route is better than not telling it about the route in the first place.” (Lewis, Cisco TCP/IP Routing) • One drawback is that routing update packet sizes will be increased when using Poison Reverse, since they now include these routes. “Poisoned” routes in red. Routing tables remain the same. Rick Graziani graziani@cabrillo.edu

  32. Split Horizon with Poison Reverse Split Horizon Enabled by Default Split horizon with poison reverse is enabled by default for all interfaces except: • Physical interfaces or multipoint sub-interfaces using Frame Relay or SMDS encapsulation (CCNA Semester 4 and CCNP) To disable split horizon on an interface: Router(config-if)# no ip split-horizon To enable split horizon on an interface: Router(config-if)# ip split-horizon “Poisoned” routes in red. Rick Graziani graziani@cabrillo.edu

  33. Route poisoning • When route poisoning is used with triggered updates it will speed up convergence time because neighboring routers do not have to wait 30 seconds before advertising the poisoned route. Rick Graziani graziani@cabrillo.edu

  34. Preventing routing loops with holddown timers • The main function of holddown timers is to prevent the distance vector routing protocol from establishing routing loops during periods of network transition (topology changes). • “The rule: Once a route is marked unreachable, it must stay in this state for a period of time assumed sufficient for all routers to receive new information about the unreachable network. In essence, we instruct the routers to let the rumors calm down and then to pick up the truth.” (Zinin, Cisco IP Routing) • The amount of time a router remains in “this state” is determined by the holddown timer. Rick Graziani graziani@cabrillo.edu

  35. Preventing routing loops with holddown timers Curriculum • A count to infinity problem can be avoided by using holddown timers. • When a router receives an update from a neighbor indicating that a previously accessible network is now inaccessible, the router marks the route as inaccessible and starts a hold-down timer. Rick Graziani graziani@cabrillo.edu

  36. Preventing routing loops with holddown timers Same Route from same neighbor: Network is back up (Correct News) • If at any time before the hold-down timer expires an update is received from the same neighbor indicating that the network is again accessible, the router marks the network as accessible and removes the hold-down timer. Rick Graziani graziani@cabrillo.edu

  37. Preventing routing loops with holddown timers Better Route from different neighbor (Correct News) • If at any time before the hold-down timer expires an update arrives from a different neighboring router with a better metric than originally recorded for the network, the router marks the network as accessible and removes the hold-down timer. Rick Graziani graziani@cabrillo.edu

  38. Preventing routing loops with holddown timers Poorer Route from a different neighbor. (Incorrect News) • If at any time before the hold-down timer expires an update arrives from a different neighboring router with a poorer metric than originally recorded for the networkthe update is ignored and the hold-down timer continues. • Ignoring an update with a poorer metric when a hold-down is in effect allows more time for the knowledge of a disruptive change to propagate through the entire network. Rick Graziani graziani@cabrillo.edu

  39. Preventing routing loops with holddown timers Additional Information on Holddown Timers Flapping routes • Holddown timers not only help prevent routing loops during transient periods but also help network stability by dampening unstable, flapping routes (routes which continuously go up and down). Holddown Time • As we will see with both RIP and IGRP, the amount of time the router remains in the holddown state can be modified (with caution!), even set to 0. • We will look at this later in the presentations on RIP and IGRP. Rick Graziani graziani@cabrillo.edu

  40. Preventing routing loops with holddown timers Additional Information on Holddown Timers Packet forwarding • Even though routing tables remain constant and routers do not accept potentially bad updates, an interesting question is whether or not routers should continue use the existing routes that are in holddown state for forwarding packets? • “In practice, routes in the holddown state are used for packet forwarding. In the worst case, packets are forwarded toward the router that was previously connected to the destination network, which drops them. In the best case, they are forwarded along a potentially suboptimal but valid path.” (Zinin, Cisco IP Routing) Rick Graziani graziani@cabrillo.edu

  41. Avoiding routing loops with triggered updates • Triggered update is sent immediately in response to some change in the routing table. • The router that detects a topology change immediately sends an update message to adjacent routers that, in turn, generate triggered updates notifying their adjacent neighbors of the change. • When a route fails, an update is sent immediately rather than waiting on the update timer to expire. • Triggered updates, used in conjunction with route poisoning, ensure that all routers know of failed routes before any holddown timers can expire. Rick Graziani graziani@cabrillo.edu

  42. IP’s TTL – Time To Live field Let’s look at a related item in IP, the TTL field. Taken from information added to Ch. 9 TCP/IP. Rick Graziani graziani@cabrillo.edu

  43. IP’s TTL – Time To Live field • When a packet is first generated a value is entered into the TTL field. • Originally, the TTL field was the number of seconds, but this was difficult to implement and rarely supported. • Now, the TTL is now set to a specific value which is then decremented by each router. Rick Graziani graziani@cabrillo.edu

  44. IP’s TTL – Time To Live field • If the router decrements the TTL field to 0, it will then drop the packet (unless the packet is destined specifically for the router, I.e. ping, telnet, etc.). • Common operating system TTL values are: • UNIX: 255 • Linux: 64 or 255 depending upon vendor and version • Microsoft Windows 95: 32 • Other Microsoft Windows operating systems: 128 Decrement by 1, if 0 drop the packet. Rick Graziani graziani@cabrillo.edu

  45. http://www.switch.ch/docs/ttl_default.html TTL Overview - Disclaimer: The following list is a best effort overview of some widely used TCP/IP stacks. The information was provided by vendors and many helpful system administrators. We would like to thank all these contributors for their precious help ! SWITCH cannot, however, take any responsibility that the provided information is correct. Furthermore, SWITCH cannot be made liable for any damage that may arise by the use of this information. +--------------------+-------+---------+---------+ | OS Version |"safe" | tcp_ttl | udp_ttl | +--------------------+-------+---------+---------+ AIX n 60 30 DEC Pathworks V5 n 30 30 FreeBSD 2.1R y 64 64 HP/UX 9.0x n 30 30 HP/UX 10.01 y 64 64 Irix 5.3 y 60 60 Irix 6.x y 60 60 Linux y 64 64 MacOS/MacTCP 2.0.x y 60 60 OS/2 TCP/IP 3.0 y 64 64 OSF/1 V3.2A n 60 30 Solaris 2.x y 255 255 SunOS 4.1.3/4.1.4 y 60 60 Ultrix V4.1/V4.2A n 60 30 VMS/Multinet y 64 64 VMS/TCPware y 60 64 VMS/Wollongong 1.1.1.1 n 128 30 VMS/UCX (latest rel.) y 128 128 MS WfW n 32 32 MS Windows 95 n 32 32 MS Windows NT 3.51 n 32 32 MS Windows NT 4.0 y 128 128 • Assigned Numbers (RFC 1700, J. Reynolds, J. Postel, October 1994): • IP TIME TO LIVE PARAMETER • The current recommended default time to live (TTL) for the Internet Protocol (IP) is 64. Safe: TCP and UDP initial TTL values should be set to a "safe" value of at least 60 today. Rick Graziani graziani@cabrillo.edu

  46. IP’s TTL – Time To Live field • The idea behind the TTL field is that IP packets can not travel around the Internet forever, from router to router. • Eventually, the packet’s TTL which reach 0 and be dropped by the router, even if there is a routing loop somewhere in the network. Decrement by 1, if 0 drop the packet. Rick Graziani graziani@cabrillo.edu

  47. RIP routing process • Request for Comments (RFC) 1058 • RIP has evolved over the years from a Classful Routing Protocol, RIP Version 1 (RIP v1), to a Classless Routing Protocol, RIP Version 2 (RIP v2). RIP v2 enhancements include: • Ability to carry additional packet routing information. • Authentication mechanism to secure table updates. • Supports variable length subnet masking (VLSM). Rick Graziani graziani@cabrillo.edu

  48. Configuring RIP Rick Graziani graziani@cabrillo.edu

  49. Configuring RIP RIP and IGRP: • Classful network statements only • IOS will take subnetted networks but will translate it into the classful network for the running-config. Rick Graziani graziani@cabrillo.edu

  50. Configuring RIP Rick’s Clarifications (This is for IGPs only and not EGPs such as BGP): • The network command does two things: 1. Determines which interfaces will participate in sending and receiving routing updates, as long as the interface IP address falls in the range of the network command. 2. Determines which networks this router will announce as being directly connected to in its routing updates to other routers. • The network numbers do not necessarily have to be based on the network class, as it depends on the routing protocol. Network numbers are based on the network class for RIP, IGRP, and usually EIGRP, but can be more specific for OSPF, EIGRP and IS-IS. Rick Graziani graziani@cabrillo.edu

More Related