2008118090324 hk

58
Distance Vector Distance Vector Routing Protocols Routing Protocols Vivek Kumar Vivek Kumar Technical Trainer Technical Trainer

Transcript of 2008118090324 hk

Page 1: 2008118090324 hk

Distance Vector Routing Distance Vector Routing ProtocolsProtocols

Vivek KumarVivek Kumar

Technical TrainerTechnical Trainer

Page 2: 2008118090324 hk

Meaning of distance Vector Meaning of distance Vector (1/2)(1/2)

• A router using a distance vector routing A router using a distance vector routing protocol does not have the knowledge protocol does not have the knowledge of the entire path to a destination of the entire path to a destination network.network.

• The router only knowsThe router only knows– The direction or interface in which packets The direction or interface in which packets

should be forwarded andshould be forwarded and– The distance or how far it is to the The distance or how far it is to the

destination networkdestination network

Page 3: 2008118090324 hk

Meaning of distance Vector Meaning of distance Vector (2/2)(2/2)

Page 4: 2008118090324 hk

Operation of distance vector Operation of distance vector (1/4)(1/4)

• Some distance vector routing Some distance vector routing protocols call for the router to protocols call for the router to periodically broadcast the entire periodically broadcast the entire routing table to each of its neighbors. routing table to each of its neighbors.

• This method is inefficient because the This method is inefficient because the updates not only consume bandwidth updates not only consume bandwidth but also consume router CPU but also consume router CPU resources to process the updates. resources to process the updates.

Page 5: 2008118090324 hk

Operation of distance vector Operation of distance vector (2/4)(2/4)

• Periodic UpdatesPeriodic Updates are sent at regular are sent at regular intervals (30 seconds for RIP and 90 seconds intervals (30 seconds for RIP and 90 seconds for IGRP).for IGRP).– Even if the topology has not changed in several Even if the topology has not changed in several

days, periodic updates continue to be sent to all days, periodic updates continue to be sent to all neighbors.neighbors.

– Neighbors are routers that share a link and are Neighbors are routers that share a link and are configured to use the same routing protocol. configured to use the same routing protocol.

– The router is only aware of the network The router is only aware of the network addresses of its own interfaces and the remote addresses of its own interfaces and the remote network addresses it can reach through its network addresses it can reach through its neighborsneighbors

Page 6: 2008118090324 hk

Operation of distance vector Operation of distance vector (3/4)(3/4)

• Broadcast UpdatesBroadcast Updates are sent to are sent to 255.255.255.255. 255.255.255.255. – Neighboring routers that are configured Neighboring routers that are configured

with the same routing protocol will with the same routing protocol will process the updates. process the updates.

– All other devices will also process the All other devices will also process the update up to Layer 3 before discarding it. update up to Layer 3 before discarding it.

– Some distance vector routing protocols Some distance vector routing protocols use multicast addresses instead of use multicast addresses instead of broadcast addresses.broadcast addresses.

Page 7: 2008118090324 hk

Operation of distance vector Operation of distance vector (4/4)(4/4)

• Entire Routing Table UpdatesEntire Routing Table Updates are are sent, periodically to all neighbors. sent, periodically to all neighbors. – Neighbors receiving these updates must Neighbors receiving these updates must

process the entire update to find process the entire update to find pertinent information and discard the pertinent information and discard the rest. rest.

– Some distance vector routing protocols Some distance vector routing protocols like EIGRP do not send periodic routing like EIGRP do not send periodic routing table updates.table updates.

Page 8: 2008118090324 hk

Routing AlgorithmRouting Algorithm

• The algorithm used for the routing The algorithm used for the routing protocols defines the following protocols defines the following processes:processes:– Mechanism for sending and receiving Mechanism for sending and receiving

routing information.routing information.– Mechanism for calculating the best paths Mechanism for calculating the best paths

and installing routes in the routing table. and installing routes in the routing table. – Mechanism for detecting and reacting to Mechanism for detecting and reacting to

topology changes.topology changes.

Page 9: 2008118090324 hk

Routing protocol Routing protocol characteristics (1/3)characteristics (1/3)

• Time to ConvergenceTime to Convergence - Time to - Time to convergence defines how quickly the convergence defines how quickly the routers in the network topology share routers in the network topology share routing information and reach a state routing information and reach a state of consistent knowledge.of consistent knowledge.– The faster the convergence, the more The faster the convergence, the more

