Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Cisco Press CCNA ICND 2004 - Cisco Press.pdf
Скачиваний:
120
Добавлен:
24.05.2014
Размер:
13.19 Mб
Скачать

Configuring RIP and IGRP 173

must use the same IGRP AS number (5 in this case), and because all interfaces on each of the routers are in network 10.0.0.0, only a single network 10.0.0.0 subcommand is needed.

The show ip route command provides the most direct view of what a routing protocol does. First, the legend at the beginning of the show ip route command in Example 5-9 defines the letter codes that identify the source of the routing information—such as C for connected routes, R for RIP, and I for IGRP. Each of the Class A, B, and C networks is listed, along with each of that network’s subnets. If a static mask is used within that network, the mask is shown only in the line referring to the network. Each routing entry lists the subnet number and the outgoing interface. In most cases, the next-hop router’s IP address is also listed.

IGRP learns the same routes that RIP learned, but using different metrics. The output of the show ip route command lists six subnets. Also, notice the two routes to 10.1.5.0/24—one through Yosemite and one through Seville. Both routes are included in the routing table, because the default setting for maximum-paths is 4, and because the routes have an equal metric. Looking further into the output of the debug ip igrp transactions command, you can see the equal-cost routes being advertised. One route is shown in the update received on Serial1; the other route in the update is received on Serial0.

The output of the debug ip igrp transactions command shows the details of the routing updates, whereas the debug ip igrp events command simply mentions that routing updates have been received.

Finally, the show ip protocol command lists several important details about the routing protocol. The update timer is listed, shown with the time remaining until the next routing update is to be sent. Also, the elapsed time since an update was received from each neighboring router is listed at the end of the output. This command also lists each of

the neighbors from which routing information was received. If you are in doubt as to whether updates have been received during the recent past and from which routers, the show ip protocol command is the place to find out.

Issues When Multiple Routes to the Same Subnet Exist

With redundant links in a network, routers learn about multiple routes to the same subnet. A router might learn one route with one metric and then learn a better route that has a lower metric and replace the old route with the new, better route. Or, the old route might have a better metric. In some cases, the metric might tie, and the router has to decide what to do.

Figure 5-12 outlines an example in which new routes are learned. In the figure, Router B formerly only had a link to Router A; then, a link to Router C was added. Table 5-12 shows Router B’s routing table before the serial link between Routers B and C comes up, and Table 5-13 shows Router B’s routing table after the link between Routers B and C comes up.

174 Chapter 5: RIP, IGRP, and Static Route Concepts and Configuration

Figure 5-12 Routers A and C Advertising to Router B

162.11.5.0Router A

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Routing Update

 

 

 

 

 

 

 

 

 

 

 

 

 

1

 

 

 

162.11.10.0

 

2

 

 

 

 

 

 

 

 

S0

S1

 

 

 

 

 

 

 

 

 

 

 

 

 

162.11.5.0

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

162.11.9.0

 

1

 

162.11.9.0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

162.11.8.0

 

 

 

 

 

 

S0

 

 

 

 

 

 

 

 

 

 

S0

 

 

 

 

 

162.11.6.0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S1

 

 

S1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Router C

 

 

 

 

 

 

 

 

Router B

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

162.11.10.0

1

 

 

 

 

 

E0

 

 

 

 

 

 

 

 

 

 

 

 

 

162.11.9.0

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

162.11.5.0

2

 

 

 

 

 

 

 

 

 

 

 

 

 

162.11.10.0

 

 

 

 

 

 

 

 

 

 

 

 

162.11.7.0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Routing Update

NOTE The routing updates shown in Figure 5-12 show only the information needed for the point being made in this example. Other routes that would normally be in the routing update have been omitted.

Table 5-12 Router B Routing Table While Router B Serial1 Is Down

Group

Outgoing Interface

Next-Hop Router

Metric

Comments

 

 

 

 

 

162.11.5.0

S0

162.11.8.1

1

 

 

 

 

 

 

162.11.7.0

E0

0

 

 

 

 

 

 

162.11.8.0

S0

0

 

 

 

 

 

 

162.11.9.0

S0

162.11.8.1

1

The metric 1 route is

 

 

 

 

learned from Router A.

 

 

 

 

 

162.11.10.0

S0

162.11.8.1

2

Currently, the best

 

 

 

 

route is through

 

 

 

 

Router A, because the

 

 

 

 

link to Router C is

 

 

 

 

down.

 

 

 

 

 

Configuring RIP and IGRP 175

Table 5-13 Router B Routing Table After Learning a Second Valid Route to Subnet 162.11.10.0

 

Outgoing

 

 

 

Group

Interface

Next-Hop Router

Metric

Comments

 

 

 

 

 

162.11.5.0

S0

162.11.8.1

1

 

 

 

 

 

 

162.11.6.0

S1

0

This route was added because it

 

 

 

 

is directly connected to S1,

 

 

 

 

which is now up and

 

 

 

 

operational.

 

 

 

 

 

162.11.7.0

E0

0

 

 

 

 

 

 

162.11.8.0

S0

0

 

 

 

 

 

 

162.11.9.0

S0

162.11.8.1

1

The metric 1 route was learned

 

 

 

 

from Router A, but Router C

 

 

 

 

