10.07.2015 Views

Chapter 4 Distance Vector Routing Protocols

Chapter 4 Distance Vector Routing Protocols

Chapter 4 Distance Vector Routing Protocols

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Chapter</strong> 4<strong>Distance</strong> <strong>Vector</strong><strong>Routing</strong> <strong>Protocols</strong>CCNA2-1 <strong>Chapter</strong> 4Note for Instructors• These presentations are the result of a collaboration amongthe instructors at St. Clair College in Windsor, Ontario.• Thanks must go out to Rick Graziani of Cabrillo College. Hismaterial and additional information was used as a referencein their creation.• If anyone finds any errors or omissions, please let me knowat:• tdame@stclaircollege.ca.CCNA2-2 <strong>Chapter</strong> 4


<strong>Distance</strong> <strong>Vector</strong> <strong>Routing</strong> <strong>Protocols</strong>Introduction to<strong>Distance</strong> <strong>Vector</strong> <strong>Routing</strong> <strong>Protocols</strong>CCNA2-3 <strong>Chapter</strong> 4Introduction to <strong>Distance</strong> <strong>Vector</strong>• There are advantages and disadvantages to using any typeof routing protocol.• Understanding the operation of distance vector routing iscritical to enabling, verifying, and troubleshooting theseprotocols.CCNA2-4 <strong>Chapter</strong> 4


Introduction to <strong>Distance</strong> <strong>Vector</strong>Static Routes?CCNA2-5 <strong>Chapter</strong> 4Introduction to <strong>Distance</strong> <strong>Vector</strong>• <strong>Routing</strong> Information Protocol (RIP):• Metric: Hop count.• A hop count greater than 15 means that the network isunreachable.• Periodic routing updates.• Entire routing table is broadcast every 30 seconds.• Enhanced Interior Gateway <strong>Routing</strong> Protocol (EIGRP):• Cisco proprietary.• Composite metric: Bandwidth, delay, reliability and load.• It uses Diffusing Update Algorithm (DUAL) to calculatethe shortest path.• No periodic updates.• Multicast updates only on a change in topology.CCNA2-6 <strong>Chapter</strong> 4


Meaning of <strong>Distance</strong> <strong>Vector</strong>• The routing protocol does not know the entire topology of anetwork.• It only knows the routing information received from itsneighbors.• A <strong>Distance</strong> <strong>Vector</strong> routing protocol does not have theknowledge of the entire path to a destination network.CCNA2-7 <strong>Chapter</strong> 4Meaning of <strong>Distance</strong> <strong>Vector</strong>• A <strong>Distance</strong> <strong>Vector</strong> routing protocol does not have theknowledge of the entire path to a destination network.Network 172.16.3.0/24:• is 1 hop away (<strong>Distance</strong>)• through interface s0/0/0 (<strong>Vector</strong>)CCNA2-8 <strong>Chapter</strong> 4


Operation of <strong>Distance</strong> <strong>Vector</strong>• Periodic Updates:• Some distance vector routing protocols periodicallybroadcast the entire routing table to each of its neighbors(RIP – every 30 seconds).• Inefficient:Updates consume bandwidth androuter CPU resources.• Periodic updates are always sent even there havebeen no changes for weeks or months.• Router is only aware of the:• Network addresses of its own interfaces.• Network addresses the neighbors running thesame routing protocol.CCNA2-9 <strong>Chapter</strong> 4Operation of <strong>Distance</strong> <strong>Vector</strong>• Periodic Updates:R1 Update Timer expiresNeighbour of R1Updatessent.Broadcast!R1 is unaware ofR3 and its networksNeighbour of R1CCNA2-10 <strong>Chapter</strong> 4