preferable the protocol.preferable the protocol.– Routing loops can occur when inconsistent Routing loops can occur when inconsistent

routing tables are not updated due to slow routing tables are not updated due to slow convergence in a changing network.convergence in a changing network.

Page 10: 2008118090324 hk

Routing protocol Routing protocol characteristics (2/3)characteristics (2/3)

• Scalability Scalability - Scalability defines how large a - Scalability defines how large a network can become based on the routing network can become based on the routing protocol that is deployed.protocol that is deployed.– The larger the network is, the more scalable the The larger the network is, the more scalable the

routing protocol needs to be.routing protocol needs to be.

• Classless (Use of VLSM) or ClassfulClassless (Use of VLSM) or Classful - Classless - Classless routing protocols include the subnet mask in routing protocols include the subnet mask in the updates. the updates. – This feature supports the use of Variable Length This feature supports the use of Variable Length

Subnet Masking (VLSM) and better route Subnet Masking (VLSM) and better route summarization. summarization.

– Classful routing protocols do not include the Classful routing protocols do not include the subnet mask and cannot support VLSM.subnet mask and cannot support VLSM.

Page 11: 2008118090324 hk

Routing protocol Routing protocol characteristics (3/3)characteristics (3/3)• Resource UsageResource Usage - Resource usage includes - Resource usage includes

the requirements of a routing protocol such the requirements of a routing protocol such as memory space, CPU utilization, and link as memory space, CPU utilization, and link bandwidth utilizationbandwidth utilization– Higher resource requirements necessitate more Higher resource requirements necessitate more

powerful hardware to support the routing protocol powerful hardware to support the routing protocol operation in addition to the packet forwarding operation in addition to the packet forwarding processes.processes.

• Implementation and MaintenanceImplementation and Maintenance - - Implementation and maintenance describes Implementation and maintenance describes the level of knowledge that is required for a the level of knowledge that is required for a network administrator to implement and network administrator to implement and maintain the network based on the routing maintain the network based on the routing protocol deployed.protocol deployed.

Page 12: 2008118090324 hk

Distance Vector Routing Protocols

Page 13: 2008118090324 hk

Comparison of Routing Comparison of Routing Protocol Protocol

Page 14: 2008118090324 hk

Periodic updatesPeriodic updates :RIP(1/3):RIP(1/3)

• The term periodic updates refers to The term periodic updates refers to the fact that a router sends the the fact that a router sends the complete routing table to its complete routing table to its neighbors at a predefined interval. neighbors at a predefined interval. – For RIP, these updates are sent every 30 For RIP, these updates are sent every 30

seconds as a broadcast seconds as a broadcast (255.255.255.255) whether or not there (255.255.255.255) whether or not there has been a topology change. has been a topology change.

– This 30-second interval is a route update This 30-second interval is a route update timer that also aids in tracking the age of timer that also aids in tracking the age of routing information in the routing table. routing information in the routing table.

Page 15: 2008118090324 hk

Periodic updates:RIPPeriodic updates:RIP (2/3)(2/3)

• The age of routing information in a routing The age of routing information in a routing table is refreshed each time an update is table is refreshed each time an update is received. received.

• This way information in the routing table can be This way information in the routing table can be maintained when there is a topology change. maintained when there is a topology change.

• Changes may occur for several reasons, Changes may occur for several reasons, including:including:– Failure of a linkFailure of a link– Introduction of a new linkIntroduction of a new link– Failure of a routerFailure of a router– Change of link parametersChange of link parameters

Page 16: 2008118090324 hk

Periodic updates:RIPPeriodic updates:RIP (3/3)(3/3)

Page 17: 2008118090324 hk

RIP TimersRIP Timers (1/3)(1/3)

• In addition to the update timer, the IOS In addition to the update timer, the IOS implements three additional timers for RIP:implements three additional timers for RIP:

• Invalid TimerInvalid Timer. If an update has not been . If an update has not been received to refresh an existing route after 180 received to refresh an existing route after 180 seconds (the default), the route is marked as seconds (the default), the route is marked as invalid by setting the metric to 16. invalid by setting the metric to 16. – The route is retained in the routing table until the The route is retained in the routing table until the

flush timer expires.flush timer expires.

