Tải bản đầy đủ (.pdf) (10 trang)

CCNA 1 and 2 Companion Guide, Revised (Cisco Networking Academy Program) part 73 pdf

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (343.63 KB, 10 trang )

Static Routing 689
Verifying Static Route Configuration
It is important to verify that the static routes are present in the routing table and that
routing is working as expected after the static routes are configured. The command
show running-config is used to view the active configuration in NVRAM to verify that
the static route was entered correctly. The show ip route command is used to make
sure that the static route is present in the routing table.
Use the following steps to verify static route configuration:
Step 1 In privileged mode, enter the command show running-config to view the
active configuration.
Step 2 Verify that the static route has been entered correctly. If the route is not
correct, it will be necessary to go back into global configuration mode to
remove the incorrect static route and enter the correct one.
Step 3 Enter the command show ip route.
Step 4 Verify that the route that was configured is in the routing table.
Troubleshooting Static Route Configuration
Having knowledge of troubleshooting tools and procedures is just as important in
static routing as in any other aspect of networking. You can use the show interfaces
command to check the state and configuration of the interface that is to be used for the
route gateway. Using the ping command helps you to determine whether end-to-end
connectivity exists. If an echo reply is not received after a ping, you can use the tracer-
oute command to determine which router in the route path is dropping the packets.
The routing process must happen on each router the packet travels through, or the
packet will be dropped. In many cases, packets actually reach their destination, but the
remote network router has no knowledge of a route to reply to the sender.
Use the following steps to troubleshoot a static route configuration:
Step 1 Make sure that the link that is to be used as the gateway by the route is
available.
Step 2 Enter the command show interfaces, and verify that the interface is up
and that the line protocol is up.
Example 15-5 Default Route for Waycross


Waycross(config)# ip route 0.0.0.0 0.0.0.0 s1
Example 15-6 Default Route for Sterling
Sterling(config)# ip route 0.0.0.0 0.0.0.0 s0
1102.book Page 689 Tuesday, May 20, 2003 2:53 PM
690 Chapter 15: Routing and Routing Protocols
Step 3 Verify that the IP address being used on the interface is correct.
Step 4 ping the IP address on the remote router interface that is connected
directly to the route gateway. If the ping is not successful, the problem is
not related to routing. The interfaces of one or both of the directly con-
nected routers might be configured incorrectly, or a physical problem
might exist with the link. Return to Step 1 to troubleshoot.
Step 5 If the ping of the far-end router fails, use the traceroute command to
determine which router in the route path is dropping the packet.
Step 6 Log into the router with the failed traceroute. Return to Step 1 and start
again.
Step 7 If the ping is successful, attempt to ping the far-end router. If this ping is
successful, complete end-to-end connectivity has been achieved. The test
of the static route is complete.
Dynamic Routing Overview
Dynamic routing is necessary to allow networks to update and adapt quickly to changes.
The network shown in Figure 15-13 adapts differently to topology changes depending
on whether it uses statically or dynamically configured routing information.
Figure 15-13 Dynamic Route
Static routing allows routers to properly route a packet from network to network based
on manually configured information. In the example, Router A always sends traffic
destined for Router C to Router D. The router refers to its routing table and follows
A
X
D
B

C
1102.book Page 690 Tuesday, May 20, 2003 2:53 PM
Dynamic Routing Overview 691
the static knowledge residing there to relay the packet to Router D. Router D does the
same and relays the packet to Router C. Router C delivers the packet to the destina-
tion host.
If the path between Router A and Router D fails, Router A is not capable of relaying
the packet to Router D using that static route. Until Router A manually is reconfigured
to relay packets by way of Router B, communication with the destination network
is impossible. Dynamic routing offers more flexibility. According to the routing table
generated by Router A, a packet can reach its destination over the preferred route
through Router D.
However, a second path to the destination is available by way of Router B. When
Router A recognizes that the link to Router D is down, it adjusts its routing table,
making the path through Router B the preferred path to the destination. The routers
continue sending packets over this link.
When the path between Routers A and D is restored to service, Router A again can
change its routing table to indicate a preference for the counterclockwise path through
Routers D and C to the destination network. Dynamic routing protocols also can direct
traffic from the same session over different paths in a network for better performance.
This is known as load sharing.
Routing Protocol Examples
This section provides a brief overview of some of the most common routing protocols
and their key characteristics.
RIP originally was specified in RFC 1058. Its key characteristics include the following:
■ It is a distance vector routing protocol.
■ It uses hop count as the metric for path selection. If the hop count is greater than
15, the packet is discarded.
■ By default, routing updates are broadcast every 30 seconds.
IGRP is a distance vector routing protocol developed by Cisco. IGRP sends routing