<strong>Routing</strong> Protocol Algorithms• The algorithm used by aparticular routing protocolis responsible for buildingand maintaining therouter’s s routing table.• Defines the followingprocesses:• Mechanism for sending and receiving routing information.• Mechanism for calculating the best paths and installingroutes in the routing table.• Mechanism for detecting and reacting to topologychanges.CCNA2-11 <strong>Chapter</strong> 4<strong>Routing</strong> Protocol AlgorithmsCalculate Send Best UpdatePath and InstallRoutePeriodic UpdateUPDATE172.16.1.0/24 1172.16.1.0/24 S0/0/0 1CCNA2-12 <strong>Chapter</strong> 4


<strong>Routing</strong> Protocol AlgorithmsCalculate Send Best UpdatePath and InstallRoutePeriodic UpdateUPDATE172.16.3.0/24 S0/0/0 1172.16.3.0/24 1172.16.1.0/24 S0/0/0 1CCNA2-13 <strong>Chapter</strong> 4<strong>Routing</strong> Protocol AlgorithmsDetect and React to Topology ChangesTriggered UpdateUPDATEX172.16.3.0/24 (DOWN) 1172.16.3.0/24 (DOWN) 1172.16.3.0/24 S0/0/0 1 172.16.1.0/24 S0/0/0 1CCNA2-14 <strong>Chapter</strong> 4


<strong>Routing</strong> Protocol Characteristics• Other ways to compare routing protocols:• Time to convergence:• Faster the better.• Scalability:• How large a network the routing protocol can handle.• Classless or Classful:• Support VLSM and CIDR.• Resource usage:• <strong>Routing</strong> protocol usage of RAM, CPU utilization, andlink bandwidth utilization.• Implementation and maintenance:• Level of knowledge of a network administrator.CCNA2-15 <strong>Chapter</strong> 4Comparing <strong>Routing</strong> Protocol FeaturesFeature<strong>Distance</strong> <strong>Vector</strong> <strong>Routing</strong> <strong>Protocols</strong>RIPv1RIPv2EIGRPSpeed of Convergence Slow Slow FastScalability Small Small LargeSupports VLSM No Yes YesResource Usage Low Low MediumImplementation Simple Simple ComplexCCNA2-16 <strong>Chapter</strong> 4


<strong>Distance</strong> <strong>Vector</strong> <strong>Routing</strong> <strong>Protocols</strong>Network DiscoveryCCNA2-17 <strong>Chapter</strong> 4Cold Start• Network Discovery:• Is part of the process of the routing protocol algorithmthat enables routers to learn about remote networks forthe first time.CCNA2-18 <strong>Chapter</strong> 4


Cold Start• When a router powers up:• Knows nothing about the network topology.• Knows only the information saved in NVRAM.• Sends updates about its known networks out all ports.CCNA2-19 <strong>Chapter</strong> 4Initial Exchange of <strong>Routing</strong> Information10.1.0.0• Sends an update about network 10.1.0.0 out the Serial 0/0/0interface with a metric of 1.• Sends an update about network 10.2.0.0 out the Fa0/0interface with a metric of 1.CCNA2-20 <strong>Chapter</strong> 4


Initial Exchange of <strong>Routing</strong> Information• First round of update exchanges: : Each router knows aboutthe connected networks of its directly connected neighbors.• When the update timers expire (Periodic Update), , the routersbegin the next exchange of information.CCNA2-25 <strong>Chapter</strong> 4Next Exchange of <strong>Routing</strong> Information• Sends an update about network 10.1.0.0 out the S0/0/0interface with a metric of 1 - AGAIN!• When R2 receives the update, , there is no change ininformation so the update is ignored.CCNA2-26 <strong>Chapter</strong> 4


Next Exchange of <strong>Routing</strong> InformationNEWNEW10.3.0.010.4.0.010.1.0.010.2.0.0• Sends an update about networks 10.3.0.0 with a metric of 1and 10.4.0.0 with a metric of 2 out the Serial 0/0/0 interface.• Sends an update about networks 10.1.0.0 with a metric of 2and 10.2.0.0 with a metric of 1 out the Serial 0/0/1 interface.CCNA2-27 <strong>Chapter</strong> 4Initial Exchange of <strong>Routing</strong> Information10.4.0.0• Sends an update about network 10.4.0.0 out the S0/0/0interface with a metric of 1 - AGAIN!• When R2 receives the update, , there is no change ininformation so the update is ignored.CCNA2-28 <strong>Chapter</strong> 4


