Major Functions of a Router


Routing is the process of transferring packets of information from a source to a destination node over an internetwork where at least one intermediary node is traversed along the way. Thirty years ago, internetworks were minimal in their design and monolithic in their architecture. Today, these internetworks are complex matrices of many different physical and logical topologies. Data packets now include information such as email, audio, video, graphics, and text. This complexity of routing has rapidly increased due to greater commercial exposure of large-scale internetworking and distributed-enterprise computing. Routers are regularly compared to bridges or switches, which at first glance seem to perform the same functions. The fundamental difference, however, is that bridging operates at the data-link layer (Layer 2) of the Open Systems Interconnection (OSI) reference model and routing occurs at the network layer (Layer 3). Consequently, routing and bridging use different processes and header information to move data from the source node to the destination node. This book focuses primarily on the goals of building scalable, routed internetworks using routing protocols.

You should have a solid understanding of the International Organization for Standardization's (ISO) seven-layer OSI networking model and the functions of each layer. The following table shows the OSI protocol stack:

Layer Number

OSI Layer

7

Application

6

Presentation

5

Session

4

Transport

3

Network

2

Data-link

1

Physical


A philosophical and technical difference exists between routed protocols and routing protocols that needs to be established from the outset. Routed protocols are responsible for the rules and procedures of encapsulating chunks of data. These protocols are actually the ones that are ultimately routed over the internetwork. The most popular routed protocol is Internet Protocol (IP). Other routed protocols include Novell Internetwork Packet Exchange/Sequenced Packet Exchange (IPX/SPX), AppleTalk, Digital Equipment Corporation Network (DECnet), Banyan VINES, and Xerox Network System (XNS).

A routing protocol, on the other hand, is responsible for moving the routed protocol packets across the internetwork from router to router using efficient routing algorithms. Later in this chapter, we will differentiate between static routing and dynamic routing. Common dynamic routing protocols include Routing Information Protocol version 1 and version 2 (RIPv1 and RIPv2), Interior Gateway Routing Protocol (IGRP), Enhanced Interior Gateway Routing Protocol (EIGRP), Open Shortest Path First (OSPF), Border Gateway Protocol version 4 (BGP-4), and Intermediate System-to-Intermediate System (IS-IS). Static routing and default gateway (router) configuration are manually designated protocols that inject routes into a routing table for special circumstances. Generally speaking, routing protocols are leveraged by intermediate systems to construct route tables that are used in the path determination process.

Path Determination

For a router to behave as a network relay device, it needs to have a working knowledge of the logical topology of the network. The basic goals of the routing process involve the determination of optimal routing paths and the transport of packets (known as packet switching ) through an internetwork. Packet switching is a relatively clear-cut process, whereas path determination can be quite a challenging venture.

Routing protocols use a mechanism called a metric to help determine the optimal route a packet will take. A metric is defined as a type of measurement yardstick, such as the number of hops (routing devices) to a destination used by routing algorithms to resolve the best path to a destination network or node (see Figure 2.1). Routing algorithms generate and maintain routing tables to facilitate the path determination process. The type of routing information stored in the table depends on the routing algorithm being used. In addition, different algorithms flood routing tables with an assortment of valuable information. Most routing protocols use auxiliary tables in concert with the routing table to store topology information and calculate optimal paths.

Figure 2.1. RIPv1 routers use hop count as their metric.

Routing tables commonly create mappings to forward the packet to a specific "next hop" router on the way to its final destination. When a router receives an inbound data packet, it references the routing table for the destination address in an attempt to associate this address with a next hop. Routing tables can also store information about the desirability of a path when multiple paths are available to a destination. Depending on the actual routing algorithm being implemented, routers compare different types of metrics to determine optimal and redundant paths.

Routers share this routing table information with other routers in an internetwork using an array of different messages. A common type of communication is the routing update message . An update message is typically made up of all, or a subset, of the routing table information. Routers subsequently converge on a complete picture of the network topology by processing routing updates from either a neighbor router or all other routers, depending on the protocol rules. For example, some routing protocols send a link-state advertisement to notify other routers about the status of the sender's network links. This link information can then be used to construct a comprehensive view of the network topology so routers can determine the most favorable routes to the final destination.

Switching

To be an effective routing device, a router must be capable of performing routing functions (such as learning and storing data about the network) as well as switching functions (such as transferring data from an incoming to an outgoing interface). A switching algorithm is comparatively simple and works the same for most routing protocols. The router commonly performs the following basic steps as part of the switching function:

  1. After a host decides to send a packet to another host, it gets a router's logical address by some means (such as an ARP broadcast). The host should have a default gateway configured or the router (gateway) needs to support proxy ARP. With Proxy ARP, a router sends an ARP response on behalf of an end node to the requesting host.

  2. The source host then sends a packet addressed specifically to a router's MAC address, including the Layer 3 address of the destination host.

    A MAC address is a data-link layer hardware address that every port or device uses to connect to a LAN segment. MAC addresses are defined by an IEEE standard, have a length of six characters , and use the usual the burned-in address (BIA) of the local LAN interface.


  3. Next, the router determines whether it knows how to forward the packet to the next hop according to the entries in its routing table.

  4. If the router does not know how to forward the packet, it typically drops the packet and generates an Internet Control Message Protocol (ICMP) error.

  5. However, if the router knows how to forward the packet, it changes the destination physical address field in the Layer 2 frame header to that of the next hop and moves the packet along. The next hop might or might not be the last destination. If it is not the ultimate destination, the next hop (usually another router) makes the same switching decisions.