• Flush TimerFlush Timer. By default, the flush timer is set . By default, the flush timer is set for 240 seconds, which is 60 seconds longer for 240 seconds, which is 60 seconds longer than the invalid timer. When the flush timer than the invalid timer. When the flush timer expires, the route is removed from the expires, the route is removed from the routing table.routing table.

Page 18: 2008118090324 hk

RIP TimersRIP Timers (2/3)(2/3)

• Holddown Timer. This timer stabilizes Holddown Timer. This timer stabilizes routing information and helps prevent routing information and helps prevent routing loops during periods when the routing loops during periods when the topology is converging on new topology is converging on new information. information. – Once a route is marked as unreachable, it Once a route is marked as unreachable, it

must stay in holddown long enough for all must stay in holddown long enough for all routers in the topology to learn about the routers in the topology to learn about the unreachable network. unreachable network.

– By default, the holddown timer is set for By default, the holddown timer is set for 180 seconds. 180 seconds.

Page 19: 2008118090324 hk

RIP TimersRIP Timers (3/3)(3/3)

Page 20: 2008118090324 hk

Bounded Bounded Updates :EIGRP(1/2)Updates :EIGRP(1/2)• Unlike other distance vector routing Unlike other distance vector routing

protocols, EIGRP does not send periodic protocols, EIGRP does not send periodic updates. updates.

• Instead, EIGRP sends bounded updates Instead, EIGRP sends bounded updates about a route when a path changes or the about a route when a path changes or the metric for that route changes. metric for that route changes.

• When a new route becomes available or When a new route becomes available or when a route needs to be removedwhen a route needs to be removed, , EIGRP EIGRP sends an update only about that network sends an update only about that network instead of the entire table. instead of the entire table.

• This information is sent only to those This information is sent only to those routers that need it.routers that need it.

Page 21: 2008118090324 hk

Bounded Bounded Updates :EIGRP(2/2)Updates :EIGRP(2/2)

• EIGRP uses updates that are:EIGRP uses updates that are:– Non-periodic because they are not sent Non-periodic because they are not sent

out on a regular basis.out on a regular basis.– Partial updates sent only when there is a Partial updates sent only when there is a

change in topology that influences change in topology that influences routing information. routing information.

– Bounded, meaning the propagation of Bounded, meaning the propagation of partial updates are automatically partial updates are automatically bounded so that only those routers that bounded so that only those routers that need the information are updated.need the information are updated.

Page 22: 2008118090324 hk

Triggered UpdateTriggered Update (1/3)(1/3)

• To speed up the convergence when there is To speed up the convergence when there is a topology change, a topology change, RIP uses triggered RIP uses triggered updatesupdates. .

• A triggered update is a routing table update A triggered update is a routing table update that is sent immediately in response to a that is sent immediately in response to a routing changerouting change. .

• Triggered updates do not wait for update Triggered updates do not wait for update timers to expire. timers to expire. – The detecting router immediately sends an The detecting router immediately sends an

update message to adjacent routers. update message to adjacent routers. – The receiving routers, in turn, generate triggered The receiving routers, in turn, generate triggered

updates that notify their neighbors of the change. updates that notify their neighbors of the change.

Page 23: 2008118090324 hk

Triggered UpdateTriggered Update (2/3)(2/3)

• Triggered updates are sent when one Triggered updates are sent when one of the following occurs:of the following occurs:– An interface changes state (up or down)An interface changes state (up or down)– A route has entered (or exited) the A route has entered (or exited) the

"unreachable" state"unreachable" state– A route is installed in the routing tableA route is installed in the routing table

Page 24: 2008118090324 hk

Triggered UpdateTriggered Update (3/3)(3/3)

• However, there are two problems with However, there are two problems with triggered updates:triggered updates:– Packets containing the update message can be Packets containing the update message can be

dropped or corrupted by some link in the dropped or corrupted by some link in the network.network.

– The triggered updates do not happen The triggered updates do not happen instantaneously. It is possible that a router that instantaneously. It is possible that a router that has not yet received the triggered update will has not yet received the triggered update will issue a regular update at just the wrong time, issue a regular update at just the wrong time, causing the bad route to be reinserted in a causing the bad route to be reinserted in a neighbor that had already received the triggered neighbor that had already received the triggered update.update.

