© 2002, Cisco Systems, Inc. All rights reserved. 1 Determining IP Routes Module 5
© 2002, Cisco Systems, Inc. All rights reserved. 1
Determining IP Routes
Module 5
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-2© 2002, Cisco Systems, Inc. All rights reserved. 2
Routing Overview
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-3
To route, a router needs to do the following:• Know the destination address
• Identify the sources it can learn from
• Discover possible routes
• Select the best route
• Maintain and verify routing information
What Is Routing?
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-4
• Routers must learn destinations that are not directly connected.
What Is Routing? (Cont.)
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-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
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-6
Static Routes
• Configure unidirectional static routes to and from a stub network to allow communications to occur.
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-7
• Defines a path to an IP destination network or subnet or host
Router(config)#ip route network [mask] {address | interface}[distance] [permanent]
Static Route Configuration
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-8
Static Route Example
• This is a unidirectional route. You must have a route configured in the opposite direction.
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-9
Default Routes
• This route allows the stub network to reach all known networks beyond router A.
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-10
Verifying the Static Route Configuration
router#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default U - per-user static route Gateway of last resort is 0.0.0.0 to network 0.0.0.0 10.0.0.0/8 is subnetted, 1 subnetsC 10.1.1.0 is directly connected, Serial0S* 0.0.0.0/0 is directly connected, Serial0
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-11
• 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.
What Is a Routing Protocol?
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-12
• An autonomous system is a collection of networks under a common administrative domain.
• IGPs operate within an autonomous system.
• EGPs connect different autonomous systems.
Autonomous Systems: Interior or Exterior Routing Protocols
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-13
Administrative Distance: Ranking Routes
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-14
Classes of Routing Protocols
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-15
Classful Routing Overview
• Classful routing protocols do not include the subnet mask with the route advertisement.
• Within the same network, consistency of the subnet masks is assumed.
• Summary routes are exchanged between foreign networks.
• Examples of classful routing protocols:
–RIP Version 1 (RIPv1)
– IGRP
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-16
Classless Routing Overview
• Classless routing protocols include the subnet mask with the route advertisement.
• Classless routing protocols support variable-length subnet masking (VLSM).
• Summary routes can be manually controlled within the network.
• Examples of classless routing protocols:
–RIP Version 2 (RIPv2)
–EIGRP
–OSPF
– IS-IS
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-17
Routing Protocol Comparison Chart
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-18
Using the ip classless Command
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-19© 2002, Cisco Systems, Inc. All rights reserved. 19
Distance Vector Routing
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-20
• Routers pass periodic copies of routing table to neighbor routers and accumulate distance vectors.
Distance Vector Routing Protocols
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-21
• Routers discover the best path to destinations from each neighbor.
Sources of Information and Discovering Routes
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-22
Selecting the Best Route with Metrics
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-23
• Updates proceed step-by-step from router to router.
Maintaining Routing Information
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-24
• Each node maintains the distance from itself to each possible destination network.
Inconsistent Routing Entries
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-25
• Slow convergence produces inconsistent routing.
Inconsistent Routing Entries (Cont.)
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-26
• Router C concludes that the best path to network 10.4.0.0 is through router B.
Inconsistent Routing Entries (Cont.)
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-27
• Router A updates its table to reflect the new but erroneous hop count.
Inconsistent Routing Entries (Cont.)
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-28
• Hop count for network 10.4.0.0 counts to infinity.
Count to Infinity
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-29
• Define a limit on the number of hops to prevent infinite loops.
Defining a Maximum
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-30
• Packets for network 10.4.0.0 bounce (loop) between routers B and C.
Routing Loops
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-31
• It is never useful to send information about a route back in the direction from which the original information came.
Split Horizon
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-32
• Routers advertise the distance of routes that have gone down to infinity.
Route Poisoning
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-33
• Poison reverse overrides split horizon.
Poison Reverse
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-34
• The router keeps an entry for the network’s possible down state, allowing time for other routers to recompute for this topology change.
Holddown Timers
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-35
• The router sends updates when a change in its routing table occurs.
Triggered Updates
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-36
Distance Vector Operation
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-37
Distance Vector Operation (Cont.)
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-38
Distance Vector Operation (Cont.)
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-39
Distance Vector Operation (Cont.)
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-40
Distance Vector Operation (Cont.)
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-41
Distance Vector Operation (Cont.)
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-42
Summary
• Distance vector-based routing algorithms (also known as Bellman-Ford algorithms) pass periodic copies of a routing table from router to router.
• When the topology in a distance vector protocol internetwork changes, routing table updates must occur. As with the network discovery process, topology change updates proceed step-by-step from router to router.
• When maintaining the routing information, inconsistencies can occur if the internetwork’s slow convergence on a new configuration causes incorrect routing entries.
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-43
Summary (Cont.)
• The condition called count to infinity arises when routing table updates continue to increase the metric to a destination that cannot be reached, rather than marking the destination as unreachable.
• A routing loop occurs when two or more routers have incorrect routing information indicating that a valid path to an unreachable destination exists through the other routers.
• A number of techniques are available to eliminate routing loops including: split horizon, route poisoning, poison reverse, holddown timers, and triggered updates.
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-44© 2002, Cisco Systems, Inc. All rights reserved. 44
Enabling RIP
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-45
• Maximum is 6 paths (default = 4)
• Hop-count metric selects the path
• Routes update every 30 seconds
RIP Overview
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-46
• Router configuration– Select routing protocols.
– Specify networks or interfaces.
IP Routing Configuration Tasks
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-47
• Defines an IP routing protocol
Router(config)#router protocol [keyword]
• Mandatory configuration command for each IP routing process
• Identifies the physically connected network that routing updates are forwarded to
Router(config-router)#network network-number
Dynamic Routing Configuration
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-48
• Starts the RIP routing process
Router(config)#router rip
Router(config-router)#network network-number
• Selects participating attached networks
• Requires a major classful network number
RIP Configuration
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-49
RIP Configuration Example
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-50
Verifying the RIP Configuration
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-51
Displaying the IP Routing Table
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-52
debug ip rip Command
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-53
Summary
• RIP is a distance vector routing protocol that uses hop count as the metric for route selection and broadcasts routing updates every 30 seconds.
• To enable a dynamic routing protocol, you will select the routing protocol and then assign IP network numbers.
• The router rip command specifies RIP as the routing protocol. The network command identifies a participating attached network.
• The show ip commands display information about routing protocols and the routing table.
• Use the debug ip rip command to display information on RIP routing transactions.
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-54© 2002, Cisco Systems, Inc. All rights reserved. 54
Enabling IGRP
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-55
• More scalable than RIP
• Sophisticated metric
• Multiple-path support
Introducing IGRP
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-56
•Bandwidth
•Delay
•Reliability
•Loading
•MTU
IGRP Composite Metric
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-57
•Maximum 6 paths (default = 4)
•Within metric variance
•Next-hop router closer to destination
IGRP Unequal Multiple Paths
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-58
Configuring IGRP
Router(config-router)#network network-number
• Selects participating attached networks
Router(config)#router igrp autonomous-system
• Defines IGRP as the IP routing protocol
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-59
Configuring IGRP (cont.)
Router(config-router)#traffic-share {balanced | min}
• Controls how load-balanced traffic is distributed
Router(config-router)#variance multiplier
• Controls IGRP load balancing
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-60
IGRP Configuration Example
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-61
Verifying the IGRP Configuration
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-62
Displaying the IP Routing Table
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-63
debug ip igrp transaction Command
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-64
debug ip igrp events Command
RouterA#debug ip igrp eventsIGRP event debugging is onRouterA#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: 200: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: 100:23:48: IGRP: received update from 10.1.1.2 on Serial200:23:48: IGRP: Update contains 1 interior, 1 system, and 0 exterior routes.00:23:48: IGRP: Total routes in update: 2
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-65
Updating Routing Information Example
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-66
Updating Routing Information Example (Cont.)
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-67
Updating Routing Information Example (Cont.)
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-68
Updating Routing Information Example (Cont.)
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-69
Summary
• IGRP has several key features such as increased scalability, a sophisticated metric, and multiple paths.
• IGRP uses a composite routing metric that can include bandwidth, delay, reliability, loading, and MTU value.
• The IGRP composite routing metric supports multiple paths between source and destination.
• Use the router igrp and network commands to create an IGRP routing process. Use the variance and traffic-share commands to configure IGRP load balancing.
• Use the show ip protocols and show ip route commands to display information about your IGRP configuration.
• Use the debug ip igrp transaction command to display transaction information on IGRP routing transactions and the debug ip igrp events command to display a summary of the IGRP routing information.