updates at 90-second intervals, advertising networks for a particular autonomous system.
IGRP offers the following design characteristics and features:
■ Versatility for automatically handling indefinite or complex topologies
■ Flexibility for handling segments with different bandwidth and delay characteristics
■ Scalability for functioning in large networks
1102.book Page 691 Tuesday, May 20, 2003 2:53 PM
692 Chapter 15: Routing and Routing Protocols
By default, IGRP uses two metrics, bandwidth and delay. IGRP can be configured to
use a combination of variables to determine a composite metric. Possible configurations
include the following variables:
■ Bandwidth
■ Delay
■ Load
■ Reliability
OSPF is a link-state routing protocol used for IP. Link-state protocols keep a detailed
topology, which allows the protocol to use calculations that prevent loops. With OSPF,
the subnet mask also is transmitted, enabling features such as variable-length subnet
masking (VLSM) and route summarization.
EIGRP is a balanced hybrid routing protocol developed by Cisco. EIGRP has charac-
teristics in common with both distance vector protocols and link-state protocols. EIGRP
calculates the best route to each network or subnet and provides alternative routes that
can be used if the current route fails. EIGRP also transmits the subnet mask for each
routing entry. Therefore, features such as VLSM and route summarization easily are
supported.
BGP is an exterior routing protocol. BGP is designed to operate between autonomous
systems. BGPs can be used between two ISPs or between a company and an ISP.
Purpose of a Routing Protocol and Autonomous Systems
The goal of a routing protocol is to build and maintain the routing table. This table
contains the learned networks and associated ports for those networks. Routers use
routing protocols to manage information received from other routers and information

generated from the configuration of its own interfaces.
The routing protocol identifies all available routes, places the best routes into the rout-
ing table, and removes routes when they are no longer valid. The router uses the infor-
mation in the routing table to forward routed protocol packets.
The routing algorithm is fundamental to dynamic routing. Whenever the topology of
a network changes because of growth, reconfiguration, or failure, the network knowl-
edge base also must change. The network knowledge needs to reflect an accurate and
consistent view of the new topology.
When all routers in an internetwork are operating with the same knowledge, the inter-
network is said to have converged. Fast convergence is desirable because it reduces the
time period of incorrect routing decisions.
1102.book Page 692 Tuesday, May 20, 2003 2:53 PM
Dynamic Routing Overview 693
Autonomous systems divide the global internetwork into smaller and more manage-
able networks. Each AS has its own set of rules and policies and an AS number that
distinguishes it from all other autonomous systems in the world.
Dynamic Routing Operations
The success of dynamic routing depends on two basic router functions:
■ Maintenance of a routing table
■ Timely distribution of knowledge, in the form of routing updates, to other routers
(see Figure 15-14)
Figure 15-14 Routing Protocols Maintain Routing Information
Dynamic routing relies on a routing protocol to share knowledge among routers. A
routing protocol defines the set of rules used by a router when it communicates with
neighboring routers. For example, a routing protocol describes the following:
■ How to send updates
■ What knowledge is contained in these updates
■ When to send this knowledge
■ How to locate recipients of the updates
How Distances on Network Paths Are Determined by

Various Metrics
When a routing algorithm updates a routing table, its primary objective is to determine
the best information to include in the table. Each routing algorithm interprets what is
best in its own way. The algorithm generates a number called the metric value for each
path through the network. Typically, the smaller the metric number is, the better the
path is, as shown in Figure 15-15.
Routing Protocol
Routing
Table
Routing Protocol
Routing
Table
1102.book Page 693 Tuesday, May 20, 2003 2:53 PM
694 Chapter 15: Routing and Routing Protocols
Figure 15-15 Metrics Used to Define Best Path
You can calculate simple metrics based on a single characteristic such as path, or you
can calculate more complex metrics by combining several characteristics. The metric
characteristics that most commonly are used by routers are as follows:
■ Bandwidth—The data capacity of a link. (Normally, a 10-Mbps Ethernet link is
preferable to a 64-kbps leased line.)
■ Delay—The length of time required to move a packet along each link from
source to destination.
■ Load—The amount of activity on a network resource such as a router or a link.
■ Reliability—Usually a reference to the error rate of each network link.
■ Hop count—The number of routers that a packet must travel through before
reaching its destination.
■ Ticks—The delay on a data link using IBM PC clock ticks (approximately
55 milliseconds, or 1/18 second).
■ Cost—An arbitrary value, usually based on bandwidth, monetary expense, or
other measurement, that is assigned by a network administrator.

Identifying the Classes of Routing Protocols
Most routing algorithms can be classified under one of the following three categories:
■ Distance vector
■ Link-state
■ Balanced hybrid
T1 56
T1
56
Bandwidth
Delay
Load
Reliability
Hop count
Ticks
Cost
A
B
1102.book Page 694 Tuesday, May 20, 2003 2:53 PM
Identifying the Classes of Routing Protocols 695
The distance vector routing protocol approach determines the direction, or the vector,
and the distance to any link in the internetwork. The link-state routing protocol
approach, also called shortest path first (SPF), recreates the exact topology of the entire
internetwork. The balanced hybrid routing protocol approach combines aspects of the
link-state and distance vector algorithms.
Distance Vector Routing Protocol Features
Distance vector routing algorithms pass periodic copies of a routing table from router
to router. These regular updates between routers communicate topology changes. Dis-
tance vector–based routing algorithms also are known as Bellman-Ford algorithms.
In Figure 15-16, each router receives a routing table from its neighboring routers.
Router B receives information from Router A. Router B adds a distance vector number,