Page 25: 2008118090324 hk

Routing Loop (1/6)Routing Loop (1/6)

• A routing loop is a condition in which a A routing loop is a condition in which a packet is continuously transmitted within packet is continuously transmitted within a series of routers without ever reaching a series of routers without ever reaching its intended destination network.its intended destination network.

• A routing loop can occur when two or A routing loop can occur when two or more routers have routing information more routers have routing information that incorrectly indicates that a valid path that incorrectly indicates that a valid path to an unreachable destination exists.to an unreachable destination exists.

Page 26: 2008118090324 hk

Routing Loop (2/6)Routing Loop (2/6)

• The loop may be a result of:The loop may be a result of:– Incorrectly configured static routesIncorrectly configured static routes– Incorrectly configured route redistribution Incorrectly configured route redistribution

(redistribution is a process of handing the (redistribution is a process of handing the routing information from one routing protocol routing information from one routing protocol to another routing protocol)to another routing protocol)

– Inconsistent routing tables not being updated Inconsistent routing tables not being updated due to slow convergence in a changing due to slow convergence in a changing networknetwork

– Incorrectly configured or installed discard Incorrectly configured or installed discard routes routes

Page 27: 2008118090324 hk

Routing Loop (3/6)Routing Loop (3/6)

Page 28: 2008118090324 hk

Routing Loop (4/6)Routing Loop (4/6)

Page 29: 2008118090324 hk

Routing Loop (5/6)Routing Loop (5/6)

Page 30: 2008118090324 hk

Routing Loop (6/6)Routing Loop (6/6)

Page 31: 2008118090324 hk

Count to infinity (1/5)Count to infinity (1/5)

• Count to infinity is a condition that Count to infinity is a condition that exists when inaccurate routing exists when inaccurate routing updates increase the metric value to updates increase the metric value to "infinity" for a network that is no "infinity" for a network that is no longer reachable.longer reachable.

Page 32: 2008118090324 hk

Count to infinity (2/5)Count to infinity (2/5)

Page 33: 2008118090324 hk

Count to infinity (3/5)Count to infinity (3/5)

Page 34: 2008118090324 hk

Count to infinity (4/5)Count to infinity (4/5)

Page 35: 2008118090324 hk

Count to infinity (5/5)Count to infinity (5/5)

Page 36: 2008118090324 hk

Setting a Maximum (1/2)Setting a Maximum (1/2)

• To eventually stop the incrementing To eventually stop the incrementing of the metric, "infinity" is defined by of the metric, "infinity" is defined by setting a maximum metric value. setting a maximum metric value.

• For example, RIP defines infinity as For example, RIP defines infinity as 16 hops - an "unreachable" metric. 16 hops - an "unreachable" metric.

• Once the routers "count to infinity," Once the routers "count to infinity," they mark the route as unreachable.they mark the route as unreachable.

Page 37: 2008118090324 hk

Setting a Maximum (2/2)Setting a Maximum (2/2)

Page 38: 2008118090324 hk

Preventing routing loop with Preventing routing loop with holddown timerholddown timer (1/5)(1/5)

• Holddown timers are used to prevent Holddown timers are used to prevent regular update messages from regular update messages from inappropriately reinstating a route that inappropriately reinstating a route that may have gone bad.may have gone bad.

• Holddown timers instruct routers to hold Holddown timers instruct routers to hold any changes that might affect routes for a any changes that might affect routes for a specified period of time.specified period of time.

• If a route is identified as down or possibly If a route is identified as down or possibly down, any other information for that route down, any other information for that route containing the same status, or worse, is containing the same status, or worse, is ignored for a predetermined amount of ignored for a predetermined amount of time (the holddown period). time (the holddown period).

Page 39: 2008118090324 hk

Preventing routing loop with Preventing routing loop with holddown timerholddown timer (2/5)(2/5)

Page 40: 2008118090324 hk

Preventing routing loop with Preventing routing loop with holddown timerholddown timer (3/5)(3/5)

Page 41: 2008118090324 hk

Preventing routing loop with Preventing routing loop with holddown timerholddown timer (4/5)(4/5)

Page 42: 2008118090324 hk

Preventing routing loop with Preventing routing loop with holddown timerholddown timer (5/5)(5/5)

Page 43: 2008118090324 hk