Remember, as a packet moves through an internetwork, its source physical MAC address changes but its Layer 3 address typically remains the same until it reaches the destination network.


Requirements for Routing

Regardless of the specifics of the routing systems being implemented, all Cisco routers need to have answers to the following three questions to properly route networked packets:

  • Is a routed protocol module loaded and enabled?

  • What is the destination network?

  • What outbound interface represents the best path to the destination network?

A logical Layer 3 address is necessary to properly route packets through an internetwork. The address scheme depends on the individual routed protocol suite loaded into the router's running configuration. After the router determines the addressing method, it needs to look at the current route table for a path to the destination network. If the destination network is not represented in the table, and no default route has been configured, the router should discard the packet and generate an ICMP error notification as mentioned previously. The third step is to determine the outbound interface to use to get the packet to its destination. Because more than one routing process can be in use at a time, the router needs a method for selecting the best path when the same route is learned from several sources. A Cisco router running IP uses a mechanism called the administrative distance (AD) to facilitate the path determination process.

Administrative Distance

Because most routing protocols have metrics and algorithms that are not mutually compatible, the exchange of route information and path determination is essential when running multiple protocols. Administrative distance (AD) is the first decisive tool a router uses for route selection if two protocols provide route information for the same destination. The AD value defines the trustworthiness of a routing protocol by prioritizing protocols in order of the most reliable to the least reliable. Administrative distance has local significance only on the router; it is not advertised to other routers in routing updates.

The lower the administrative distance value, the more dependable the protocol. For instance, if a router receives a route to a destination network from RIP with a default AD of 120 and from IGRP with an AD of 100, the router uses IGRP because it is deemed more reliable based on the smaller administrative distance. The result is that the IGRP route information is injected into the routing table. If the IGRP information is lostbecause of a power failure, for examplethe RIP-derived information is used until IGRP reemerges. The default administrative distance values of the supported Cisco protocols are shown in Table 2.1.

Table 2.1. Default Administrative Distance Values of the Supported Cisco Protocols

Source of Route

Default Administrative Distance

Connected interface

Static route

1

EIGRP summary route

5

External BGP

20

Internal EIGRP

90

IGRP

100

OSPF

110

IS-IS

115

RIP

120

EGP

140

On Demand Routing

160

External EIGRP

170

Internal BGP

200

Unknown

255

If the administrative distance value is 255, the router will not trust the source of that route and subsequently will not inject the route into its routing table.


In some complex network environments, the administrative distance of a protocol might need to be tweaked so it takes precedence. Continuing the previous example, if you want your router to select RIP-learned routes instead of the IGRP-learned routes to the same destination, you could increase the AD number for IGRP to a number greater than 120 or decrease the AD number of RIP to a value less than 100. You can modify the administrative distance of a protocol with the distance command in the router configuration. There are no real absolutes for assigning AD numbers because each network has its own requirements. To modify the AD for a static route, you don't use the distance command. Instead, you use the following format:

  ip route   network subnet-mask next-hop distance  

Use caution with the distance command, however, because modifying the AD number can cause routing loops and other problems.

The following show ip route command illustrates a router, on an Ethernet network, as shown in Listing 2.1. Notice that in the second show ip route command, after IGRP has been enabled, the IGRP routes are being favored over the RIP routes ( AD=120 ) because the administrative distance of IGRP is lower at 100. This is indicated by the bold text.

Listing 2.1 Two Routers on Which IGRP Routes Are Preferred to RIP
 RouterA#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP        D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area        N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2        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 def        U - per-user static route, o - ODR Gateway of last resort is not set           172.16.0.0/24 is subnetted,  5 subnets R              172.16.5.0 [120/3] via 169.254.1.2, Ethernet0 R              172.16.4.0 [120/2] via 169.254.1.2, Ethernet0 R              172.16.3.0 [120/2] via 169.254.1.2, Ethernet0 R              172.16.2.0 [120/1] via 169.254.1.2, Ethernet0 C              172.16.1.0 is directly connected, Ethernet0 RouterA# RouterA#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP        D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area        N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2        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 def        U - per-user static route, o - ODR Gateway of last resort is not set           172.16.0.0/24 is subnetted,  5 subnets  I              172.16.5.0 [100/160240] via 169.254.1.2, Ethernet0   I              172.16.4.0 [100/160140] via 169.254.1.2, Ethernet0   I              172.16.3.0 [100/158240] via 169.254.1.2, Ethernet0   I              172.16.2.0 [100/158140] via 169.254.1.2, Ethernet0  C              172.16.1.0 is directly connected, Ethernet 0 RouterA# 

