Chapter 9: Determining IP Routes
Chapter 9: Determining IP Routes
Chapter 9: Determining IP Routes
Determining IP
Routes
© 1999, Cisco Systems, Inc. 91
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
10.120.2.0 172.16.1.0
To route a router need to know:
• Destination addresses
• Sources it can learn from
• Possible routes
• Best route
• Maintain and verify routing information
© 1999, Cisco Systems, Inc. www.cisco.com ICND—93
What is Routing? (cont.)
10.120.2.0 172.16.1.0
E0
S0
• Routers must learn destinations that are not
directly connected
© 1999, Cisco Systems, Inc. www.cisco.com ICND—94
Identifying Static and Dynamic
Routes
Static Route Dynamic Route
Uses a route that a Uses a route that a
network network routing
administrator enters protocol adjusts
into the router automatically for
manually topology or traffic
changes
Stub Network
172.16.1.0
SO
Network A B
B
172.16.2.2 172.16.2.1
Configure unidirectional static routes to and from a stub
network to allow communications to occur.
Router(config)#ip route network [mask]
{address | interface}[distance] [permanent]
Defines a path to an IP destination network or subnet
Stub Network
172.16.1.0
SO
Network
A B
B
172.16.2.2 172.16.2.1
ip route 172.16.1.0 255.255.255.0 172.16.2.1
This is a unidirectional route. You must have a route configured in
the opposite direction.
© 1999, Cisco Systems, Inc. www.cisco.com ICND—98
Default Routes
Stub Network
172.16.1.0
SO
Network A BB
172.16.2.2 172.16.2.1
ip route 0.0.0.0 0.0.0.0 172.16.2.2
This route allows the stub network to reach all known networks
beyond router A.
© 1999, Cisco Systems, Inc. www.cisco.com ICND—99
What is a Routing Protocol?
10.120.2.0 172.16.1.0
E0
Routing protocols are S0
used between
routers to determine
paths and maintain
routing tables.
Once the path is Network Destination Exit 172.17.3.0
determined a router can Protocol Network Interface
route a routed protocol.
Connected 10.120.2.0 E0
RIP 172.16.2.0 S0
IGRP 172.17.3.0 S1
Routed Protocol: IP
Routing protocol: RIP, IGRP
© 1999, Cisco Systems, Inc. www.cisco.com ICND—910
Autonomous Systems: Interior or
Exterior Routing Protocols
IGPs: RIP, IGRP EGPs: BGP
Autonomous System 100 Autonomous System 200
• An autonomous system is a collection of networks
under a common administrative domain
• IGPs operate within an autonomous system
• EGPs connect different autonomous systems
© 1999, Cisco Systems, Inc. www.cisco.com ICND—911
Administrative Distance:
Ranking Routes
I need to send a packet to
Network E. Both router B IGRP
and C will get it there. Administrative
Which route is best? Distance=100
Router A Router B
RIP
Administrative
Distance=120
E
Router C Router D
B
Distance Vector
C A
Hybrid Routing
B
Link State
C A
C A
Distance—How far
Vector—In which direction D
D C B A
Pass periodic copies of routing table to neighbor
routers and accumulate distance vectors
© 1999, Cisco Systems, Inc. www.cisco.com ICND—914
Distance Vector—Sources of
Information and Discovering Routes
10.1.0.0 10.2.0.0 10.3.0.0 10.4.0.0
E0 A S0 S0 B S1 S0 C E0
Routers discover the best path to
destinations from each neighbor
Routers discover the best path to
destinations from each neighbor
Routers discover the best path to
destinations from each neighbor
Information used to select the best path for routing
Topology
change
causes
routing
A table
update
Updates proceed stepbystep
from router to router
© 1999, Cisco Systems, Inc. www.cisco.com ICND—920
Distance Vector—Maintaining
Routing Information
Process to
update this
routing
table
Router A sends Topology
out this updated change
routing table causes
after the routing
next period A table
expires update
Updates proceed stepbystep
from router to router
© 1999, Cisco Systems, Inc. www.cisco.com ICND—921
Distance Vector—Maintaining
Routing Information
Process to Process to
update this update this
routing routing
table table
Router A sends Topology
out this updated change
routing table causes
after the routing
B next period A
table
expires update
Updates proceed stepbystep
from router to router
© 1999, Cisco Systems, Inc. www.cisco.com ICND—922
Maintaining Routing Information
Problem—Routing Loops
10.1.0.0 10.2.0.0 10.3.0.0 10.4.0.0
E0 A S0 S0 B S1 S0 C E0
Each node maintains the distance from itself to each
possible destination network
1 1 1
2 1 2
Slow convergence produces inconsistent routing
1 1 1
2 1 2
Router C concludes that the best path to network
10.4.0.0 is through Router B
1 3 1
4 1 2
Router A updates its table to reflect the new but
erroneous hop count
1 5 1
6 1 2
• 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
© 1999, Cisco Systems, Inc. www.cisco.com ICND—927
Solution: Defining a Maximum
10.1.0.0 10.2.0.0 10.3.0.0 10.4.0.0
E0 A S0 S0 B S1 S0 C E0 X
Define a limit on the number of hops to prevent
infinite loops
1 1 1
2 2 2
It is never useful to send information about a route back
in the direction from which the original packet came
Routers set the distance of routes that have gone down
to infinity
Poison Reverse overrides split horizon
Network 10.4.0.0
Update after is unreachable
holddown Time
10.1.0.0 10.2.0.0 10.3.0.0 10.4.0.0
E0 A S0 S0 B S1 S0 C E0 X
Update after
holddown Time Network 10.4.0.0 is down
then back up
then back down
Router keeps an entry for the network possibly down
state, allowing time for other routers to recompute for this
topology change
Router sends updates when a change in its routing
table occurs
10.4.0.0
E B X C
10.4.0.0
E B X C
Holddown
Holddown
Poison Reverse
D
Poison Reverse
10.4.0.0
E B X C
Holddown
Poison Reverse
Poison Reverse
A
Holddown
10.4.0.0
E B X C
Holddown
Packet for
Packet for Network 10.4.0.0
Network 10.4.0.0
A
Holddown
10.4.0.0
E B C
Link up!
10.4.0.0
E B C
Link up!
C A
D
LinkState Packets
Topological
Database
Routing
SPF Table
Algorithm
Shortest Path First Tree
After initial flood, pass small eventtriggered linkstate
updates to all other routers
© 1999, Cisco Systems, Inc. www.cisco.com ICND—941
Hybrid Routing
Choose a
routing path based
on distance vectors
Balanced Hybrid Routing
Converge rapidly using
changebased
updates
Share attributes of both distancevector
and linkstate routing
Network 172.16.0.0
Router configuration RIP
ter(config)#router protocol [keyword]
• Defines an IP routing protocol
r(configrouter)#network networknumber
• Mandatory configuration command for each
IP routing process
• Identifies the physically connected network
that routing updates are forwarded to
© 1999, Cisco Systems, Inc. www.cisco.com ICND—944
RIP Overview
19.2 kbps
T1 T1
T1
• Hop count metric selects the path
• Routes update every 30 seconds
© 1999, Cisco Systems, Inc. www.cisco.com ICND—945
RIP Configuration
ter(config)#router rip
•Starts the RIP routing process
(configrouter)#network networknumber
• Selects participating attached networks
• The network number must be a major classful
network number
E0 S2 S2 S3 S3 E0
172.16.1.0 A 192.168.1.0
B C
172.16.1.1 10.1.1.1 10.1.1.2 10.2.2.2 10.2.2.3 192.168.1.1
2.3.0.0
router rip 2.3.0.0
router rip
network 172.16.0.0 network 192.168.1.0
network 10.0.0.0 network 10.0.0.0
router rip
network 10.0.0.0
RouterA#sh ip protocols
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 0 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is
Incoming update filter list for all interfaces is
Redistributing: rip
Default version control: send version 1, receive any version
Interface Send Recv Keychain
Ethernet0 1 1 2
Serial2 1 1 2
Routing for Networks:
10.0.0.0
172.16.0.0
Routing Information Sources:
Gateway Distance Last Update
10.1.1.2 120 00:00:10
Distance: (default is 120)
RouterA#sh ip route
Codes: C connected, S static, I IGRP, R RIP, M mobile, B BGP
D EIGRP, EX EIGRP external, O OSPF, IA OSPF inter area
N1 OSPF NSSA external type 1, N2 OSPF NSSA external type 2
E1 OSPF external type 1, E2 OSPF external type 2, E EGP
i ISIS, L1 ISIS level1, L2 ISIS level2, * candidate
default
U peruser static route, o ODR
T traffic engineered route
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.1.0 is directly connected, Ethernet0
10.0.0.0/24 is subnetted, 2 subnets
R 10.2.2.0 [120/1] via 10.1.1.2, 00:00:07, Serial2
C 10.1.1.0 is directly connected, Serial2
R 192.168.1.0/24 [120/2] via 10.1.1.2, 00:00:07, Serial2
E0 S2 S2 S3 S3 E0
172.16.1.0 A 192.168.1.0
B C
172.16.1.1 10.1.1.1 10.1.1.2 10.2.2.2 10.2.2.3 192.168.1.1
RouterA#debug ip rip
RIP protocol debugging is on
RouterA#
00:06:24: RIP: received v1 update from 10.1.1.2 on Serial2
00:06:24: 10.2.2.0 in 1 hops
00:06:24: 192.168.1.0 in 2 hops
00:06:33: RIP: sending v1 update to 255.255.255.255 via
Ethernet0 (172.16.1.1)
00:06:34: network 10.0.0.0, metric 1
00:06:34: network 192.168.1.0, metric 3
00:06:34: RIP: sending v1 update to 255.255.255.255 via
Serial2 (10.1.1.1)
00:06:34: network 172.16.0.0, metric 1
IGRP
• More scalable than RIP
• Sophisticated metric
• Multiplepath support
19.2 kbps 19.2 kbps
Source
Destination
•Bandwidth
•Delay
•Reliability
•Loading
•MTU
© 1999, Cisco Systems, Inc. www.cisco.com ICND—952
Blank Slide for Instructor
Notes
New Route
Source
Initial
Route Destination
•Maximum six paths
•Nexthop router closer to destination
•Within metric variance
© 1999, Cisco Systems, Inc. www.cisco.com ICND—954
Configuring IGRP
Router(config)#router igrp autonomoussystem
• Defines IGRP as the IP routing protocol
configrouter)#network networknumber
• Selects participating attached networks
Router(configrouter)#variance multiplier
• Control IGRP load balancing
ter(configrouter)#trafficshare
alanced | min }
• Control how loadbalanced traffic is distributed
router igrp 100 router igrp 100
network 172.16.0.0 network 192.168.1.0
network 10.0.0.0 network 10.0.0.0
router igrp 100
network 10.0.0.0
RouterA#sh ip protocols
Routing Protocol is "igrp 100"
Sending updates every 90 seconds, next due in 21 seconds
Invalid after 270 seconds, hold down 280, flushed after 630
Outgoing update filter list for all interfaces is
Incoming update filter list for all interfaces is
Default networks flagged in outgoing updates
Default networks accepted from incoming updates
IGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0
IGRP maximum hopcount 100
IGRP maximum metric variance 1
Redistributing: igrp 100
Routing for Networks:
10.0.0.0
172.16.0.0
Routing Information Sources:
Gateway Distance Last Update
10.1.1.2 100 00:01:01
Distance: (default is 100)
RouterA#sh ip route
Codes: C connected, S static, I IGRP, R RIP, M mobile, B BGP
D EIGRP, EX EIGRP external, O OSPF, IA OSPF inter area
N1 OSPF NSSA external type 1, N2 OSPF NSSA external type 2
E1 OSPF external type 1, E2 OSPF external type 2, E EGP
i ISIS, L1 ISIS level1, L2 ISIS level2, * candidate default
U peruser static route, o ODR
T traffic engineered route
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.1.0 is directly connected, Ethernet0
10.0.0.0/24 is subnetted, 2 subnets
I 10.2.2.0 [100/90956] via 10.1.1.2, 00:00:23, Serial2
C 10.1.1.0 is directly connected, Serial2
I 192.168.1.0/24 [100/91056] via 10.1.1.2, 00:00:23, Serial2
RouterA#debug ip igrp transactions
IGRP protocol debugging is on
RouterA#
00:21:06: IGRP: sending update to 255.255.255.255 via Ethernet0 (172.16.1.1)
00:21:06: network 10.0.0.0, metric=88956
00:21:06: network 192.168.1.0, metric=91056
00:21:07: IGRP: sending update to 255.255.255.255 via Serial2 (10.1.1.1)
00:21:07: network 172.16.0.0, metric=1100
00:21:16: IGRP: received update from 10.1.1.2 on Serial2
00:21:16: subnet 10.2.2.0, metric 90956 (neighbor 88956)
00:21:16: network 192.168.1.0, metric 91056 (neighbor 89056)
RouterA#debug ip igrp events
IGRP event debugging is on
RouterA#
00:23:44: IGRP: sending update to 255.255.255.255 via Ethernet0 (172.16.1.1)
00:23:44: IGRP: Update contains 0 interior, 2 system, and 0 exterior routes.
00:23:44: IGRP: Total routes in update: 2
00:23:44: IGRP: sending update to 255.255.255.255 via Serial2 (10.1.1.1)
00:23:45: IGRP: Update contains 0 interior, 1 system, and 0 exterior routes.
00:23:45: IGRP: Total routes in update: 1
00:23:48: IGRP: received update from 10.1.1.2 on Serial2
00:23:48: IGRP: Update contains 1 interior, 1 system, and 0 exterior routes.
00:23:48: IGRP: Total routes in update: 2
172.16.1.0 X A
S2 S2
B
S3 S3
C
E0
192.168.1.0
172.16.1.1 10.1.1.1 10.1.1.2 10.2.2.2 10.2.2.3 192.168.1.1
RouterA# debug ip igrp trans
00:31:15: %LINEPROTO5UPDOWN: Line protocol on Interface Ethernet0, changed state to down
00:31:15: IGRP: edition is now 3
00:31:15: IGRP: sending update to 255.255.255.255 via Serial2 (10.1.1.1)
00:31:15: network 172.16.0.0, metric=4294967295
00:31:16: IGRP: Update contains 0 interior, 1 system, and 0 exterior routes.
00:31:16: IGRP: Total routes in update: 1
00:31:16: IGRP: broadcasting request on Serial2
00:31:16: IGRP: received update from 10.1.1.2 on Serial2
00:31:16: subnet 10.2.2.0, metric 90956 (neighbor 88956)
00:31:16: network 172.16.0.0, metric 4294967295 (inaccessible)
00:31:16: network 192.168.1.0, metric 91056 (neighbor 89056)
00:31:16: IGRP: Update contains 1 interior, 2 system, and 0 exterior routes.
00:31:16: IGRP: Total routes in update: 3
172.16.1.0 X A
S2 S2
B
S3 S3
C
E0
192.168.1.0
172.16.1.1 10.1.1.1 10.1.1.2 10.2.2.2 10.2.2.3 192.168.1.1
RouterB#sh ip route
Codes: C connected, S static, I IGRP, R RIP, M mobile, B BGP
D EIGRP, EX EIGRP external, O OSPF, IA OSPF inter area
N1 OSPF NSSA external type 1, N2 OSPF NSSA external type 2
E1 OSPF external type 1, E2 OSPF external type 2, E EGP
i ISIS, L1 ISIS level1, L2 ISIS level2, * candidate default
U peruser static route, o ODR
T traffic engineered route
Gateway of last resort is not set
I 172.16.0.0/16 is possibly down, routing via 10.1.1.1, Serial2
10.0.0.0/24 is subnetted, 2 subnets
C 10.1.1.0 is directly connected, Serial2
C 10.2.2.0 is directly connected, Serial3
I 192.168.1.0/24 [100/89056] via 10.2.2.3, 00:00:14, Serial3
RouterB#ping 172.16.1.1
Type escape sequence to abort.
Sending 5, 100byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
RouterB#
Gateway of last resort is not set
I 172.16.0.0/16 is possibly down, routing via 10.1.1.1, Serial2
10.0.0.0/24 is subnetted, 2 subnets
C 10.1.1.0 is directly connected, Serial2
C 10.2.2.0 is directly connected, Serial3
I 192.168.1.0/24 [100/89056] via 10.2.2.3, 00:00:18, Serial3
RouterB#ping 172.16.1.1
Type escape sequence to abort.
Sending 5, 100byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), roundtrip min/avg/max = 32/38/48 ms
© 1999, Cisco Systems, Inc. www.cisco.com ICND—965
ip classless Command
Default route
E0 S0
172.16.0.0
10.1.0.0 10.2.0.0
Router(config)#ip classless
Network Destination Exit
Protocol Network Interface
C 10.1.0.0 E0
To get to 10.7.1.1: C 10.2.0.0 S0
RIP 172.16.0.0 via S0
•With ip classless Default 0.0.0.0 E0
•With no ip classless Drop
... s1/0 s2/3
10.140.1.1/24 … 10.140.12.1/24
fa0/24 fa0/23 fa0/0
core_ server core_sw_a core_ro
10.1.1.1 10.1.1.2 10.1.1.3
© 1999, Cisco Systems, Inc. www.cisco.com ICND—967
Visual Objective
pod ro’s s0 ro’s e0 sw
wg_pc_a A 10.140.1.2 10.2.2.3 10.2.2.11
10.2.2.12 B 10.140.2.2 10.3.3.3 10.3.3.11
IGRP C 10.140.3.2 10.4.4.3 10.4.4.11
e0/1 D 10.140.4.2 10.5.5.3 10.5.5.11
e0/2 e0
wg_ro_a E 10.140.5.2 10.6.6.3 10.6.6.11
10.2.2.3 F 10.140.6.2 10.7.7.3 10.7.7.11
wg_sw_a s0
G 10.140.7.2 10.8.8.3 10.8.8.11
10.2.2.11 10.140.1.2/24
H 10.140.8.2 10.9.9.3 10.9.9.11
I 10.140.9.2 10.10.10.3 10.3.3.11
wg_pc_l J 10.140.10.2 10.11.11.3 10.11.11.11
10.13.13.12 K 10.140.11.2 10.12.12.3 10.12.12.11
L 10.140.12.2 10.13.13.3 10.13.13.11
IGRP
e0/1
e0/2 e0 wg_ro_l
10.13.13.3
LL
wg_sw_l
10.13.13.11 s0
10.140.12.2/24
s1/0 s2/3
...
10.140.1.1/24 … 10.140.12.1/24
fa0/24 fa0/23 fa0/0
core_ server core_sw_a core_ro
10.1.1.1 10.1.1.2 10.1.1.3
After completing this chapter, you should be
able to perform the following tasks:
• Determine when to use a static or dynamic route.
• Configure a static route on a Cisco Router.
• Describe how distance vector routing protocols operate.
• Configure the RIP and IGRP routing protocols on a Cisco
router.
• Use show ip route, show ip protocols, and other show and
debug commands to verify proper routing operation.
1. What is an advantage of using a static
route rather than a dynamic route?
What is a disadvantage?
2. What is the advantage of using IGRP
rather then RIP? What is a possible
disadvantage?
3. To scale up to very large IP networks,
what routing protocols are recommended?