such as a number of hops, which increases the distance vector. Then Router B passes
this new routing table to its other neighbor, Router C. This step-by-step process occurs
in all directions between all neighbor routers.
Figure 15-16 Distance Vector Concepts
The algorithm accumulates network distances so that it can maintain a database of
network topology information. However, distance vector algorithms do not provide
routers with the exact topology of an internetwork because each router is aware of
only its neighbor routers.
1102.book Page 695 Tuesday, May 20, 2003 2:53 PM
696 Chapter 15: Routing and Routing Protocols
Each router that uses distance vector routing begins by identifying its neighbors. Fig-
ure 15-17 shows distance vector discovery. The interface that leads to each directly
connected network is shown as having a distance of 0. As the distance vector network
discovery process proceeds, routers discover the best path to destination networks based
on the information they receive from each neighbor. For example, Router A learns
about other networks based on the information that it receives from Router B. Each
of the other network entries in the routing table has an accumulated distance vector to
show how far away that network is in a given direction.
Figure 15-17 Distance Vector Network Discovery
Routing table updates occur when the topology changes. As with the network discov-
ery process, topology change updates proceed step by step from router to router, as
shown in Figure 15-18. Distance vector algorithms call for each router to send its entire
routing table to each of its adjacent neighbors. The routing tables include information
about the total path cost as defined by its metric and the logical address of the first
router on the path to each network contained in the table. The metric is made up of
several components, as shown in Figure 15-19.
Figure 15-18 Distance Vector Topology Changes
A
WXY Z
BC

0
0
1
2
W
X
Y
Z
Routing Table
0
0
1
1
X
Y
Z
W
Routing Table
0
0
1
2
Y
Z
X
W
Routing Table
B
Process to
Update This

Routing
Table
Router A
Sends
Out This
Updated
Routing
Table
A
Process to
Update This
Routing
Table
Topology
Change
Causes
Routing
Table
Update
1102.book Page 696 Tuesday, May 20, 2003 2:53 PM
Identifying the Classes of Routing Protocols 697
Figure 15-19 Distance Vector Routing Metric Components
Routing Updates Explained
Each router receives a routing table from its directly connected neighboring routers.
For example, in Figure 15-18, Router B receives information from Router A. Router B
adds a distance vector number (such as a number of hops), which increases the distance
vector and passes this new routing table to its another neighbor router. This same step-
by-step process occurs in all directions between direct-neighbor routers.
A distance vector is comparable to the signs along a highway. Highway signs direct
drivers toward a destination and indicate the distance to that destination. Farther down

the highway, additional signs point toward the same destination, but now the distance
is shorter. As long as the distance continues to become shorter, the traffic is on the right
path.
Link-State Routing Basics
The second basic algorithm used for routing is the link-state algorithm. Link-state algo-
rithms are also known as Dijkstras algorithm or as shortest path first (SPF) algorithms.
They maintain a complex database of topology information. Whereas the distance
vector algorithm has nonspecific information about distant networks and no knowl-
edge of distant routers, a link-state routing algorithm maintains full knowledge of dis-
tant routers and how they interconnect. Link-state routing uses the following:
■ Link-state advertisements (LSAs)—Small packets of routing information that
are sent between routers
■ Topological database—A collection of information gathered from LSAs
■ Shortest path first (SPF) algorithm—A calculation performed on the database
resulting in the SPF tree
■ Routing table—A list of the known paths and interfaces
1102.book Page 697 Tuesday, May 20, 2003 2:53 PM
698 Chapter 15: Routing and Routing Protocols
Engineers have implemented this link-state concept in Open Shortest Path First (OSPF)
routing. RFC 1583 contains a description of OSPF link-state concepts and operations.
Figure 15-20 illustrates these link-state concepts.
Figure 15-20 Link-State Concepts
Network Discovery Processes for Link-State Routing
LSAs are exchanged between routers, starting with directly connected networks. Each
router, in parallel with others, constructs a topological database consisting of all the
exchanged LSAs.
The SPF algorithm computes network accessibility. The router constructs this logical
topology as a tree, with itself as the root, consisting of all possible paths to each net-
work in the link-state protocol internetwork. It then sorts these paths using SPF. The
router lists the best paths and the interfaces to these destination networks in the rout-

ing table. The router also maintains other databases of topology elements and status
details.
How Link-State Protocols Exchange Routing Information
Link-state network-discovery mechanisms are used to create a common picture of the
entire network. All link-state routers share this view of the network. This is similar to
having several identical maps of a town. In Figure 15-21, four networks (W, X, Y, and
Link-State Advertisement Packets
Topological
Database
SPF
Algorithm
SPF Tree
Routing
Table
1102.book Page 698 Tuesday, May 20, 2003 2:53 PM

×