Next Exchange of <strong>Routing</strong> Information10.3.0.010.4.0.0• R1 receives an update from R2 about network 10.3.0.0 andthere is no change – update ignored.• R1 receives an update from R2 about network 10.4.0.0 (new)and adds it to its routing table.CCNA2-29 <strong>Chapter</strong> 4Next Exchange of <strong>Routing</strong> Information10.1.0.010.2.0.0• R3 receives an update from R2 about network 10.2.0.0 andthere is no change – update ignored.• R3 receives an update from R2 about network 10.1.0.0 (new)and adds it to its routing table.CCNA2-30 <strong>Chapter</strong> 4


Next Exchange of <strong>Routing</strong> Information• The network has CONVERGED!• All routers now know about all of the networks attached toall of their neighbouring routers.CCNA2-31 <strong>Chapter</strong> 4Convergence• The amount of time ittakes for a network toconverge is directlyproportional to thesize of that network.• <strong>Routing</strong> protocols arecompared based onhow fast they canpropagate this information - their speed to convergence.• A network is not completely operable until it has converged.• Network administrators prefer routing protocols withshorter convergence times.CCNA2-32 <strong>Chapter</strong> 4


<strong>Distance</strong> <strong>Vector</strong> <strong>Routing</strong> <strong>Protocols</strong><strong>Routing</strong> Table MaintenanceCCNA2-33 <strong>Chapter</strong> 4<strong>Routing</strong> Table Maintenance• <strong>Routing</strong> protocols must maintain the routing tables so thatthey have the most current information.• How it is maintained depends upon:• The type of routing protocol(distance vector, link state, path state)• The routing protocol itself (RIP, EIGRP, OSPF)CCNA2-34 <strong>Chapter</strong> 4


<strong>Routing</strong> Table Maintenance• <strong>Distance</strong> <strong>Vector</strong> Updates:• Periodic• Bounded• TriggeredCCNA2-35 <strong>Chapter</strong> 4Periodic Updates• A router sends the complete routing table to its neighbors ata predefined interval.• RIP – every 30 seconds.• Link failure, New Link, Router Failure, Link parameterchange.CCNA2-36 <strong>Chapter</strong> 4


Periodic Updates - RIP Timers• Invalid Timer:• If an update has notbeen received in180 seconds(the default), the route is marked as invalid by setting themetric to 16.• Route still is in routing table.• Flush Timer: 240 seconds (default)• When the flush timer expires, the route is removed fromthe routing table.• Hold-down down Timer:• Helps stabilize routing information and helps preventrouting loops. (Much more later!)CCNA2-37 <strong>Chapter</strong> 4Periodic Updates – Verifying RIP TimersElapsed time since lastupdate.CCNA2-38 <strong>Chapter</strong> 4


Triggered Updates• Speeds up convergence.• Sent when one of the following events occurs:• An interface changes state (up or down).• A route has entered (or exited) the unreachable state.• A route is installed in the routing table.CCNA2-41 <strong>Chapter</strong> 4<strong>Distance</strong> <strong>Vector</strong> <strong>Routing</strong> <strong>Protocols</strong><strong>Routing</strong> LoopsCCNA2-42 <strong>Chapter</strong> 4


Defining a <strong>Routing</strong> Loop• A routing loop is a condition in which a packet is continuouslytransmitted within a series of routers without ever reaching itsintended destination network.• The loop can be a result of:• Incorrectly configured static routes.• Incorrectly configured route redistribution.• Inconsistent routing tables not being updated because ofslow convergence in a changing network.• <strong>Distance</strong> vector routing protocols are simple in theirimplementation and configuration, but this comes at a price.• Pure distance vector routing protocols suffer from possiblerouting loops.CCNA2-43 <strong>Chapter</strong> 4Implications of <strong>Routing</strong> Loops• A routing loop can have adevastating effect on a network,resulting in degraded networkperformance or even networkdowntime.• Link bandwidth will be usedfor traffic looping back andforth between the routers.• A router’s s CPU will beburdened with useless packet forwarding.• <strong>Routing</strong> updates might get lost or not be processed in atimely manner, making the situation even worse.• Packets might get lost in black holes, , never reaching theirintended destinations.CCNA2-44 <strong>Chapter</strong> 4


