2000, Cisco Systems, Inc.
9-1
Determining IP
Routes
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-2
Objectives Objectives
Upon completion of this chapter, you will
be able to complete the following tasks:
Distinguish the use and operation of static and
dynamic routes
Configure and verify a static route
Identify how distance vector IP routing protocols
such as RIP and IGRP operate on Cisco routers
Enable Routing Information Protocol (RIP)
Enable Interior Gateway Routing Protocol (IGRP)
Verify IP routing with show and debug commands
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-3
To route, a router needs to know:
Destination addresses
Sources it can learn from
Possible routes
Best route
Maintain and verify routing information
What is Routing? What is Routing?
172.16.1.0 10.120.2.0
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-4
What is Routing? (cont.) What is Routing? (cont.)
Network
Protocol
Destination
Network
Connected
Learned
10.120.2.0
172.16.1.0
Exit
Interface
E0
S0
Routed Protocol: IP
Routers must learn destinations that are
not directly connected
172.16.1.0 10.120.2.0
E0
S0
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-5
Static Route
Uses a route that a
network
administrator enters
into the router
manually
Dynamic Route
Uses a route that a
network routing
protocol adjusts
automatically for
topology or traffic
changes
Identifying Static and Dynamic
Routes
Identifying Static and Dynamic
Routes
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-6
172.16.2.1
SO
Static Routes Static Routes
172.16.1.0
B
172.16.2.2
Network
A
Configure unidirectional static routes to and from a
stub network to allow communications to occur.
B
Stub Network
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-7
Defines a path to an IP destination network or subnet
Router(config)#ip route network [mask]
{address | interface}[distance] [permanent]
Static Route Configuration Static Route Configuration
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-8
Stub Network
ip route 172.16.1.0 255.255.255.0 172.16.2.1
172.16.2.1
SO
Static Route Example Static Route Example
172.16.1.0
B
172.16.2.2
Network
A B
This is a unidirectional route. You must have a route
configured in the opposite direction.
10.0.0.0
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-9
Stub Network
ip route 0.0.0.0 0.0.0.0 172.16.2.2
Default Routes Default Routes
172.16.2.1
SO
172.16.1.0
B
172.16.2.2
Network
A B
This route allows the stub network to reach all known
networks beyond router A.
10.0.0.0
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-10
What is a Routing Protocol? What is a Routing Protocol?
Routing protocols are
used between
routers to determine
paths and maintain
routing tables.
Once the path is
determined a router can
route a routed protocol.
Network
Protocol
Destination
Network
Connected
RIP
IGRP
10.120.2.0
172.16.2.0
172.17.3.0
Exit
Interface
E0
S0
S1
Routed Protocol: IP
Routing protocol: RIP, IGRP
172.17.3.0
172.16.1.0 10.120.2.0
E0
S0
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-11
Autonomous System 100
Autonomous System 200
IGPs: RIP, IGRP
EGPs: BGP
Autonomous Systems: Interior or
Exterior Routing Protocols
Autonomous Systems: Interior or
Exterior Routing Protocols
An autonomous system is a collection of networks
under a common administrative domain
IGPs operate within an autonomous system
EGPs connect different autonomous systems
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-12
Administrative Distance:
Ranking Routes
Administrative Distance:
Ranking Routes
IGRP
Administrative
Distance=100
Router D Router D
Router B Router B
Router A Router A
Router C Router C
RIP
Administrative
Distance=120
EE
I need to send a packet to
Network E. Both router B
and C will get it there.
Which route is best?
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-13
Classes of Routing Protocols Classes of Routing Protocols
Distance Vector
Distance Vector
Hybrid Routing
Hybrid Routing
Link State
Link State
CC
BB
AA
DD
CC
DD
BB
AA
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-14
Distance Vector Routing
Protocols
Distance Vector Routing
Protocols
Pass periodic copies of routing table to neighbor
routers and accumulate distance vectors
CC
DD
BB
AA
CC BB
AA
DD
Routing
Table
Routing
Table
Routing
Table
Routing
Table
Routing
Table
Routing
Table
Routing
Table
Routing
Table
DistanceHow far
VectorIn which direction
DistanceHow far
VectorIn which direction
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-15
Routers discover the best path to
destinations from each neighbor
A A B B C C
10.1.0.0 10.2.0.0 10.3.0.0 10.4.0.0
E0 S0
S0 S1 S0 E0
Routing Table
Routing Table
10.2.0.0
10.2.0.0
10.3.0.0
10.3.0.0
0
0
0
0
S0
S1
Routing Table
Routing Table
10.3.0.0
10.3.0.0
S0 0
0
10.4.0.0
10.4.0.0 E0
0
0
Routing Table
Routing Table
10.1.0.0
10.1.0.0
10.2.0.0
10.2.0.0
E0
S0
0
0
Distance VectorSources of
Information and Discovering Routes
Distance VectorSources of
Information and Discovering Routes
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-16
Routers discover the best path to
destinations from each neighbor
A A B B C C
10.1.0.0 10.2.0.0 10.3.0.0 10.4.0.0
E0 S0
S0 S1 S0 E0
Routing Table
Routing Table
10.1.0.0
10.1.0.0
10.2.0.0
10.2.0.0
10.3.0.0
10.3.0.0
Routing Table
Routing Table
10.2.0.0
10.2.0.0
10.3.0.0
10.3.0.0
10.4.0.0
10.4.0.0
10.1.0.0
10.1.0.0
0
0
0
0
1
1
1
1
S0
S1
S1
S0
Routing Table
Routing Table
10.3.0.0
10.3.0.0
S0 0
0
10.4.0.0
10.4.0.0 E0
0
0
10.2.0.0
10.2.0.0 S0
1
1
E0
S0
S0 1
1
0
0
Distance VectorSources of
Information and Discovering Routes
Distance VectorSources of
Information and Discovering Routes
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-17
Distance VectorSources of
Information and Discovering Routes
Distance VectorSources of
Information and Discovering Routes
Routers discover the best path to
destinations from each neighbor
A A B B C C
10.1.0.0 10.2.0.0 10.3.0.0 10.4.0.0
E0 S0
S0 S1 S0 E0
Routing Table
Routing Table
10.1.0.0
10.1.0.0
10.2.0.0
10.2.0.0
10.3.0.0
10.3.0.0
10.4.0.0
10.4.0.0
Routing Table
Routing Table
10.2.0.0
10.2.0.0
10.3.0.0
10.3.0.0
10.4.0.0
10.4.0.0
10.1.0.0
10.1.0.0
0
0
0
0
1
1
1
1
S0
S1
S1
S0
Routing Table
Routing Table
10.3.0.0
10.3.0.0
S0 0
0
10.4.0.0
10.4.0.0 E0
0
0
10.2.0.0
10.2.0.0 S0
10.1.0.0
10.1.0.0 S0
1
1
2
2
E0
S0
S0
S0
1
1
2
2
0
0
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-18
Distance VectorSelecting
Best Route with Metrics
Distance VectorSelecting
Best Route with Metrics
Information used to select the best path for routing
56
T1
56
T1
Ticks, hop count
Ticks, hop count
B
A
Hop count
Hop count
IPX
RIP
IGRP
Bandwidth
Delay
Load
Reliability
MTU
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-19
Do not delete Do not delete
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-20
Distance VectorMaintaining
Routing Information
Distance VectorMaintaining
Routing Information
Updates proceed step-by-step
from router to router
A A
Process to
update this
routing
table
Process to
update this
routing
table
Topology Topology
change change
causes causes
routing routing
table table
update update
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-21
Distance VectorMaintaining
Routing Information
Distance VectorMaintaining
Routing Information
Updates proceed step-by-step
from router to router
A A
Process to
update this
routing
table
Process to
update this
routing
table
Router A sends
out this updated
routing table
after the
next period
expires
Topology
change
causes
routing
table
update
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-22
Distance VectorMaintaining
Routing Information
Distance VectorMaintaining
Routing Information
Updates proceed step-by-step
from router to router
A A
B B
Process to
update this
routing
table
Process to
update this
routing
table
Process to
update this
routing
table
Process to
update this
routing
table
Topology
change
causes
routing
table
update
Router A sends
out this updated
routing table
after the
next period
expires
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-23
Maintaining Routing Information
ProblemRouting Loops
Maintaining Routing Information
ProblemRouting Loops
Each node maintains the distance from itself to each
possible destination network
A A B B C C
10.1.0.0 10.2.0.0 10.3.0.0 10.4.0.0
E0 S0
S0 S1 S0 E0
Routing Table
Routing Table
10.3.0.0
S0
E0
S0
S0
1
1
2
2 10.1.0.0
10.2.0.0
10.4.0.0
0
0
Routing Table
Routing Table
10.1.0.0 E0
S0
S0
S0
1
1
2
2
10.4.0.0
10.3.0.0
10.2.0.0
0
0
Routing Table
Routing Table
10.2.0.0 S0
S1
S1
S0
1
1
1
1 10.1.0.0
10.4.0.0
10.3.0.0
0
0
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-24
Maintaining Routing Information
ProblemRouting Loops
Maintaining Routing Information
ProblemRouting Loops
Slow convergence produces inconsistent routing
A A B B C C
10.1.0.0 10.2.0.0 10.3.0.0 10.4.0.0
E0 S0
S0 S1 S0 E0
X
X
Routing Table
Routing Table
10.3.0.0
S0
E0
S0
S0
1
1
2
2 10.1.0.0
10.2.0.0
10.4.0.0
0
Down
Routing Table
Routing Table
10.1.0.0 E0
S0
S0
S0
1
1
2
2
10.4.0.0
10.3.0.0
10.2.0.0
0
0
Routing Table
Routing Table
10.2.0.0 S0
S1
S1
S0
1
1
1
1 10.1.0.0
10.4.0.0
10.3.0.0
0
0
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-25
Router C concludes that the best path to network
10.4.0.0 is through Router B
Maintaining Routing Information
ProblemRouting Loops
Maintaining Routing Information
ProblemRouting Loops
A A B B C C
10.1.0.0 10.2.0.0 10.3.0.0 10.4.0.0
E0 S0
S0 S1 S0 E0
X
X
Routing Table
Routing Table
10.3.0.0
S0
S0
S0
S0
1
1
2
2 10.1.0.0
10.2.0.0
10.4.0.0
0
2
Routing Table
Routing Table
10.1.0.0 E0
S0
S0
S0
1
1
2
2
10.4.0.0
10.3.0.0
10.2.0.0
0
0
Routing Table
Routing Table
10.2.0.0 S0
S1
S1
S1
1
1
1
1 10.1.0.0
10.4.0.0
10.3.0.0
0
0
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-26
Router A updates its table to reflect the new but
erroneous hop count
Maintaining Routing Information
ProblemRouting Loops
Maintaining Routing Information
ProblemRouting Loops
A A B B C C
10.1.0.0 10.2.0.0 10.3.0.0 10.4.0.0
E0 S0
S0 S1 S0 E0
X
X
Routing Table
Routing Table
S0
S0
S0
S0
1
1
2
2
10.3.0.0
10.1.0.0
10.2.0.0
10.4.0.0
0
2
Routing Table
Routing Table
E0
S0
S0
S0
1
1
4
4
10.1.0.0
10.4.0.0
10.3.0.0
10.2.0.0
0
0
Routing Table
Routing Table
S0
S1
S1
S0
3
3
1
1
10.2.0.0
10.1.0.0
10.4.0.0
10.3.0.0
0
0
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-27
Symptom: Counting to Infinity Symptom: Counting to Infinity
Packets for network 10.4.0.0 bounce between routers
A, B, and C
Hop count for network 10.4.0.0 counts to infinity
A A B B C C
10.1.0.0 10.2.0.0 10.3.0.0 10.4.0.0
E0 S0
S0 S1 S0 E0
X
X
Routing Table
Routing Table
10.3.0.0
S0
S0
S0
S0
1
1
2
2 10.1.0.0
10.2.0.0
10.4.0.0
0
4
Routing Table
Routing Table
E0
S0
S0
S0
1
1
6
6
10.1.0.0
10.4.0.0
10.3.0.0
10.2.0.0
0
0
Routing Table
Routing Table
S0
S1
S1
S0
5
5
1
1
10.2.0.0
10.1.0.0
10.4.0.0
10.3.0.0
0
0
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-28
Solution: Defining a Maximum Solution: Defining a Maximum
Define a limit on the number of hops to prevent
infinite loops
A A B B C C
10.1.0.0 10.2.0.0 10.3.0.0 10.4.0.0
E0 S0
S0 S1 S0 E0
X
X
Routing Table
Routing Table
10.3.0.0
S0
S0
S0
S0
1
1
2
2 10.1.0.0
10.2.0.0
10.4.0.0
0
16
Routing Table
Routing Table
E0
S0
S0
S0
1
1
16
16
10.1.0.0
10.4.0.0
10.3.0.0
10.2.0.0
0
0
Routing Table
Routing Table
S0
S1
S1
S0
16
16
1
1
10.2.0.0
10.1.0.0
10.4.0.0
10.3.0.0
0
0
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-29
Solution: Split Horizon Solution: Split Horizon
It is never useful to send information about a route back
in the direction from which the original packet came
A A B B C C
10.1.0.0 10.2.0.0 10.3.0.0 10.4.0.0
E0 S0
S0 S1 S0 E0
X
X
X
X
X
X
Routing Table
Routing Table
10.3.0.0
S0
S0
S0
S0
1
1
2
2 10.1.0.0
10.2.0.0
10.4.0.0
0
0
Routing Table
Routing Table
E0
S0
S0
S0
1
1
2
2
10.1.0.0
10.4.0.0
10.3.0.0
10.2.0.0
0
0
Routing Table
Routing Table
S0
S1
S1
E1
1
1
2
2
10.2.0.0
10.1.0.0
10.4.0.0
10.3.0.0
0
0
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-30
Solution: Route Poisoning Solution: Route Poisoning
Routers set the distance of routes that have gone down
to infinity
A A B B C C
10.1.0.0 10.2.0.0 10.3.0.0 10.4.0.0
E0 S0
S0 S1 S0 E0
X
X
Routing Table
Routing Table
10.3.0.0
S0
S0
S0
S0
1
1
2
2 10.1.0.0
10.2.0.0
10.4.0.0
0
Infinity
Routing Table
Routing Table
10.1.0.0 E0
S0
S0
S0
1
1
2
2
10.4.0.0
10.3.0.0
10.2.0.0
0
0
Routing Table
Routing Table
10.2.0.0 S0
S1
S1
E1
1
1
2
2 10.1.0.0
10.4.0.0
10.3.0.0
0
0
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-31
Solution: Poison Reverse Solution: Poison Reverse
Poison Reverse overrides split horizon
A A B B C C
10.1.0.0 10.2.0.0 10.3.0.0 10.4.0.0
E0 S0
S0 S1 S0 E0
X
X
Routing Table
Routing Table
10.3.0.0
S0
S0
S0
S0
1
1
2
2 10.1.0.0
10.2.0.0
10.4.0.0
0
Infinity
Routing Table
Routing Table
10.1.0.0 E0
S0
S0
S0
1
1
2
2
10.4.0.0
10.3.0.0
10.2.0.0
0
0
Routing Table
Routing Table
10.2.0.0 S0
S1
S1
E1
Possibly
Down
Possibly
Down
2
2 10.1.0.0
10.4.0.0
10.3.0.0
0
0
Poison
Reverse
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-32
Solution: Hold-Down Timers Solution: Hold-Down Timers
Router keeps an entry for the network possibly down
state, allowing time for other routers to recompute for
this topology change
Network 10.4.0.0 is down
then back up
then back down
Update after
hold-down Time
Update after
hold-down Time
Network 10.4.0.0
is unreachable
Network 10.4.0.0
is unreachable
A A B B C C
10.1.0.0 10.2.0.0 10.3.0.0 10.4.0.0
E0 S0
S0 S1 S0 E0
X
X
Update after
hold-down Time
Update after
hold-down Time
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-33
Solution: Triggered Updates Solution: Triggered Updates
Router sends updates when a change in its routing
table occurs
A A B B C C
10.2.0.0 10.3.0.0 10.4.0.0
E0 S0
S0 S1 S0 E0
X
X
Network 10.4.0.0
is unreachable
Network 10.4.0.0
is unreachable
Network 10.4.0.0
is unreachable
Network 10.4.0.0
is unreachable
Network 10.4.0.0
is unreachable
Network 10.4.0.0
is unreachable
10.1.0.0
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-34
Implementing Solutions in
Multiple Routes
Implementing Solutions in
Multiple Routes
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-35
Implementing Solutions in
Multiple Routes (cont.)
Implementing Solutions in
Multiple Routes (cont.)
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-36
Implementing Solutions in
Multiple Routes (cont.)
Implementing Solutions in
Multiple Routes (cont.)
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-37
Implementing Solutions in
Multiple Routes (cont.)
Implementing Solutions in
Multiple Routes (cont.)
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-38
Implementing Solutions in
Multiple Routes (cont.)
Implementing Solutions in
Multiple Routes (cont.)
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-39
Link-State Routing Protocols Link-State Routing Protocols
2000, Cisco Systems, Inc. www.cisco.com ICND v1.0a9-40
Share attributes of both distance-vector
and link-state routing
Hybrid Routing Hybrid Routing
Choose a
routing path based
on distance vectors
Converge rapidly using
change-based
updates
Choose a
routing path based
on distance vectors
Converge rapidly using
change-based
updates
Balanced Hybrid Routing
Balanced Hybrid Routing