also advertises a metric 1 route!

 

 

 

 

Only one route is chosen—the

 

 

 

 

first one that was learned.

 

 

 

 

 

162.11.10.0

S1

162.11.6.2

1

A better route replaces the old

 

 

 

 

route. The new route has a

 

 

 

 

smaller metric and points

 

 

 

 

directly out S1 toward Router

 

 

 

 

C.

 

 

 

 

 

Router B changes only one route in this case in reaction to the new routing updates

from Router C. Router B changes its route to 162.11.10.0 because the metric for the route through Router C (metric 1) is smaller than the one from Router A (metric 2).

Router B adds only one route in this example—the directly connected subnet 162.11.6.0. This route is added not because of this distance vector routing protocol, but because it is a directly connected subnet and that interface is now up.

In this example, Router B does not change its route to subnet 162.11.9.0, even though Router B now learns a metric 1 route to subnet 162.11.9.0 through both Router C

and Router A. In this case, the route that was already in the table is left in the table, which is a reasonable choice. For Router B to behave as in this example, it needs to configure the router igrp or router rip subcommand command maximum-paths 1, which means that Router B should add at most one route to the same subnet to the routing table. With maximum-paths set to 1, the first route that is added to the table stays in the table, and routes learned later, with the same metric, are not added.

By default, Cisco IOS software includes up to four equal-cost routes to the same subnet in the routing table—essentially as if maximum-paths 4 had been configured. In the last example, if Router B had used the default setting, it would have added a second route to 162.11.9.0, pointing out Serial1 through Router C. You can configure maximum-paths as low as 1 or as high as 6.

176 Chapter 5: RIP, IGRP, and Static Route Concepts and Configuration

When RIP places more than one route to the same subnet in the routing table, the router balances the traffic across the various routes. (The details of how Cisco IOS software balances packets is explained in detail in the Cisco Press book Inside Cisco IOS Software Architectures.)

The metric formula used for IGRP (and EIGRP) poses an interesting problem when considering equal-metric routes. IGRP can learn more than one route to the same subnet with different metrics; however, the metrics are very unlikely to be equal, because the metric is actually calculated with a mathematical formula. So, with IGRP (and EIGRP), you can tell the routing protocol to think of metrics that are “pretty close” as being equal. To do so, Cisco IOS software uses the variance router subcommand to define how different the metrics can be for routes to be considered to have equal metrics.

The variance command defines a multiplier; any metrics lower than the product of the lowest metric and the variance are considered equal. For example, if the metric for the better of two routes is 100, and the variance is set to 2, a second route with a metric less than 200 is considered equal-cost and can be added to the routing table (depending on the configuration of maximum-paths). If the variance were set to 4 in this example, routes to the same subnet with a metric less than 400 could be added to the routing table.

When IGRP places more than one route to the same subnet in the routing table, the router balances the traffic across the various routes in proportion to the metric values. You can choose to tell the router to use only the lowest-cost route using the traffic-share min router IGRP subcommand. This command tells the router that, even if multiple routes to the same subnet are in the routing table, it should use only the route that truly has the smallest metric. So why not just add only the truly lowest metric route to the routing table in the first place? Well, if the other pretty good routes are in the table, and the best one fails, you do not have to wait on IGRP to converge and add a new route to the routing table. Convergence time is practically instantaneous! So you can use the strategy of adding multiple nearly-equal-cost routes using the variance command, use the traffic-share min command to tell the router to just use the best of these routes, and converge more quickly when that route fails.

Administrative Distance

Many companies and organizations use a single routing protocol. However, in some cases, a company needs to use multiple routing protocols. For instance, if two companies connect their networks so that they can exchange information, they need to exchange some routing information. If one company uses RIP, and the other uses IGRP, on at least one router, both RIP and IGRP must be used. This is just one example, but it is not that unusual to need to run more than one routing protocol in a single router.

Configuring RIP and IGRP 177

Depending on the network topology, two routing protocols might learn routes to the same subnets. When a single routing protocol learns multiple routes to the same subnet, the metric tells it which route is best. However, because different routing protocols use different metrics, the IOS cannot compare the metrics. For instance, RIP might learn a route to subnet 10.1.1.0 with metric 1, and IGRP might learn a route to 10.1.1.0 with metric 8729. There is no basis for comparison between the two metrics.

To decide which route to use, IOS uses a concept called administrative distance. Administrative distance is a number that denotes how believable an entire routing protocol is on a single router. The lower the number, the better, or more believable, the routing protocol. For instance, RIP has a default administrative distance of 120, and IGRP defaults to 100, making IGRP more believable than RIP. So, when both routing protocols learn routes to the same subnet, the router adds only the IGRP route to the routing table.

The administrative distance values are configured on a single router and are not exchanged with other routers. Table 5-14 lists the various sources of routing information, along with the default administrative distances.

Table 5-14 Default Administrative Distances

Route Type

Administrative Distance

 

 

Connected

0

 

 

Static

1

 

 

EIGRP summary route

5

 

 

EBGP

20

 

 

EIGRP (internal)

90

 

 

IGRP

100

 

 

OSPF

110

 

 

IS-IS

115

 

 

RIP

120

 

 

EIGRP (external)

170

 

 

iBGP (external)

200