Distance-Vector and Link-State Routing Protocols

Interior protocols are further divided into two classes, based on the way they make routing decisions and the kind of information they share. The two classes are distance-vector protocols and link-state protocols.

8.3.1. Distance-Vector Protocols

Distance-vector protocols provide two pieces of information for every route: a distance and a vector. These two pieces of information are distributed as part of a network map to all other routers. The distance is some measurement of the route's quality, based on parameters such as bandwidth, delay, or the number of intervening routers; the distance is never related to the actual physical distance between routers. To avoid confusion, I'll use the term "metric" instead of distance. The vector is simply the IP address of the router to which the packet should be delivered in order to reach its final destination; this is frequently called the "next hop ."

Each routing protocol has its own way to calculate the metric . For RIP, the metric is simply the number of hops (i.e., routers) between the current router and the destination. IGRP and EIGRP use a link's bandwidth and delay to calculate a metric value. The router "decides" which path is more cost-effective by using the metric value. A lower metric value means a better route. In RIP, two hops is better than three hops, even if the two hops are slow links and the three hops are fast links. Because IGRP and EIGRP use a more complex metric, they can take into account factors such as link speeds. We'll discuss metrics in more detail when we talk about specific protocols.

8.3.2. Link-State Routing Protocols

Link-state protocols build snapshots of the network topology on each router. This topology of the surrounding network is then distributed to all other routers, which allows all the routers to build a picture of the entire network. This picture allows each router to compute the best path to any destination at any time.

Once all routers have received the initial flood of network information, they broadcast only changes to the entire network. For example, if a link goes down, the router noticing the problem distributes only that change to the network; it doesn't distribute the entire network table. This link-state information saves network bandwidth by reducing the amount of routing traffic needed for routing updates.

8.3.3. Administrative Distance

The router can learn about routes from many sources: it already knows about any interfaces to which it is directly connected, it can be configured with static routes, and it can learn routes from any number of routing protocols that are running concurrently. The routing protocols, of course, have mechanisms for deciding which routes they prefer. But how does the router decide whether to use a route learned from BGP, a route learned from RIP, or a static default route?

That's where the concept of administrative distance comes in. Each route is assigned an administrative distance, based on how the route was learned. The administrative distance tells the router how trustworthy the route is; a lower administrative distance means that a route is more trustworthy and should be used in preference to routes with higher administrative distances. Think of the route's metric as the preference of a route, while the administrative distance is the preference of how the route was discovered. The maximum administrative distance is 255; a route with an administrative distance of 255 is considered to have an unknown source and is unusable. Table 8-1 lists the default administrative distances for all route sources.

Table 8-1. Administrative distances

Routing information source

Administrative distance

Directly connected interface

0

Static route

1

External BGP

20

Internal EIGRP

90

IGRP

100

OSPF

110

IS-IS

115

RIP

120

EGP

140

External EIGRP

170

Internal BGP

200

Unknown

255

Table 8-1 shows that a route learned by a static route is preferred over a route learned by IGRP. And of course, a route to a network attached to a directly connected interface is the most preferred route.

8.3.4. Variable-Length Subnet Masks (VLSM) and Classless Routing

You can also divide interior routing protocols into two groups based on whether they are classful or classless . A classful protocol relies on the historical distinction between Class A, B, and C networks to interpret addresses. The router itself can use subnet masks associated with its interfaces, but the routing protocol has no way to tell other routers about the masks. The protocol assumes that the subnet mask is a constant throughout the network. In contrast, a classless protocol communicates information about subnet masks explicitly, which allows you to design much more efficient network-addressing schemes.

The biggest drawback of a classful routing protocol is the waste of IP addresses. For example, if you are building a network with a Class C address and a subnet mask of 255.255.255.224, and you need to provide a point-to-point link between two routers, you must assign a whole subnet to that link. This subnet wastes 28 IP addresses: 255.255.255.224 has a total of 32 addresses, of which 2 are not usable (the broadcast address and the subnet address) and 2 are used by the routers at the endpoints of the link; the remaining 28 are not used.

If we use a different subnet mask on this link, the wasted IP addresses can be reclaimed. In this situation, VLSM is the solution. VLSM allows us to assign a smaller subnet mask to the link itself (255.255.255.252). This mask creates an address block that has only four addresses, none of which are wasted.

Another solution for links like this is to use the ip unnumbered command. See Chapter 5 for an example of how this command saves you from wasting IP addresses.

VLSM solves most IP-address issues, but it requires a classless routing protocol, i.e., a routing protocol that can explicitly exchange information about subnet masks, rather than inferring the network mask from the address class. The routing protocols that support VLSM (i.e., the classless protocols) are RIP Version 2, OSPF, EIGRP, and IS-IS. (Using static routes is, of course, consistent with VLSM because static routes don't require a routing protocol. Static routes are covered in detail in the next section.)

8.3.5. Protocol Comparison

Table 8-2 provides a summary of all the interior routing protocols covered in this book. (BGP isn't included because it's an exterior protocol.)

Table 8-2. Features of common interior routing protocols

 

RIP

RIPv2

IGRP

EIGRP

OSPF

IS-IS

VLSM support

No

Yes

No

Yes

Yes

Yes

Convergence

Slow

Slow

Medium

Fast

Fast

Fast

Configuration

Easy

Easy

Medium

Medium

Hard

Medium

Bandwidth use

High

High

High

Low

Low

Low

Scalability

Poor

Poor

Good

Good

Good

Good

Interoperability

Yes

Yes

No

No

Yes

Yes


Getting Started

IOS Images and Configuration Files

Basic Router Configuration

Line Commands

Interface Commands

Networking Technologies

Access Lists

IP Routing Topics

Interior Routing Protocols

Border Gateway Protocol

Quality of Service

Dial-on-Demand Routing

Specialized Networking Topics

Switches and VLANs

Router Security

Troubleshooting and Logging

Quick Reference

Appendix A Network Basics

Index



Cisco IOS in a Nutshell
Cisco IOS in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596008694
EAN: 2147483647
Year: 2006
Pages: 1031
Authors: James Boney

Similar book on Amazon

Flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net