1 / 76

Ch. 6– Routing Theory – Part 2 CCNA Semester 2 Originally by Rick Graziani, Instructor Modified by Prof. Yousif

Ch. 6– Routing Theory – Part 2 CCNA Semester 2 Originally by Rick Graziani, Instructor Modified by Prof. Yousif. Ch. 6 Routing - Part II. Routing Theory and. The success of dynamic routing depends on two basic router functions: 1. maintenance of a routing table

cameo
Télécharger la présentation

Ch. 6– Routing Theory – Part 2 CCNA Semester 2 Originally by Rick Graziani, Instructor Modified by Prof. Yousif

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. 6– Routing Theory – Part 2 CCNA Semester 2 Originally by Rick Graziani, Instructor Modified by Prof. Yousif

  2. Ch. 6 Routing - Part II Routing Theory and

  3. The success of dynamic routing depends on two basic router functions: 1. maintenance of a routing table 2. timely distribution of knowledge, in the form of routing updates, to other routers

  4. Dynamic routing relies on a routing protocol to share knowledge among routers. A routing protocol defines the set of rules used by a router when it communicates with neighboring routers. For example, a routing protocol describes: • how to send updates • what knowledge is contained in these updates • when to send this knowledge • how to locate recipients of the updates

  5. When a routing algorithm updates a routing table, its primary objective is to determine the best information to include in the table. • Each routing algorithm interprets what is best in its own way. The algorithm generates a number, called the metric value, for each path through the network. • Typically, the smaller the metric number, the better the path.

  6. These metrics will be discussed later or in CCNP Advanced Routing, with their appropriate Routing Protocols: • RIP – hop count • IGRP – bandwidth, delay, reliability, load • EIGRP – bandwidth, delay, reliability, load • OSPF – bandwidth • BGP – attribute values and shortest path

  7. Most routing algorithms can be classified as one of two basic algorithms: • distance vector • link state. The distance-vector routing approach determines the direction (vector) and the cost or metric (distance) to any link in the internetwork. • RIP, IPX RIP and IGRP (CCNA) • AppleTalk, RTMP and others (non-CCNA)

  8. The link-state (also called shortest path first) approach re-creates the exact topology of the entire internetwork (or at least the portion in which the router is situated). • OSPF • IS-IS

  9. The balanced hybrid approach combines aspects of the link-state and distance-vector algorithms. These are really distance-vector routing protocols which apply some of the advantages of a link-state routing protocols, and also known as advanced-distance-vector routing protocols. • EIGRP

  10. When all routers in an internetwork are operating with the same knowledge, the internetwork is said to have converged. • Fast convergence is a desirable network feature because it reduces the period of time in which routers would continue to make incorrect/wasteful routing decisions.

  11. Topics – (Continued) Part II. Routing Theory and Dynamic Routing Operations • Dynamic Routing Operations • Routing Metrics • Classes of Routing Protocols • Convergence • Distance Vector Routing Protocols • Distance Vector Concepts • Distance Vector Network Discovery • Simple Split Horizon (Introduction) • Distance Vector Network Discovery with Split Horizon • Network Discovery FAQs • Triggered Updates • Routing Loops • Count to Infinity • Defining a Maximum • Split Horizon • Split Horizon with Poison Reverse • Holddown Timers • TTL – IP’s Time-To-Live Field

  12. Distance Vector Concepts • The mathematical basis of the distance-vector routing protocols is the Bellman-Ford algorithm. • Pure distance-vector routing protocols suffer from long convergence times and possible temporary routing loops (more in a few moments). • There are remedies to some situations that may cause these problems which we will examine in a moment.

  13. Network Discovery and Routing Table Maintenance • Distance-vector-based routing algorithms pass periodic copies of a routing table between adjacent routers, from router to router. (RIP every 30 seconds, IPX RIP every 60 seconds, IGRP every 90 seconds). • These regular updates between routers help routers discover each other’s networks and communicate topology changes. • Routers only learn about other networks from adjacent routers, their directly connected neighbors. • Router D learned about Router A’s network 172.16.0.0/16 from Router C, who learned it from Router B, who learned it from Router A. • This is why distance-vector routing protocols are also known as routing by rumor. 172.16.0.0/16

  14. Distance-vector routing protocols do not allow routers to know the topology of the network, as they only know how far a network is (distance: hops) and which way to forward the packet (vector: exit interface). (Link-state routing protocols allow routers to see the exact network topology – later.) • Distances (hops) are cumulative from one router to the next

  15. How do routers learn about other networks and determine the best routes to these networks? • We will now look at the concepts of how this happens. • In Chapter 7 Routing Protocols, we will look at how RIP does this and view it happening!

  16. Distance-Vector Network Discovery Initial Routing Tables • The first routes entered in the routing table are directly connected networks, assigning a metric or cost of “0” (hop count for RIP). • See previous slides on IP Routing Table and Directly Connected Networks. • 00:28:56: RT: add 192.168.2.0/24 via 0.0.0.0, connected metric [0/0] • 00:28:56: RT: interface Ethernet0 added to routing table • Remember, these interfaces must be “up” and “up” • The next step is for routers to share their complete routing tables with any and all directly connected neighboring routers. • Distance-vector routing protocols do not maintain formal relationships with neighboring routers, I.e. they do not know who their neighboring routers are. • So how do they know who to send their routing tables to? Distance-vector routing protocols use a broadcast or multicast address to send out routing updates, although you can specify a unicast address. (later)

  17. Distance-Vector Network Discovery Sending Routing Tables to Neighbors • (Later, we will see another example with real IP addresses.) • In their routing updates to the neighboring router(s), distance-vector routing protocols include the following information for each network in their routing table: • Network address – This would normally be an ip network address. • The metric or cost (with RIP this is the number of hops, but can be other metrics for other distance-vector routing protocols). • Since we are using hops in this example, RIP increments the hop count by one in its routing table before sending out the routing update. • Next-hop address – This would normally be the ip address of the interface from which the routing update was sent. Sent via broadcast or multicast (later)

  18. Distance-Vector Network Discovery Routers Update their Routing Tables • A router will enter this update into its routing table if: • It is a new route, a network which is not currently in its routing table. • It is an existing route, a network which is currently in its routing table, but this update has a better (smaller) metric (fewer hops). • Note: If the update contains a route to an existing route, with the same metric (hops), but via a different interface, the router may or may not add it to its routing table depending upon whether or not the routing protocol is providing load balancing (later). RIP does provide this. • A router will not enter this update into its routing table if: • It is an existing route with a worse metric.

  19. Distance-Vector Network Discovery Routers Update their Routing Tables (continued) RTA: • Ignores the route to X because it has an existing, better route with a cost=0. • Accepts the route to Y because it didn’t exist in the routing table. RTB (from RTA): • Accepts the route to W because it didn’t exist in the routing table. • Ignores the route to X because it has an existing, better route with a cost=0. RTB (from RTC): • Ignores the route to Y because it has an existing, better route with a cost=0. • Accepts the route to Z because it didn’t exist in the routing table. RTC: • Accepts the route to X because it didn’t exist in the routing table. • Ignores the route to Y because it has an existing, better route with a cost=0. New Routing Tables

  20. Distance-Vector Network Discovery Next Round of Routing Updates • We have still not reached convergence, because all of the routers do not have complete and accurate network information. • Which router does have complete information? Which ones do not? • In the next round, routers must forward their new routing tables in the form of routing updates, to their directly connected neighbors. • Remember, with the distance-vector routing protocol RIP, the router increments the number of hops in its own routing table by one, before sending out the routing update. - “If it is one hop for me to get there, and you are getting there via me, then it is two hops for you.”

  21. Distance-Vector Network Discovery Routers Update their Routing Tables - again RTA: (Advertised Cost Compared to current local cost) • Ignores the route to X because it has an existing, better route with a cost=0. • Ignores the route to Y because it already has that route, with the same cost. • Ignores the route to W because it has an existing, better route with a cost=0. • “I am not going to send you the packet, so you can send it back to me, …” • Later, we will see that split-horizon prohibits this route from being sent. • Accepts the route to Z because it didn’t exist in the routing table.

  22. Distance-Vector Network Discovery Routers Update their Routing Tables – again (continued) RTB: • Ignores all routes from both RTA and RTC, because it already has those routes, with the same costs. • No new information.

  23. Distance-Vector Network Discovery Routers Update their Routing Tables - again RTC: • Ignores the route to X because it already has that route, with the same cost. • Ignores the route to Y because it has an existing, better route with a cost=0. • Accepts the route to W because it didn’t exist in the routing table. • Ignores the route to Z because it has an existing, better route with a cost=0. • “I am not going to send you the packet, so you can send it back to me, …”

  24. Distance-Vector Network Discovery Convergence! • All of the routers now have a consistent and accurate view of the network. • Later, we will see how RIP handles this operation.

  25. Note: The on-line curriculum has incorrect information regarding split horizon. Split Horizon Rule • Before we continue looking at routing tables and network discovery, using real ip addresses, let’s take a look at the split horizon rule. • “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) • As we will see later in this presentation, split horizon helps prevent routing loops. (Discussed in much more detail soon.) • For now, we will see that split horizon means that the router does not send out all of the information in the routing table to its neighbors. • Note: Usually, split horizon is enabled and can be disabled.

  26. Network Discovery with Split Horizon Network Discovery with Split Horizon • First of all, notice we are using real ip addresses. • In the routing updates, next-hop ip addresses for the networks are sent to the neighboring router specifying the address it can use to forward packets to. • The split horizon rule also affects common networks between two routers. • To the router, a directly connected network is known via its own interface, so it does not include that network in routing updates sent out that same interface. • In other words, the router does not send information about a directly connected network out the interface of that directly connected network. Initial routing tables

  27. Network Discovery with Split Horizon Network Discovery with Split Horizon - First Round of Updates • “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) RTA’s routing update sent out serial 0 to RTB • Includes the network 10.1.1.0/24 which RTB can reach via 10.1.1.1. • Split horizon: Does not include the 10.1.2.0/24 network because that network was learned via serial 0 (interface serial 0, ip address 10.1.1.1 …) – a common network between RTA and RTB.

  28. Network Discovery with Split Horizon Network Discovery with Split Horizon - First Round of Updates RTB’s routing update sent out serial 0 to RTA • Includes the network 10.1.3.0/24 which RTA can reach via 10.1.2.2. • Split horizon: Does not include the 10.1.2.0/24 network. Split horizon blocks the 10.1.2.0/24 update from being sent to RTA with a hop count of “1.” (Note: To keep the diagrams less cluttered, omission of the proper red/blue arrow means split horizon is in affect, same as the “X.”) RTB’s routing update sent out serial 1 to RTC • Includes the network 10.1.2.0/24 which RTC can reach via 10.1.3.1. • Split horizon: Does not include the 10.1.3.0/24 network.

  29. Network Discovery with Split Horizon Network Discovery with Split Horizon - First Round of Updates • Same with updates from RTC and RTD. Your Turn: • Write out the new routing tables for each router after this round. • Also, find any mistakes I might have made 

  30. Network Discovery with Split Horizon Answer – Do your routing tables look like these? Now – What do the next round of routing updates look like? Show the routes which are sent (propagated) and those that are not sent because of split horizon.

  31. Network Discovery with Split Horizon Answer – Do your routing updates look like these? • Again, omission of the red/blue arrow means split horizon is in affect. • For example, RTB is not sending the route 10.1.1.0/24 to RTA to tell RTA it can get to 10.1.1./24 in 2 hops via RTB. - This would make sense! • Split horizon - router never sends out information on an interface that it learned from that interface Now – What do the routing tables look like?

  32. Network Discovery with Split Horizon Answer – Do your routing tables look like these? Convergence? • Note: Newest routing table entries are at the bottom of the routing tables in these diagrams. Now – What do the next round of routing updates look like and the routing tables? (We’ll finish this up  )

  33. Network Discovery with Split Horizon Answer – Do your routing tables look like these? Convergence? – YES!

  34. Good Job!

  35. FAQs – Network Discovery Q: How often does initial network discovery happen? A: Only when the network 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.

  36. 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.

  37. Triggered updates: (continued) • 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).

  38. Triggered updates: (continued) • Triggered updates must still be sent to adjacent routers, from router to router, like other routing 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

  39. Routing Loops • Distance vector routing protocols are simple in their implementaton 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

  40. Routing Loops (continued) • 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)

  41. 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.

  42. 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.

  43. 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.

  44. 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.

  45. 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.)

  46. Counting to Infinity • The routing loop we just saw creates another problem, known as “Counting to Infinity.” • This condition, called count to infinity, loops packets continuously around the network in spite of the fundamental fact that the destination network, Network 1, is down. • While the routers are counting to infinity, the invalid information allows a routing loop to exist. • Without countermeasures to stop the process, the distance vector (metric) of hop count increments each time the packet passes through another router. - These packets loop through the network because of wrong information in the routing tables.

  47. Solution to Counting to Infinity: Defining a Maximum metric • Distance vector routing protocols remedy the problem by limiting the maximum number of hops for any route in the routing table. • When the distance vector routing protocol has a route with a metric that is more than its maximum-value, it is denoted as “infinity” and the route is considered “unreachable.” • For RIP the maximum-value is 15 (hops), infinity is 16 (hops). • For IGRP the maximum-value 100 (hops), infinity is 101 (hops). • IGRP uses bandwidth, delay, reliability and load for its metric in determining best path. • IGRP does not use hop count as this metric. Hop count is only used by IGRP to stop the counting to infinity behavior. (more later)

  48. Solution to Counting to Infinity: Defining a Maximum metric • Remember that distance vector routing protocols like RIP, increment the metric (hop count) before sending the routing update to their adjacent routers. • After incrementing the hop count, if the metric (hops) is less than 15, routing updates to other adjacent routes will receive a valid route for this network from this router. • After incrementing the hop count, if the metric (hop count) is equal to 15, this router will be able to route packets to this network, 15 hops away, but routing updates to other adjacent routers will have the incremented hop count of 16 (infinity). - This means other routers cannot reach this network via this router. • After incrementing the hop count, if the metric (hop count) is equal to 16,“infinity”, this router will not be able to route packets to this network. Routing updates to other adjacent routers will also have the hop count of 16 (infinity), which means they cannot reach this network via this router. • There is another situation where the router itself will modify the hop count to infinity – split horizon with poison reverse. – Coming up next!

  49. FAQs – Defining a maximum-value Q: Why does RIP use a hop count as the route metric, and why is its maximum value limited to 15? A: 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 of more than 15 routers, so 16 was chosen as the infinity value. (Zinin, Cisco IP Routing)

More Related