![]() ![]() |
|
|
![]() |
![]() |
![]() ![]() |
![]() |
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
![]() |
![]() ![]() |
![]() |
![]() ![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
![]() |
|
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|||
![]() |
Close Window | ![]() |
|
![]() |
![]() |
![]() |
|
![]() |
![]() |
![]() |
![]() |
All contents copyright © 2003 Cisco Systems, Inc. All rights reserved. |
![]() ![]() |
Overview |
|
![]() ![]() |
6.1 |
![]() |
Introduction to Static Routing | |
6.1.1 |
![]() |
Introducing routing |
Routing is the process that a router uses to
forward packets toward the destination network. A router makes decisions
based upon the destination IP address of a packet. All devices along the way
use the destination IP address to point the packet in the correct direction
so that the packet eventually arrives at its destination. In order to make
the correct decisions, routers must learn the direction to remote networks.
When routers use dynamic routing, this information is learned from other
routers. When static routing is used, a network administrator configures
information about remote networks manually. Because static routes must be configured manually, any network topology changes require the network administrator to add and delete static routes to account for the changes. In a large network this manual maintenance of routing tables could require a tremendous amount of administrative time. On small networks with few possible changes, static routes require very little maintenance. Because of the extra administrative requirements, static routing does not have the scalability of dynamic routing. Even in large networks, static routes that are intended to accomplish a specific purpose are often configured in conjunction with a dynamic routing protocol.
|
![]() ![]() |
6.1 |
![]() |
Introduction to Static Routing | |
6.1.2 |
![]() |
Static route operation |
Static route operations can be divided into
these three parts:
Since a static route is manually configured,
the administrator must configure the static route on the router using the
ip route
command. The correct syntax for the
ip route
command is shown in Figure
In Figures
The administrative distance is an optional parameter that gives a measure of the reliability of the route. A lower value for the administrative distance indicates the more reliable route. Thus, a route with a lower administrative distance will be installed before an identical route with a higher administrative distance. The default administrative distance when using next-hop address is 1, while the default administrative distance when using the outgoing interface is 0. If an administrative distance other than the default is desired, a value between 0 and 255 is entered after the next-hop or outgoing interface as follows:
If the router cannot reach the outgoing interface that is being used in the route, the route will not be installed in the routing table. This means if that interface is down, the route will not be placed in the routing table. Sometimes static routes are used for backup purposes. A static route can be configured on a router that will only be used when the dynamically learned route has failed. To use a static route in this manner, simply set the administrative distance higher than that of the dynamic routing protocol being used.
|
![]() ![]() |
6.1 |
![]() |
Introduction to Static Routing | |
6.1.3 |
![]() |
Configuring static routes |
This section lists the steps for configuring
static routes and gives an example of a simple network for which static
routes might be configured. Use the following steps to configure static routes:
The example network is a simple three-router
configuration.
Packets that have a destination network of 172.16.1.0 need to be routed to Sterling and packets that have a destination address of 172.16.5.0 need to be routed to Waycross. Static routes can be configured to accomplish this task. Both static routes will first be configured
to use a local interface as the gateway to the destination networks.
The same two static routes can also be
configured using a next-hop address as their gateway.
|
![]() ![]() |
6.1 |
![]() |
Introduction to Static Routing | |
6.1.4 |
![]() |
Configuring default route forwarding |
Default routes are used to route packets
with destinations that do not match any of the other routes in the routing
table. Routers are typically configured with a default route for
Internet-bound traffic, since it is often impractical and unnecessary to
maintain routes to all networks in the Internet. A default route is actually
a special static route that uses this format:
The 0.0.0.0 mask, when logically ANDed to the destination IP address of the packet to be routed, will always yield the network 0.0.0.0. If the packet does not match a more specific route in the routing table, it will be routed to the 0.0.0.0 network. Use the following steps to configure default routes:
In the section Configuring Static Routes, static routes were configured on Hoboken to make networks 172.16.1.0 on Sterling and 172.16.5.0 on Waycross accessible. It should now be possible to route packets to both of these networks from Hoboken. However, neither Sterling nor Waycross will know how to return packets to any non-directly connected network. A static route could be configured on Sterling and Waycross for each of the non-directly connected destination networks. This would not be a scalable solution on a larger network. Sterling connects to all non-directly
connected networks via interface Serial 0. Waycross has only one connection
to all non-directly connected networks. This is through interface Serial 1.
A default route on both Sterling and Waycross will provide routing for all
packets that are destined for non-directly connected networks.
|
![]() ![]() |
6.1 |
![]() |
Introduction to Static Routing | |
6.1.5 |
![]() |
Verifying static route configuration |
After static routes are configured it is
important to verify that they are present in the routing table and that
routing is working as expected. The command
show running-config
is used to view the active configuration in RAM 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:
|
![]() ![]() |
6.1 |
![]() |
Introduction to Static Routing | |
6.1.6 |
![]() |
Troubleshooting static route configuration |
In the section "Configuring Static Routes",
static routes were configured on Hoboken to make networks 172.16.1.0 on
Sterling and 172.16.5.0 on Waycross accessible
![]() ![]() ![]() ![]()
|
![]() ![]() |
6.2 |
![]() |
Dynamic Routing Overview | |
6.2.1 |
![]() |
Introduction to routing protocols |
Routing protocols are different from routed
protocols in both function and task. A
routing protocol is the communication used between routers. A routing
protocol allows one router to share information with other routers regarding
the networks it knows about as well as its proximity to other routers. The
information a router gets from another router, using a routing protocol, is
used to build and maintain a routing table. Examples of routing protocols are:
A routed protocol is used to direct user traffic. A routed protocol provides enough information in its network layer address to allow a packet to be forwarded from one host to another based on the addressing scheme. Examples of routed protocols are:
|
![]() ![]() |
6.2 |
![]() |
Dynamic Routing Overview | |
6.2.2 |
![]() |
Autonomous systems |
An autonomous system (AS) is a collection of
networks under a common administration sharing a common routing strategy. To
the outside world, an AS is viewed as a single entity. The AS may be run by
one or more operators while presenting a consistent view of routing to the
external world. The American Registry of Internet Numbers (ARIN), a service provider, or an administrator assigns an identifying number to each AS. This autonomous system number is a 16 bit number. Routing protocols, such as Cisco’s IGRP, require assignment of a unique, autonomous system number.
|
![]() ![]() |
6.2 |
![]() |
Dynamic Routing Overview | |
6.2.3 |
![]() |
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, information learned from the
configuration of its own interfaces, along with manually configured routes. The routing protocol learns all available routes, places the best routes into the routing table, and removes routes when they are no longer valid. The router uses the information 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 knowledgebase must also change. The network knowledgebase needs to reflect an accurate consistent view of the new topology. When all routers in an internetwork are operating with the same knowledge, the internetwork is said to have converged. Fast convergence is desirable because it reduces the period of time in which routers would continue to make incorrect routing decisions. Autonomous systems (AS) provide the division of the global internetwork into smaller and more manageable networks. Each AS has its own set of rules and policies and an AS number that will uniquely distinguish it from other autonomous systems throughout the world.
|
![]() ![]() |
6.2 |
![]() |
Dynamic Routing Overview | |
6.2.4 |
![]() |
Identifying the classes of routing protocols |
Most routing algorithms can be classified
into one of two categories:
The distance vector routing approach determines the direction (vector) and distance to any link in the internetwork. The link-state approach, also called shortest path first, recreates the exact topology of the entire internetwork.
|
![]() ![]() |
6.2 |
![]() |
Dynamic Routing Overview | |
6.2.5 |
![]() |
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. Distance vector based
routing algorithms are also known as Bellman-Ford algorithms.
Each router receives a routing table from its
directly connected neighbor routers.
The algorithm eventually accumulates network distances so that it can maintain a database of network topology information. However, distance vector algorithms do not allow a router to know the exact topology of an internetwork as each router only sees its neighbor routers. Each router that uses distance vector routing
begins by identifying its own neighbors.
Routing table updates occur when the topology
changes. As with the network discovery process, topology change updates
proceed step-by-step from router to router.
An analogy of distance vector could be the signs found at a highway intersection. A sign points towards a destination and indicates the distance to the destination. Further down the highway, another sign points toward the destination, but now the distance is shorter. As long as the distance is shorter, the traffic is following the best path.
|
![]() ![]() |
6.2 |
![]() |
Dynamic Routing Overview | |
6.2.6 |
![]() |
Link-state routing protocol features |
The second basic algorithm used for routing
is the link-state algorithm. Link-state algorithms are also known as
Dijkstras algorithm or as SPF (shortest path first) algorithms. Link-state
routing algorithms maintain a complex database of topology information. The
distance vector algorithm has nonspecific information about distant networks
and no knowledge of distant routers. A link-state routing algorithm
maintains full knowledge of distant routers and how they interconnect.
Link-state routing uses:
Network discovery processes for link state
routing The SPF algorithm computes network
reachability. The router constructs this logical topology as a tree, with
itself as the root, consisting of all possible paths to each network in the
link-state protocol internetwork. It then sorts these paths Shortest Path
First (SPF). The router lists the best paths and the interfaces to these
destination networks in the routing table. It also maintains other databases
of topology elements and status details.
The router that first becomes aware of a
link-state topology change forwards the information so that all other
routers can use it for updates.
When the router receives an LSA, the database is updated with the most recent information and computes a map of the internetwork using the accumulated data and calculates the shortest path to other networks using the SPF algorithm. Each time an LSA packet causes a change to the link-state database, SPF recalculates the best paths and updates the routing table. Link-state concerns:
Routers running link-state protocols require
more memory and perform more processing than distance vector routing
protocols. Routers must have sufficient memory to be able to hold all the
information from the various databases, the topology tree, and the routing
table.
|
![]() ![]() |
6.3 |
![]() |
Routing Protocols Overview | |
6.3.1 |
![]() |
Path determination |
A router determines the path of a packet
from one data link to another, using two basic functions:
Path determination occurs at the network
layer. The path determination function enables a router to evaluate the
paths to a destination and to establish the preferred handling of a packet.
The router uses the routing table to determine the best path and proceeds to
forward the packet using the switching function.
The switching function is the internal process used by a router to accept a packet on one interface and forward it to a second interface on the same router. A key responsibility of the switching function of the router is to encapsulate packets in the appropriate frame type for the next data link. Figure
|
![]() ![]() |
6.3 |
![]() |
Routing Protocols Overview | |
6.3.2 |
![]() |
Routing configuration |
Enabling an IP routing protocol on a router
involves the setting of both global and routing parameters. Global tasks
include selecting a routing protocol, such as RIP, IGRP, EIGRP or OSPF. The
major task in the routing configuration mode is to indicate IP network
numbers. Dynamic routing uses broadcasts and multicasts to communicate with
other routers. The routing metric helps routers find the best path to each
network or subnet.
![]()
The
router command starts a routing
process.
The
network command is required
because it enables the routing process to determine which interfaces
participate in the sending and receiving of routing updates.
An example of a routing configuration is:
The network numbers are based on the network class addresses, not subnet addresses or individual host addresses. Major network addresses are limited to Class A, B, and C network numbers.
|
![]() ![]() |
6.3 |
![]() |
Routing Protocols Overview | |
6.3.3 |
![]() |
Routing protocols |
At the Internet layer of the TCP/IP suite of
protocols, a router can use an IP routing protocol to accomplish routing
through the implementation of a specific routing algorithm. Examples of IP
routing protocols include:
![]()
Routing Information Protocol (RIP) was originally specified in RFC 1058. Its key characteristics include the following:
Interior Gateway Routing Protocol (IGRP) is a proprietary protocol developed by Cisco. Some of the IGRP key design characteristics emphasize the following:
Open Shortest Path First (OSPF) is a nonproprietary link-state routing protocol. The key characteristics of OSPF are as follows:
EIGRP is a Cisco proprietary enhanced distance vector routing protocol. The key characteristics of EIGRP are as follows:
Border Gateway Protocol (BGP) is an exterior routing protocol. The key characteristics of BGP are as follows:
|
![]() ![]() |
6.3 |
![]() |
Routing Protocols Overview | |
6.3.4 |
![]() |
Autonomous systems and IGP versus EGP |
Interior routing protocols are designed for
use in a network whose parts are under the control of a single organization.
The design criteria for an interior routing protocol require it to find the
best path through the network. In other words, the metric and how that
metric is used is the most important element in an interior routing
protocol.
![]() An exterior routing protocol is designed for use between two different networks that are under the control of two different organizations. These are typically used between ISPs or between a company and an ISP. For example, a company would run BGP, an exterior routing protocol, between one of its routers and a router inside an ISP. IP exterior gateway protocols require the following three sets of information before routing can begin:
An exterior routing protocol must isolate
autonomous systems. Remember, autonomous systems are managed by different
administrations. Networks must have a protocol to communicate between these
different systems.
Autonomous systems have an identifying number, which is assigned to it by the American Registry of Internet Numbers (ARIN) or a provider. This autonomous system number is a 16-bit number. Routing protocols such as Cisco’s IGRP and EIGRP require that a unique, autonomous system number be assigned.
|
![]() ![]() |
6.3 |
![]() |
Routing Protocols Overview | |
6.3.5 |
![]() |
Distance vector |
Distance vector algorithms (also known as
Bellman-Ford algorithms) call for each router to send all or some portion of
its routing table only to its neighbors. Distance vector algorithms perform
routing decisions based upon information provided by neighboring routers.
![]() Distance vector protocols use fewer system resources but can suffer from slow convergence and may use metrics that do not scale well to larger systems. Distance vector protocols are based on finding the distance (number of hops) and vector (direction) to any link on the internetwork. The algorithms involve passing copies of a complete routing table from router to router on a periodic basis. This type of routing protocol requires that
each router simply inform its neighbors of its routing table.
|
![]() ![]() |
6.3 |
![]() |
Routing Protocols Overview | |
6.3.6 |
![]() |
Link-state |
Link-state algorithms (also known as
shortest path first algorithms) flood routing information to all routers in
the internetwork that creates a map of the entire network.
![]() Because they converge more quickly than distance vector protocols, link-state algorithms are less prone to routing loops. Link-state protocols are also less prone to routing errors, but they use more system resources. Link-state protocols, therefore, can be more expensive to implement and support. However, they are generally more scalable than distance vector protocols. When a network link changes state, a
notification called a link-state advertisement (LSA) is flooded throughout
the network. All the routers note the change and adjust their routes
accordingly.
|
![]() ![]() |
Summary |
An understanding of the following key points
should have been achieved:
|