<strong>Routing</strong> Loop - Example• Network 1 Fails.• Router E sendsan update toXRouter A.X• Router A stopsrouting packetsto Network 1.• But Routers B, C, and D continue to do so because theyhave 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.CCNA2-45 <strong>Chapter</strong> 4XX<strong>Routing</strong> Loop - Example• Router C thinksnetwork 1 isstill 3 hops away.X• Sends a periodicupdate toRouter D.3• This update says:A path to network 1 exists by way of Router B andnetwork 1 is 4 hops away.CCNA2-46 <strong>Chapter</strong> 4


<strong>Routing</strong> Loop - Example• Router D routingtable informationfor Network 1.• Current path toNetwork 1= Unreachable3XX• Update from Router C:Network 1 is 4 hops by way of Router C• Normally, Router D ignores this routing information becauseit usually has a better route (2 hops via Router A) but thisroute is now down.CCNA2-47 <strong>Chapter</strong> 4<strong>Routing</strong> Loop - Example• Router Dchanges itsrouting table toreflect thisbetter, butincorrectinformation.34XNetwork 1 is available by way of Router C (4 hops)• Router D propagates the information to Router A.CCNA2-48 <strong>Chapter</strong> 4


<strong>Routing</strong> Loop - Example• Router Achanges itsrouting table.X354• Router A adds a new route to its routing table:Network 1 is available by way of Router D (5 hops).• Propagates the information to Routers B and E.CCNA2-49 <strong>Chapter</strong> 4<strong>Routing</strong> Loop - Example• Router B andRouter Echange theirrouting tables.365X4• Router B now believes:• Network 1 is available by way of Router A (6 hops).“Wow!I was about to tell Router C that Network 1was down, but now I have new information!”• Router B sends the incorrect information to Router C.CCNA2-50 <strong>Chapter</strong> 4


<strong>Routing</strong> Loop - Example• Router Cchanges itsrouting table.X37645X• Router C still believes:Network 1 is available by way of Router BBut now it believes its 7 hops instead of 3!• Propagates the incorrect information to Router D.CCNA2-51 <strong>Chapter</strong> 4<strong>Routing</strong> Loop - Example• Here we goagain!• The routerskeep sendingdata packetsand updates!• BUT……Router A thinks Network 1 is available via Router D.Router D thinks Network 1 is available via Router C.Router C thinks Network 1 is available via Router B.Router B thinks Network 1 is available via Router A.XCCNA2-52 <strong>Chapter</strong> 4


<strong>Routing</strong> Loop - ExampleXBy the way, Network 1is STILL down!• Data packets destined for Network 1 get caught in a routingloop, from Routers A to D to C to B to A to D etc.• As routing updates continue between the routers, the hopcount gets greater – to infinity? (Not quite – we will see in amoment.)CCNA2-53 <strong>Chapter</strong> 4Count-toto-Infinity ConditionX• Count to infinity is a condition that exists when inaccuraterouting updates increase the metric value to infinity for anetwork that is no longer reachable.• Each protocol defines infinity at a different value.• When the metric value exceeds the maximum value, andas each router receives this maximum metric, the networkis then considered unreachable.CCNA2-54 <strong>Chapter</strong> 4


Count-toto-Infinity ConditionX• RIP defines infinity as 16 hops.• When the routers “count to infinity,” they mark the routeas unreachable.CCNA2-55 <strong>Chapter</strong> 4Hold-Down Timers• Hold-Down timers are used to prevent regular updatemessages from inappropriately reinstating a route that mayhave gone bad.• They instruct routers to hold any changes that mightaffect routes for a specified period of time.XCCNA2-56 <strong>Chapter</strong> 4


