This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
• Hop-by-hopHop-by-hop• According to routing tableAccording to routing table
• Longest matchLongest match
• Routing table needs to be (constantly) updated to Routing table needs to be (constantly) updated to reflect current topologyreflect current topology• Routing protocol(s) runs between routersRouting protocol(s) runs between routers
• Classful routing protocol does not send subnet masks Classful routing protocol does not send subnet masks in updates, but presumes that all networks are of in updates, but presumes that all networks are of A/B/C classA/B/C class• often perform automatic summarization on major often perform automatic summarization on major
network boundary by defaultnetwork boundary by default• Classless routing protocol carry subnet masks in route Classless routing protocol carry subnet masks in route
advertisementsadvertisements• VLSM VLSM (RFC 1009) (RFC 1009) may be appliedmay be applied
• Various prefix lengths (subnet masks) for individual subnets of the Various prefix lengths (subnet masks) for individual subnets of the same networksame network
• no overlap no overlap • Subnets can be further subnetted for more efficient IP address Subnets can be further subnetted for more efficient IP address
allocationallocation• Often provides option of route summarizationOften provides option of route summarization
Why “distance vector” ?Why “distance vector” ?1.1. Routes are advertised as vectorsRoutes are advertised as vectors
• vector has it’s length (=metric) and directionvector has it’s length (=metric) and direction ((==nextnext--hophop))))
2.2. Neighboring routers exchange their „vectors of Neighboring routers exchange their „vectors of distances“ to known networks distances“ to known networks (i.e. routing tables)(i.e. routing tables)
Common Characteristics of DV Common Characteristics of DV AlgoritAlgorithhmsms
• PrinciplePrinciple based on based on Distributed Distributed Bellman-ForBellman-Ford (Ford-Fulkerson) d (Ford-Fulkerson) algorithmalgorithm
• Routing tables constructRouting tables construction is based only onion is based only on information from information from neighboring routers – „routing by rumor“neighboring routers – „routing by rumor“
• except of routes suppressed due to Split horizon ruleexcept of routes suppressed due to Split horizon rule
• Broadcast (sometime multicast) updatesBroadcast (sometime multicast) updates• identity of neighbors is not knownidentity of neighbors is not known• manual neighbor configuration (unicast) is often supportedmanual neighbor configuration (unicast) is often supported
• maintained separately for every routemaintained separately for every route• typically 3-7 update timer periodstypically 3-7 update timer periods..• reset every time a route is heard about.reset every time a route is heard about.• if expired, route is marked and propagated as inaccessible (but still used if expired, route is marked and propagated as inaccessible (but still used
• after after its its expirexpiration,ation, route mar route markked as invalid (ed as invalid (by invalid timer) is removed by invalid timer) is removed from routing tablefrom routing table
• Holddown timerHolddown timer (will be discussed next) (will be discussed next)
Timers have to be set consistently across routing domainTimers have to be set consistently across routing domain
Network a just goes up, assume routing update period 30s• R2 learns about network a after 30s (max) • R3 learns about network a after 60s (max)• R4 learns about network a after 90s = 1.5 min (max)
Holddown TimerHolddown Timer• When a When a previously previously failed routefailed route is received with worse is received with worse
metric from other router than former nexthopmetric from other router than former nexthop, new , new information information is ignored is ignored for time period equal to the for time period equal to the holddown timerholddown timer
• Exception: information from failed route's next-hop router is Exception: information from failed route's next-hop router is accepted even with worse metricaccepted even with worse metric
• Stated another way: if the route’s metrics gets worse or Stated another way: if the route’s metrics gets worse or the route disappears completely, router does not accept the route disappears completely, router does not accept other routes for a whileother routes for a while
• PreventsPrevents routes to failed networks routes to failed networks from from being re-being re-introduced by routers that have introduced by routers that have not noticed the failure not noticed the failure yetyet
• Helps to avoid count-to-infinity problemHelps to avoid count-to-infinity problem
Holddown Holddown timer timer usage exampleusage example
HHolddown olddown timer applied ontimer applied on R4: R4:• R3 R3 reports networkreports network aa as unreachable as unreachable (using (using triggered triggered
update)update)• Holddown timer started for route Holddown timer started for route aa on R4 on R4
• R1 R1 offers route tooffers route to aa viavia 3 3 hopshops• asas R1 is still not informed about unreachability of R1 is still not informed about unreachability of
network network aa- - R4 does not believe R1 during R4 does not believe R1 during holddown timeholddown time
• If a metric of a route changes (If a metric of a route changes (either increases or decreaseseither increases or decreases), ), infoinformationrmation is sent immediately without waiting for the next is sent immediately without waiting for the next update periodupdate period• Including detection of new or failed routeIncluding detection of new or failed route
• Greatly reduces Count-to-Infinity problem (but does not Greatly reduces Count-to-Infinity problem (but does not eliminate it completely)eliminate it completely)
• The sole changed information may be transmitted instead of The sole changed information may be transmitted instead of whole routing tablewhole routing table
• Artificial (random) pause 1-5s between triggered updates is Artificial (random) pause 1-5s between triggered updates is appliedapplied• reduces broadcast storms and flappingreduces broadcast storms and flapping
• Implemented in both RIP versions (RFC 2091), IGRP, …Implemented in both RIP versions (RFC 2091), IGRP, …
Split HorizonSplit Horizon• Solves problem of routing loops occurring due to Solves problem of routing loops occurring due to
updates passing each other over a single link updates passing each other over a single link • Count to infinity problemCount to infinity problem
• Poisson reverse – routing Poisson reverse – routing information is not only information is not only filtered by Split horizon, but intentionally sent with filtered by Split horizon, but intentionally sent with infinite metricinfinite metric• larger updateslarger updates• additional level of additional level of safety against propagation of safety against propagation of
Count to Infinity ProblemCount to Infinity Problem (1)(1)Router which receives new route from it’s neighbor does not Router which receives new route from it’s neighbor does not
know that the advertised route leads back to itknow that the advertised route leads back to it
a b c dR1 R2 R3 R4
Number of hops and next-hop routers from individual routers to network a:
More Complex Count to Infinity More Complex Count to Infinity ScenarioScenario
(even with Split Horizon applied)(even with Split Horizon applied)• Example topology: rectangleExample topology: rectangle/triangle/triangle of 4 of 4/3/3 routers routers
and one additional and one additional router router in the corner which fails.in the corner which fails. • See See
http://websrv.cs.fsu.edu/reference/itl/labs/countinf/counhttp://websrv.cs.fsu.edu/reference/itl/labs/countinf/countinf.htm for detailed explanationtinf.htm for detailed explanation
• Introducing of maximum metric to handle count-to-Introducing of maximum metric to handle count-to-infinity problem also resolves routing loops occurring infinity problem also resolves routing loops occurring due to updates passing each other over due to updates passing each other over alternatealternate pathspaths
• Little mess in terminologyLittle mess in terminology• Cisco definition: “Cisco definition: “When a distance vector routing When a distance vector routing
protocol notices that a particular route is no longer protocol notices that a particular route is no longer valid, it has two choices. One is simply to quit valid, it has two choices. One is simply to quit advertising about that subnet; the other is to advertise advertising about that subnet; the other is to advertise that route, but with an infinite metric, signifying that that route, but with an infinite metric, signifying that the route is bad. Route poisoning calls for the second the route is bad. Route poisoning calls for the second of these options, which removes any ambiguity about of these options, which removes any ambiguity about whether the route is still validwhether the route is still valid””
DVA – ADVA – Advanced issuesdvanced issues• Passive InterfacesPassive Interfaces• Active and Passive Active and Passive pparticipantsarticipants• Problem of update synchronization Problem of update synchronization
• periodic network congestionperiodic network congestion• artificial jitter of update periods is often introducedartificial jitter of update periods is often introduced
• Unicast updates - neighbors’ IP addresses may be configured Unicast updates - neighbors’ IP addresses may be configured explicitlyexplicitly• Limits broadcasts, but requires to maintain list of valid neighborsLimits broadcasts, but requires to maintain list of valid neighbors• Useful for L2 technologies that do not support Useful for L2 technologies that do not support
broadacast/multicastbroadacast/multicast• Router may “consume” more than 1 hopRouter may “consume” more than 1 hop
• offset lists define consumed hops on interfaces for offset lists define consumed hops on interfaces for incoming/outgoing RIP updatesincoming/outgoing RIP updates
• Unnumbered interfacesUnnumbered interfaces• Special operation mode on dial-on-demand circuitsSpecial operation mode on dial-on-demand circuits
• Does not require periodic keepalives, only changes are sentDoes not require periodic keepalives, only changes are sent
• Simple configurationSimple configuration• no complicated planningno complicated planning• but even with DVA hierarchy of network “areas” but even with DVA hierarchy of network “areas”
with summarization may be establishedwith summarization may be established
• Ease of route filtering Ease of route filtering • Both received and propagated routesBoth received and propagated routes• Filtering at any place (interface)Filtering at any place (interface)
• Summarization at any interfaceSummarization at any interface
• No efficient mechanism of neighbor failure detectionNo efficient mechanism of neighbor failure detection• No Hellos like in LSAsNo Hellos like in LSAs
• Except advanced DVAs like EIGRPExcept advanced DVAs like EIGRP
• RIP versions can be different on different interfacesRIP versions can be different on different interfaces
• Uses UDP/520 (both as source and destination port)Uses UDP/520 (both as source and destination port)• Support for eSupport for equal-cost load balancingqual-cost load balancing (some implementations) (some implementations)
RIP version 1RIP version 1• Classful routing protocol• Does not include subnet mask information.• Automatic summarization at major network boundaries• Updates are sent as broadcasts by default• Update sender’s IP address is used as implicit next hop• Max 25 entries in update
•max update length 512B•one entry takes 5x4B: Address Family Identifier, IP address, metric, unused fields (waste of space)
RIPRIP v1 v1 and Subnet Masks and Subnet Masks• RIP is classfull – no masks in routing updatesRIP is classfull – no masks in routing updates• Assumes consistent (constant) Assumes consistent (constant) subnet subnet mask for all mask for all
subnets ofsubnets of single major (i.e. class-level) networksingle major (i.e. class-level) network• If some router’s interface is connected to the subnet If some router’s interface is connected to the subnet
of a major network of a major network and and it receives a routing update, it receives a routing update, router will router will useuse receiving interface’s mask for the receiving interface’s mask for the advertised subnet. Otherwise the class’ advertised subnet. Otherwise the class’ defaultdefault mask mask is appliedis applied
Summarization and Subnet Summarization and Subnet Continuity RequirementContinuity Requirement
• Subnets are advertised only out of interface Subnets are advertised only out of interface belonging to the same major network as those belonging to the same major network as those subnetssubnets
• Subnets are summarized to major network at the Subnets are summarized to major network at the boundary of major networkboundary of major network
• The previous implies a need of contiguous The previous implies a need of contiguous subnetssubnets
RIP version 2RIP version 2• Classless - includes subnet masks in updatesClassless - includes subnet masks in updates• Automatic summarization at major network boundaries may Automatic summarization at major network boundaries may
be disabledbe disabled• DoDonn’t forget to do it for discontinuous subnets !’t forget to do it for discontinuous subnets !
• Allows sending of updates as multicasts (224.0.0.9)Allows sending of updates as multicasts (224.0.0.9)• Supports route tagsSupports route tags (marking of external routes) (marking of external routes)• Supports authenticationSupports authentication• Explicitly defines next-hop for each routeExplicitly defines next-hop for each route
• 0.0.0.0 means to use IP address of update sender0.0.0.0 means to use IP address of update sender• uuseful for route redistribution between routers on the shared networkseful for route redistribution between routers on the shared network
segment (multiple routers connected by switch/hub)segment (multiple routers connected by switch/hub)
• Authentication info Authentication info is is aappended ppended right right behind behind RIP header as route entry with AFIRIP header as route entry with AFI=FFFFh and =FFFFh and Route Tag acting as Authentication Type.Route Tag acting as Authentication Type.• 16 octets of Authentication Data (password16 octets of Authentication Data (password/hash/hash) )
• starts when no info about route starts when no info about route is heard is heard for 180sfor 180s• Flush Timer: Flush Timer: 240240ss
• After Invalid timer expires, route metric is set to 16After Invalid timer expires, route metric is set to 16; ; after after 240240s it is flushed out of routing table s it is flushed out of routing table completelycompletely
• Hold down timerHold down timer• ifif Holddown feature Holddown feature is implemented is implemented
• propagated as propagated as any other any other networknetwork • denoted as denoted as 0.0.0.00.0.0.0 (/0) (/0)
• If a router receives multiple defaults, it chooses If a router receives multiple defaults, it chooses the best one, the best one, based on smaller metric based on smaller metric • or load balancesor load balances between all of them between all of them
RIP-NGRIP-NG• ““Next Generation” RIP for IPv6 Next Generation” RIP for IPv6
(RFC 2080)(RFC 2080)• Carries IPv6 prefixes and addresses (classless)Carries IPv6 prefixes and addresses (classless)• Standard incorporates triggered updates and other Standard incorporates triggered updates and other
RIP improvementsRIP improvements• No built-in support for authenticationNo built-in support for authentication
• Relies on IPv6's authentication methodsRelies on IPv6's authentication methods
• Specific next-hops may be assigned to sets of Specific next-hops may be assigned to sets of route entriesroute entries
Are Distance-Vector Protocols Outdated ?Are Distance-Vector Protocols Outdated ?• Definitively not !Definitively not !
• Just consider Cisco EIGRP:Just consider Cisco EIGRP:
• Advanced distance vector protocol with some features taken from Link-State Advanced distance vector protocol with some features taken from Link-State protocolsprotocols• Hellos, Neighbor tableHellos, Neighbor table
• No need for periodic full updates anymoreNo need for periodic full updates anymore
• Composite metric Composite metric • in reality transformed into single numberin reality transformed into single number
• Feasible successor conceptFeasible successor concept• Succesor route(s), feasible successor route(s)Succesor route(s), feasible successor route(s)
• Immediate switch to alternative path without any recalculationsImmediate switch to alternative path without any recalculations• Unequal-cost load balancing supportUnequal-cost load balancing support
chain of 3 routers, side routers have ethernets addressed with subnets of class C networks, connecting lines are chain of 3 routers, side routers have ethernets addressed with subnets of class C networks, connecting lines are class A.class A.
• Migration to RIP2 Migration to RIP2 • router riprouter rip
version 2 version 2 no auto-summary no auto-summary
• Propagation of default route (from one of side routers)Propagation of default route (from one of side routers)• router riprouter rip
default-information originate default-information originate (redistribute static // on some IOS versions) (redistribute static // on some IOS versions)
• RIPv2 authenticationRIPv2 authentication• Key chain jménoKey chain jméno
Key 1 Key 1 Key-string heslo Key-string hesloiintnterfaceerface s1 s1 i ip rip authentication key-chain jménop rip authentication key-chain jméno i ip rip authentication mode md5 p rip authentication mode md5
• (Connect into triangle), look at multiple routes in routing table. Set hop-offset on some interface(Connect into triangle), look at multiple routes in routing table. Set hop-offset on some interface• router riprouter rip
offset-list <route-prefix-ACL#> in | out <hopcount-offset> <interface> offset-list <route-prefix-ACL#> in | out <hopcount-offset> <interface>• route filteringroute filtering
• router riprouter rip distribute-list <ACL#> in | out <interface> distribute-list <ACL#> in | out <interface>