Upload
edwin-holland
View
217
Download
0
Embed Size (px)
Citation preview
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Chabot CollegeChabot College
ELEC 99.08ELEC 99.08Routing Loops
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Routing Loops TopicsRouting Loops Topics
• Convergence
• Distance Vector Routing Loops
• RIP v2
• Discontiguous Networks
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
ConvergenceConvergence• Convergence means that routers agree about
the network’s available routes - the routing tables are consistent.
• Inconsistent routing tables is the main cause of routing loops.
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Routing Loops - the ProblemRouting Loops - the Problem• Problem: Using distance-vector routing, routers
can learn “bad” routes and then propagate these to other routers.
• Result: inconsistent routing tables• Result: looping packets - counting to infinity.
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Routing Loops ExampleRouting Loops Example• Example: 192.168.3.0 is directly connected to
Oak’s E0.• Oak’s routing table shows 192.168.3.0 is 0 hops
away.
fre hay oak
192.168.3.0
192.168.3.0 0 E0
E0S0
S1S0S1
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Routing Loops ExampleRouting Loops Example• RIP, running on Oak, tells Hay that 192.168.3.0
is reachable through Oak with a distance of 0.• Hay adds 1 hop to the distance and enters the
route to 192.168.3.0 into its routing table.
fre hay oak
192.168.3.0
192.168.3.0 0 E0192.168.3.0 1 S1
E0S0
S1S0S1 RIP
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Routing Loops ExampleRouting Loops Example• RIP, running on Hay, tells Fre that 192.168.3.0
is 1 hop away.• Fre adds 1 hop to the distance and enters the
route to 192.168.3.0 into its routing table.
fre hay oak
192.168.3.0
192.168.3.0 0 E0192.168.3.0 1 S1
E0S0
S1S0S1
192.168.3.0 2 S1
RIP
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Routing Loops ExampleRouting Loops Example• The network is now “converged”.
All routers have a consistent picture of the network.
fre hay oak
192.168.3.0
192.168.3.0 0 E0192.168.3.0 1 S1
E0S0
S1S0S1
192.168.3.0 2 S1
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Routing Loops ExampleRouting Loops Example• Now network 192.168.3.0 fails...• Oak stops routing packets to it and marks it as
“unreachable" with a distance of 16 hops.
fre hay oak
192.168.3.0
192.168.3.0 16 E0192.168.3.0 2 S1 192.168.3.0 1 S1
E0S0
S1S0S1
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Routing Loops ExampleRouting Loops Example• So far, Hay and Fre don’t know of the failure.• Before Oak can tell Hay, Hay sends out its
regular 30-second update to Fre and Oak. That update tells Oak that there is a route to 192.168.3.0 through Hay with a distance of 1.
fre hay oak
192.168.3.0
192.168.3.0 16 E0192.168.3.0 2 S1 192.168.3.0 1 S1
E0S0
S1S0S1 RIP RIP
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Routing Loops ExampleRouting Loops Example• Oak accepts the update, adds 1 to the distance
and changes the vector (interface) to the dest. • Now Oak wrongly believes that there is a route
to 192.168.3.0 through Hay with a distance of 2.
fre hay oak
192.168.3.0
192.168.3.0 2 S0192.168.3.0 2 S1 192.168.3.0 1 S1
E0S0
S1S0S1 RIP
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Routing Loops ExampleRouting Loops Example• Next Oak sends its regular update to Hay,
which adds 1 to the distance to 192.168.3.0.
fre hay oak
192.168.3.0
192.168.3.0 2 S0192.168.3.0 2 S1 192.168.3.0 3 S1
E0S0
S1S0S1 RIP
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Routing Loops ExampleRouting Loops Example• Hay again sends regular updates to Fre and
Oak, and each router adds 1 to the distance to 192.168.3.0.
• See the problem?
fre hay oak
192.168.3.0
192.168.3.0 4 S0192.168.3.0 4 S1 192.168.3.0 3 S1
E0S0
S1S0S1 RIP RIP
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Routing Loops ExampleRouting Loops Example• The routing tables are not converged.• If Hay receives a packet bound for 192.168.3.0,
where will it send it?• What will happen next?
fre hay oak
192.168.3.0
192.168.3.0 4 S0192.168.3.0 4 S1 192.168.3.0 3 S1
E0S0
S1S0S1
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Routing Loop ManagementRouting Loop Management• Hop count limit
– stops looping packets after limit – default is 15 hops for RIP
(16 is considered “unreachable” or down)– can be set:
• Commands– default-metric NN
hay(config)#router riphay(config-router)#default-metric 10hay(config-router)#^Z
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Routing Loop ManagementRouting Loop Management• Split horizon
– prevents sending information about a route back to the source from which an update originated.
– reduces the spread of bad routes & speeds convergence.
– is enabled by default on each interface
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Routing Loops ManagementRouting Loops Management• Split horizon on S0 prevents Oak from accepting
incorrect update from Hay about 192.168.3.0.
fre hay oak
192.168.3.0
192.168.3.0 16 E0192.168.3.0 1 S1
E0S0
S1S0S1
split-horizon
RIP
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Routing Loop ManagementRouting Loop Management• Holdowns
– when changes occur, holdowns force routers to “hold” the changes for a certain period of time.
– The router will not accept an updated route with a poorer metric until the holdown timer expires.
– this prevents regular updates from wrongly reinstating a route that has gone bad.
• Commands• timers basic update invalid hold flush
hay(config)#router riphay(config-router)#timers basic 30 60 150 30hay(config-router)#^Z
See: http://www.cisco.com/en/US/products/sw/iosswrel/ps1831/products_command_summary_chapter09186a0080087eab.html#xtocid17
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
RIP TimersRIP Timers RIP Timer Parameter
Default (Seconds)
Update – Time between regular RIP updates. This is the fundamental timing parameter of the routing protocol.
30
Invalid – If a route has not been heard from in this period of time, it will be declared invalid; the route then enters holddown. The route is marked inaccessible and advertised as unreachable. However, the route is still used for forwarding packets. Invalid should be at least three times the value of update.
180
Hold – Time during which routes that have been marked invalid will be "held" and not replaced with a new route with a greater distance. This timer determines how long the route is "held" down (marked inaccessible and advertised as unreachable). While in holddown, the route is still used for forwarding packets. When holddown expires, routes advertised by other sources are accepted and the route is no longer inaccessible. Hold should be at least three times the value of update
180
Flush – Time from when a route becomes invalid to when it is removed from the routing table. The flush timer restarts every time an update is received for a route. The flush and invalid timers restart at the same time and run concurrently. When the flush timer expires for a route, the route is removed from the routing table.
240
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Rapid Convergence - Sample ConfigRapid Convergence - Sample Config
oak#conf t oak(config)#router rip oak(config-router)#default-metric 10 oak(config-router)#timers basic 30 60 150 30 oak(config-router)#exit oak(config-if)#^Z
10 hops max
Fast timers
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Routing Loop ManagementRouting Loop Management• Triggered Updates
– When changes occur, updates are sent immediately. – Speeds convergence.– Supported only by RIP version 2– Works together with holdowns.– Consider how triggered updates & holdowns could prevent the
example problem.
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
RIP Version 2RIP Version 2• Key New Features:
– understands subnet masks, including Variable Length Subnet Masks– performs “triggered updates” - sending new routing information to neighbor routers immediately after a change in the network– provides an authentication mechanism (passwords)– supports IP multicasting– supports EGP route tags
• For our Lab, the key advantage is the support for subnet masks...
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
RIP Version 2 - CommandsRIP Version 2 - Commands• Configuring RIP version 2 - same as RIP but
– adds version 2 statement
– version should be the same for all routers
oak(config)#router ripoak(config-router)#version 2oak(config-router)#network 10.0.0.0oak(config-router)#network 192.168.4.0oak(config-router)#^Z
Enables RIP routing Sets RIP version 2
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Discontiguous Networks - ProblemDiscontiguous Networks - Problem
• RIP and IGRP do not support routing between subnets that are separated by other networks.
• RIP won’t tell router B how to reach the 172.16.1.0 /24 subnet:
10.1.0.0/16 net
172.16.1.0 / 24 Net 172.16.2.0 / 24 Net
A B
See http://www.cisco.com/warp/public/105/55.html
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Discontiguous Networks - SolutionDiscontiguous Networks - Solution
• RIP version 2 understands subnets and– can be configured not to summarize subnets– will not have a problem with the discontiguous subnets
shown below with this config:
10.1.0.0/16 net
172.16.1.0 / 24 subnet 172.16.2.0 / 24 subnet
A B
rtrB(config)#router riprtrB(config-router)#version 2rtrB(config-router)#no auto-summaryrtrB(config-router)#network 10.1.0.0rtrB(config-router)#network 172.16.2.0
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Command SummaryCommand Summary• default-metric 10• timers basic 30 180 180 240• version 2• no auto-summary