Hold-Down Timers• If a route is identified as down or possibly down, any otherinformation for that route containing the same status, orworse, is ignored for a predetermined amount of time (thehold-down down period).• This means that routers will leave a route marked asunreachable in that state for a period of time that is longenough for updates to propagate the routing tables with themost current information.XCCNA2-57 <strong>Chapter</strong> 4Split Horizon Rule• Split Horizon:• Is another method used to prevent routing loops.• The split horizon rule says that a router should notadvertise a network through the interface from which theupdate came.CCNA2-58 <strong>Chapter</strong> 4


Split Horizon RuleBAe0s0X• Router 1 sends an update to Router 2 that Network A isavailable and Router 2 updates its routing table with theinformation.• Router 2 recognizes a change in topology.• This would normally trigger an update to neighbouring routersand cause a routing loop.• With split horizon enabled, Router 2 realizes it received theinformation from Router 1 and does not send the update.CCNA2-59 <strong>Chapter</strong> 4Split Horizon RuleWouldSplit Horizonavoid therouting loopin ourexample?X• When Network 1 went down, Router E sent an update toRouter A.• Router A then sent an update to Routers B and D that Network1 was no longer available.• Router C then sent an update to Router D that Network 1IS available.CCNA2-60 <strong>Chapter</strong> 4


Split Horizon RuleWouldSplit Horizonavoid therouting loopin ourexample?I need HOLD to IT!sendNO an update! WAY!X• Here is where split horizon comes in……• With Split Horizon disabled, , Router D would send anupdate to Router A about the status of Network 1 and setthe routing loop in motion.• With Split Horizon enabled, , Router D does not send theupdate to Router A because it already received an updateabout the status of Network 1 from Router A. ACCNA2-61 <strong>Chapter</strong> 4Split HorizonActually,that’s s notquitetrue!Hops = 16HOLD Well...IT!NO OK!WAY!X• Router D actually does send an update to Router A.• This update has a metric of 16 which means that the route isunreachable and Router A ignores the update.• When applied with split horizon, this deliberate “poisoning” ofthe route is called poison reverse.• Split Horizon with Poison Reverse is enabled by default.CCNA2-62 <strong>Chapter</strong> 4


IP and Time-ToTo-Live (TTL)• The Time to Live (TTL) is an 8-bit 8field in the IP header thatlimits the number of hops a packet can traverse through thenetwork before it is discarded.• The purpose of the TTL field is to avoid a situation in whichan undeliverable packet keeps circulating on the networkendlessly.• With TTL, the 8-bit 8field is set with a value by the sourcedevice of the packet.•CCNA2-63 <strong>Chapter</strong> 4IP and Time-ToTo-Live (TTL)• The TTL is decreased by 1 by every router on the route to itsdestination.• If the TTL field reaches 0 before the packet arrives at itsdestination, the packet is discarded and the router sends anInternet Control Message Protocol (ICMP) error messageback to the source of the IP packet.CCNA2-64 <strong>Chapter</strong> 4


<strong>Distance</strong> <strong>Vector</strong> <strong>Routing</strong> <strong>Protocols</strong><strong>Distance</strong> <strong>Vector</strong> <strong>Routing</strong><strong>Protocols</strong> TodayCCNA2-65 <strong>Chapter</strong> 4RIP and EIGRP• For distance vectorrouting protocols, thereare really only twochoices: RIP or EIGRP.Feature<strong>Distance</strong> <strong>Vector</strong> <strong>Routing</strong> <strong>Protocols</strong>Speed ofConvergenceRIPRIPv2EIGRPSlow Slow FastScalability Small Small LargeSupports VLSM No Yes YesResource Usage Low Low MediumImplementation Simple Simple Complex• The decision about which routing protocol to use in a givensituation is influenced by a number of factors, including• Size of the network.• Compatibility between models of routers.• Administrative knowledge required.CCNA2-66 <strong>Chapter</strong> 4

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!