Routing Loops - Chabot College

Download Report

Transcript Routing Loops - Chabot College

Chabot College
ELEC 99.08
Routing Loops
CISCO NETWORKING ACADEMY
Routing Loops Topics
•
•
•
•
Convergence
Distance Vector Routing Loops
RIP v2
Discontiguous Networks
CISCO NETWORKING ACADEMY
Convergence
• 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 ACADEMY
Routing 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 ACADEMY
Routing 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.
192.168.3.0
S1
fre
S0
hay
S1
S0
0
E0
oak
E0
192.168.3.0
CISCO NETWORKING ACADEMY
Routing 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.
192.168.3.0
1
S1
fre
S0
hay
S1
S1
192.168.3.0
0
E0
RIP
S0
oak
E0
192.168.3.0
CISCO NETWORKING ACADEMY
Routing 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.
192.168.3.0
2
S1
S1
fre
192.168.3.0
1
S1
192.168.3.0
0
E0
RIP
S0
hay
S1
S0
oak
E0
192.168.3.0
CISCO NETWORKING ACADEMY
Routing Loops Example
• The network is now “converged”.
All routers have a consistent picture of the
network.
192.168.3.0
2
S1
192.168.3.0
1
S1
fre
S0
hay
S1
192.168.3.0
S1
S0
0
E0
oak
E0
192.168.3.0
CISCO NETWORKING ACADEMY
Routing 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.
192.168.3.0
2
S1
192.168.3.0
1
S1
fre
S0
hay
S1
192.168.3.0 16 E0
S1
S0
oak
E0
192.168.3.0
CISCO NETWORKING ACADEMY
Routing 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.
192.168.3.0
2
S1
S1
fre
192.168.3.0
1
S1
RIP
S0
hay
S1
192.168.3.0 16 E0
RIP
S0
oak
E0
192.168.3.0
CISCO NETWORKING ACADEMY
Routing 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.
192.168.3.0
2
S1
192.168.3.0
1
S1
fre
S0
hay
S1
S1
192.168.3.0
2
S0
RIP
S0
oak
E0
192.168.3.0
CISCO NETWORKING ACADEMY
Routing Loops Example
• Next Oak sends its regular update to Hay,
which adds 1 to the distance to 192.168.3.0.
192.168.3.0
2
S1
192.168.3.0
3
S1
fre
S0
hay
S1
S1
192.168.3.0
2
S0
RIP
S0
oak
E0
192.168.3.0
CISCO NETWORKING ACADEMY
Routing 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?
192.168.3.0
4
S1
S1
fre
192.168.3.0
3
S1
RIP
S0
hay
S1
192.168.3.0
4
S0
RIP
S0
oak
E0
192.168.3.0
CISCO NETWORKING ACADEMY
Routing 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?
192.168.3.0
4
S1
192.168.3.0
3
S1
fre
S0
hay
S1
192.168.3.0
S1
S0
4
S0
oak
E0
192.168.3.0
CISCO NETWORKING ACADEMY
Routing 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 rip
hay(config-router)#default-metric 10
hay(config-router)#^Z
CISCO NETWORKING ACADEMY
Routing 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 ACADEMY
Routing Loops Management
• Split horizon on S0 prevents Oak from accepting
incorrect update from Hay about 192.168.3.0.
192.168.3.0
1
S1
192.168.3.0 16 E0
split-horizon
S1
fre
S0
hay
S1
RIP
S0
oak
E0
192.168.3.0
CISCO NETWORKING ACADEMY
Routing 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 rip
hay(config-router)#timers basic 30 60 150 30
hay(config-router)#^Z
CISCO NETWORKING ACADEMY See: http://www.cisco.com/en/US/products/sw/iosswrel/ps1831/products_command_summary_chapter09186a0080087eab.html#xtocid17
RIP Timers
RIP Timer Parameter
Update – Time between regular RIP updates. This is the fundamental timing
parameter of the routing protocol.
Default
(Seconds)
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 ACADEMY
Rapid Convergence - Sample Config
10 hops max
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
CISCO NETWORKING ACADEMY
Fast timers
Routing 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 ACADEMY
RIP 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 ACADEMY
RIP Version 2 - Commands
• Configuring RIP version 2 - same as RIP but
– adds version 2 statement
– version should be the same for all routers
Enables RIP routing
Sets RIP version 2
oak(config)#router rip
oak(config-router)#version 2
oak(config-router)#network 10.0.0.0
oak(config-router)#network 192.168.4.0
oak(config-router)#^Z
CISCO NETWORKING ACADEMY
Discontiguous 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
A
172.16.1.0 / 24
B
Net
See http://www.cisco.com/warp/public/105/55.html
CISCO NETWORKING ACADEMY
172.16.2.0 / 24 Net
Discontiguous 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:
rtrB(config)#router rip
rtrB(config-router)#version 2
rtrB(config-router)#no auto-summary
rtrB(config-router)#network 10.1.0.0
rtrB(config-router)#network 172.16.2.0
10.1.0.0/16 net
A
172.16.1.0 / 24
CISCO NETWORKING ACADEMY
B
subnet
172.16.2.0 / 24 subnet
Command Summary
•
•
•
•
default-metric 10
timers basic 30 180 180 240
version 2
no auto-summary
CISCO NETWORKING ACADEMY