If you want to force RouterA to have a preference for RIP routes over IGRP, configure the distance command on RouterA as follows :

 RouterA(config)# router rip RouterA(config-router)# distance 90 

The resulting route table now indicates that RIP routes are preferred, as shown by the "R" entry in RouterA's table in Listing 2.2. Even though the RIP default is 120, the routes are learned with an AD of 90 because of the distance command. The new administrative distance value is relevant only to the routing process on RouterA because RouterB still has IGRP routes in its routing table.

Listing 2.2 RIP Routes Are Preferred Because of the distance Command
 RouterA#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP        D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area        N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2        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, o - ODR Gateway of last resort is not set           172.16.0.0/24 is subnetted,  5 subnets  R              172.16.5.0 [90/3] via 169.254.1.2, Ethernet0   R              172.16.4.0 [90/2] via 169.254.1.2, Ethernet0   R              172.16.3.0 [90/2] via 169.254.1.2, Ethernet0   R              172.16.2.0 [90/1] via 169.254.1.2, Ethernet0  C              172.16.1.0 is directly connected, Ethernet0 RouterA# 

After the administrative distance performs its duty, the routing process must then locate the optimal path to every possible destination network. Again, each protocol algorithm has its own singular definition for what constitutes the best path. The next major function of a router is to advertise these network paths using a configurable value known as the metric.

Routing Metrics

Routing algorithms historically have used different tools for selecting the best route to a destination network. Routing processes choose the path that has the lowest metric value, which can be something as simple as how many routers are passed through to get to the final destination. More advanced routing algorithms, such as EIGRP, can establish a complex route selection process by using multiple metrics to generate a single composite metric. As a Cisco professional, you should be familiar with the following metrics:

  • Hop count

  • Reliability

  • Delay

  • Bandwidth

  • Load

We cover each of these in more detail in the following sections.

Hop Count

Hop count is the most common routing metric. It identifies the number (count) of routing devices (hops) a packet must pass through from source to destination. Routing Information Protocol (RIP) is a common protocol used in small IP networks and that uses hop count as a metric.

Reliability

Reliability is a dependability factor typically expressed in terms of the bit-error rate of each network link. Obviously, some links fail more often than others do, and certain links can be repaired more easily or quickly than others. Reliability ratings are arbitrary numeric values that are usually assigned to network links by a network administrator.

Delay

Delay represents the length of time necessary to transfer a data packet from one node to another through the internetwork. Delay depends on factors such as the bandwidth of intermediate network links, the port queues at routers along the path, network congestion on all intermediate network links, and the actual physical distance of the communication. Delay is a commonly used metric because it can represent a collection of several important variables . IGRP and EIGRP are popular routing protocols that use delay as one of the factors to generate their composite metrics.

Bandwidth

IGRP and EIGRP also use the bandwidth value to calculate the composite metric. Bandwidth is a number that represents the available capacity for moving traffic on a network link. Simply speaking, a 10Mbps Ethernet link is preferable to a 128Kbps leased line. Just because one link has a greater allowable maximum bandwidth than another link does not guarantee a better route than a slower link. If the faster link is saturated , for instance, the ultimate time to destination could actually be greater. For this reason, bandwidth is usually combined with other values to create a composite metric. Because lower metrics are preferential, the bandwidth is evaluated as a mathematically inverse value; therefore, a higher bandwidth results in a lower metric. Referring to Figure 2.1, the optimal path from RouterA to RouterD in an IGRP or EIGRP network would likely be through the RouterB 10Mbps LAN instead of through the RouterC 128Kbps WAN link because of bandwidth values.

Load

Load is an optional metric used by IGRP and EIGRP; it refers to the degree to which a router's resources are occupied. Load can be calculated as CPU utilization or packets processed per second, but monitoring these parameters on a continual basis can be resource- intensive itself.

Communication cost is another important metric, especially because some companies might not care about performance as much as they care about operating expenditures. Although line delay can be longer, companies can send packets over their own lines rather than through the public lines that have usage time costs.

Neighbor Relationships

After a Cisco router loads a running configuration, it establishes relationships with neighboring (connected) routers or routing devices. The router must open lines of communication to become aware of the network topology. Depending on the routing protocol, this process can include a combination of broadcast Layer-2 frames , hello packets, and ongoing update messages. Ultimately, the topology is learned through the neighbor relationships and the router can then perform its primary task of path determination. As far as EIGRP is concerned , a neighbor is a router within the same autonomous system (AS) running EIGRP. Conversely, in OSPF, a neighboring router is defined as a router that has an interface connected to a common network.



Cisco BSCI Exam Cram 2 (Exam Cram 642-801)
CCNP BSCI Exam Cram 2 (Exam Cram 642-801)
ISBN: 0789730170
EAN: 2147483647
Year: 2003
Pages: 170

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