Split Horizon Rules (1/5)Split Horizon Rules (1/5)

• The split horizon rule says that a The split horizon rule says that a router should not advertise a router should not advertise a network through the interface from network through the interface from which the update came.which the update came.

Page 44: 2008118090324 hk

Split Horizon Rules (2/5)Split Horizon Rules (2/5)

Page 45: 2008118090324 hk

Split Horizon Rules (3/5)Split Horizon Rules (3/5)

Page 46: 2008118090324 hk

Split Horizon Rules (4/5)Split Horizon Rules (4/5)

Page 47: 2008118090324 hk

Split Horizon Rules (5/5)Split Horizon Rules (5/5)

Page 48: 2008118090324 hk

Route Poisoning (1/4)Route Poisoning (1/4)

• Route poisoning is yet another method Route poisoning is yet another method employed by distance vector routing employed by distance vector routing protocols to prevent routing loops. protocols to prevent routing loops.

• Route poisoning is used to mark the Route poisoning is used to mark the route as unreachable in a routing route as unreachable in a routing update that is sent to other routers. update that is sent to other routers.

• Unreachable is interpreted as a metric Unreachable is interpreted as a metric that is set to the maximum. that is set to the maximum. – For RIP, a poisoned route has a metric of For RIP, a poisoned route has a metric of

16.16.

Page 49: 2008118090324 hk

Route Poisoning (2/4) Route Poisoning (2/4)

Page 50: 2008118090324 hk

Route Poisoning (3/4)Route Poisoning (3/4)

Page 51: 2008118090324 hk

Route Poisoning (4/4)Route Poisoning (4/4)

Page 52: 2008118090324 hk

Split Horizon with Poison Split Horizon with Poison reverse (1/5)reverse (1/5)

• The concept of split horizon with The concept of split horizon with poison reverse is that explicitly poison reverse is that explicitly telling a router to ignore a route is telling a router to ignore a route is better than not telling it about the better than not telling it about the route in the first place.route in the first place.

Page 53: 2008118090324 hk

Split Horizon with Poison Split Horizon with Poison reverse (2/5)reverse (2/5)

• The following process occurs:The following process occurs:• Network 10.4.0.0 becomes unavailable Network 10.4.0.0 becomes unavailable

due to a link failure. due to a link failure. • R3 poisons the metric with a value of 16 R3 poisons the metric with a value of 16

and then sends out a triggered update and then sends out a triggered update stating that 10.4.0.0 is unavailable. stating that 10.4.0.0 is unavailable.

• R2 processes that update, invalidates the R2 processes that update, invalidates the routing entry in its routing table, and routing entry in its routing table, and immediately sends a poison reverse back immediately sends a poison reverse back to R3. to R3.

Page 54: 2008118090324 hk

Split Horizon with Poison Split Horizon with Poison reverse (3/5)reverse (3/5)

Page 55: 2008118090324 hk

Split Horizon with Poison Split Horizon with Poison reverse (4/5)reverse (4/5)

Page 56: 2008118090324 hk

Split Horizon with Poison Split Horizon with Poison reverse (5/5)reverse (5/5)

Page 57: 2008118090324 hk

Time to Live (1/2)Time to Live (1/2)

• Time to Live (TTL) is an 8-bit field in Time to Live (TTL) is an 8-bit field in the IP headerthe IP header that limits the number that limits the number of hops a packet can traverse through of hops a packet can traverse through the network before it is discarded. the network before it is discarded.

• The purpose of the TTL field is to The purpose of the TTL field is to avoid a situation in which an avoid a situation in which an undeliverable packet keeps undeliverable packet keeps circulating on the network endlessly. circulating on the network endlessly.

Page 58: 2008118090324 hk

Time to Live (2/2)Time to Live (2/2)

• With TTL, the 8-bit field is set with a value With TTL, the 8-bit field is set with a value by the source device of the packet. The TTL by the source device of the packet. The TTL is decreased by one by every router on the is decreased by one by every router on the route to its destination. route to its destination.

• If the TTL field reaches zero before the If the TTL field reaches zero before the packet arrives at its destination, the packet packet arrives at its destination, the packet is discarded and the router sends an is discarded and the router sends an Internet Control Message Protocol (ICMP) Internet Control Message Protocol (ICMP) error message back to the source of the IP error message back to the source of the IP packetpacket