• Aucun résultat trouvé

RIPv1 and IGRP

Dans le document IP NETWORKS CISCOQoS (Page 35-42)

Distance vector protocols were the first dynamic routing protocols.The most common distance vector protocols are RIPv1 (Routing Information Protocol) and IGRP (Interior Gateway Routing Protocol). Although these two protocols are very similar, they handle routing quite differently.

It is important to note that both RIPv1 and IGRP are classful protocols, meaning that they do not send the subnet mask along with the TCP/IP address.

By using the first octet in the address to identify the class of network, the pro-tocol assumes the address is classful and uses the default subnet mask shown in Table 1.5.

It is important to understand what makes RIPv1 and IGRP distance vector protocols. A good analogy to help understand how a distance vector protocol works is to imagine that you are standing in a line within a very dark tunnel.The only way you can figure out what position you hold in the line is to ask the person in front of you, and then he would ask the person in front of him, and so on.This would continue until the message got to the front of the line, and then the reply would come back, counting each step in the process.This is the prin-ciple behind distance vector protocols (See Figure 1.4).

The only way a router knows its position in a network is by what its neigh-bors tell it about their own positions. Another name for distance vectoring is thus

“routing by rumor.”

Distance vector protocols are also defined by the way they update one anothers’ routing tables, a process of sharing information known as convergence.

Distance vector protocols send their entire routing tables at regular intervals.

These updates are sent only to routers that are direct neighbors. A router’s view of the network is limited because it is based on what its neighbors see and pass along.

www.syngress.com

RIPv1

The RIPv1 protocol is an open standard protocol, meaning that it is not vendor specific. Because RIPv1 is an open standard, RFC 1058 and 1723 govern this protocol standard. Most router vendors support RIPv1 in one fashion or another and probably will continue to in the future.

RIPv1 uses a very simple measure, based exclusively on hop count, of how far the source is from the destination. Consequently, RIPv1 tends be easy to administer and troubleshoot.

After the router makes an update to its routing tables, it waits for the next regular interval (30 seconds) to expire before it sends the update to all of its neighboring routers.This creates a time lapse between when the router learns of a change and when it sends the update to other routers. If a change happens on the network, the neighboring routers will not be informed of the change until the next regular update.

If a change occurs in a RIP network, a flash update is sent from the router detecting the change to its adjacent neighbors. Upon receipt, the neighbors will send a poison reverse back to the advertising router confirming the change to the network. In addition, those neighbors will not relay these updates, but will wait for the normal 30-second interval before sending the update which will not con-tain the network entry.

When RIPv1 receives an update of a new network, it automatically installs the new route into its local routing table. If the router learns of a lower hop count for a route, it overwrites the existing route with the new route. RIPv1 Figure 1.4Distance Vector Protocol Illustration

Router A

Router B

Topology change causes routing table change.

Router A updates routing table, then waits for the next regular update and sends the updated routing table to Router B.

Update

Router B receives update from Router A and then updates local table.

1

2 3

4

keeps only the best routes (the lowest hop count) and flushes all other route updates for that destination.

If a network were to fail, the downstream router would no longer receive updates about that specific route. After 180 seconds (six updates) without

receiving an update on a route, RIPv1 would designate the route as being down by giving it a value of 16. Once 240 seconds pass without an update (eight updates), RIPv1 would remove the entry from its routing tables.

RIPv1 thus possesses its share of drawbacks. Because it does not take into account any other variable besides hop count, RIPv1 quite often does not dynamically make the most logical decisions on its path selection through a net-work and, therefore, does not make it particularly scalable. RIPv1 uses regular scheduled updates to notify other routers of topology changes, thus creating a time lapse and possibly causing routing loops. Since RIPv1 is a distance vector protocol, it sends the entire routing table to update neighboring routers, thus using a large portion of the network’s bandwidth. RIP is also limited to a max-imum of 15 hops. Each hop represents a router, which the traffic will have to go through to get to the destination network. Paths with a hop count of 16 or greater are considered unreachable.

To enable RIPv1 on a Cisco router, you use the following command at the global configuration prompt.

Router1(config)#router rip

Once you have enabled the router for RIP configuration, the prompt changes to the following.

Router1(config-router)#

At this prompt, you input the network in which you want RIP to be enabled.The syntax for the command looks like this.

Router1(config-router)#network network-number

Here is an example.

Router1(config-router)#network 10.0.0.0 Router1(config-router)#network 20.0.0.0

After you have enabled RIP on all the networks you want, you now need to confirm your entries.To do this you run the following command.

Router1#show running-config

www.syngress.com

Browsing down to the RIP portion of the running configuration, you will notice an entry similar to this one.

router rip

network 10.0.0.0 network 20.0.0.0

Once you find this entry in your configuration, you can be confident that the configuration changes have occurred in your router. It is good practice at this time to save your running configuration file to your startup configuration file in case you lose power.To do this, type in the following command.

Router1#copy running-config startup-config

IGRP

Interior Gateway Routing Protocol (IGRP) is a proprietary protocol to Cisco Systems.This means the IGRP can be implemented only on Cisco routers.The IGRP protocol is a distance vector protocol like RIPv1, but IGRP has a more thorough metric that uses a variety of different variables to make its routing decisions.

Developed to replace RIPv1, IGRP had to be a faster and more scalable routing protocol. Cisco Systems developed IGRP with the following five distinct variables on which to base its routing decisions. By default, IGRP uses only band-width and network delays, but it can be configured to utilize all five variables.

Bandwidth

Delay

Load

Reliability

Smallest MTU (maximum transmission unit)

IGRP works within an autonomous system (AS). Cisco defines an autonomous system as “a group of networks that has a consistent policy for routing purposes.”This means that routers participating within the same routing domain must use the same autonomous system number. If you are running IGRP with different AS numbers per router, they will not communicate with each other.

The IGRP protocol does permit multiple autonomous systems to participate on the same router, but this requires the routers to run multiple instances of

IGRP. For all practical purposes, most administrators implement only one IGRP AS on the network.

Updates in IGRP occur every 90 seconds, which produces less network traffic then RIPv1’s 30-second updateinterval. However, this also increases the time it takes for routers within the same network to converge.This longer con-vergence is remedied by IGRP’s execution of flash updates.

In developing IGRP, Cisco Systems made numerous improvements compared to the RIPv1 protocol, thus making IGRP more scalable and robust. Routers not receiving a route update from the failed route for 270 seconds (three updates) identify the network as invalid. If the router receives an update within 280 sec-onds (three updates plus ten secsec-onds), it can redeem the route. If 630 secsec-onds (seven missed updates) pass since the router was last updated, the router deletes the route from its routing tables. IGRP has a default limit of no more than 100 hops to a single destination network.This value can me modified to 255 if neces-sary, but this is rarely done. In addition, keep in mind that hops are not part of the metric calculation for determining the best path, but a limiter to ensure against looping and sub-optimal routing.

TIP

Distance vector protocols are inadequate in really large network models.

Although IGRP implements a stronger metric then RIPv1, it is still a dis-tance vector protocol, which may be substandard for larger networks.

To configure IGRP, use the following syntax at the global configuration prompt on the router that you want to configure.

Router1(config)#router igrp autonomous-system-number

Here is an example.

Router1(config)#router igrp 1

This command enables IGRP on the router and advances you to the protocol configuration prompt, which should look like this.

Router1(config-router)#

This prompt enables you to enter the networks that you want to participate in the autonomous system.To enter the participating networks, type them in as you would in RIPv1 using the following syntax.

www.syngress.com

Router1(config-router)#network network-number

Here is the example.

Router1(config-router)#network 10.0.0.0 Router1(config-router)#network 20.0.0.0

Once you have entered all the networks that you would like to participate in the IGRP Autonomous System, you need to confirm your changes have taken place in the running-config file.To do this, you use the show running-config command. Browse down to the IGRP section of your configuration file to con-firm the changes have been accepted.

router igrp 1 network 10.0.0.0 network 20.0.0.0

After confirming that there were no mistyped commands and that the con-figuration is indeed correct, you then save the file to your startup concon-figuration by using the following command.

Router1#copy running-config startup-config

Routing loops can occur on a network because of slow convergence times or inconsistent routing entries. Consider Figure 1.5 when working through the fol-lowing routing loop example.

For simplicity, hop count is the metric that will be used, and each hop is a value of one. Before the failure of 10.10.0.0, routers 1, 2, and 3 all have consistent routing tables. As shown in Figure 1.5, Router 1’s E0 interface is directly con-nected to the 10.10.0.0 network. Router 2 is one hop away from the 10.10.0.0 network, and Router 3 is two hops away through Router 2.

Figure 1.5Routing Loop Example

10.10.0.0/8

E0 S0

S0 S1

S0 E0

Router 1

Router 2 Router 3

10.40.0.0/8 10.20.0.0/8

10.30.0.0/8

Router 1 detects a failure on network 10.10.0.0 and updates its local routing table. Router 2 still contains a path to 10.10.0.0 through Router 1 (1 hop) in its local routing table and continues to update Router 1 and Router 3 at regular intervals. At the same time, Router 3 has not received any notification of the down network and still holds the pathway to network 10.10.0.0 as two hops away through Router 2.

Router 1 is notified that Router 2 knows how to get to the 10.10.0.0 net-work and thus begins routing packets destined for the 10.10.0.0 netnet-work to Router 2. Router 3 continues to believe that the path to the 10.10.0.0 network is through Router 2, with a hop count of two.

Router 1 receives the update from Router 2 and recalculates its distance from the network as a hop count of two.

Routers 1, 2, and 3 all believe that the best path to network 10.10.0.0 is through one another.These inconsistencies cause packets destined for the 10.10.0.0 network to bounce between routers, creating a routing loop.

As seen in this example, routing loops can be very detrimental to a network and can actually bring a network to a complete halt. Precautionary measures have been implemented in distance vector protocols to help prevent these loops.

A repercussion of routing loops is a state called “count to infinity.” Count to infinity occurs when an invalid routing update continues to loop, causing the hop count to increase by one each time the update passes through a router.Without preventative measures, the packets will continue to loop indefinitely.

Defining infinity prevents this loop from occurring indefinitely. For example, RIPv1 by default defines infinity as a hop count of 16. Once this maximum is reached, the packet will be killed and the network will be deemed unreachable.

“Split–horizon updates” are another tactic to stop routing loops from occur-ring.The logic behind split-horizon updates is that they will not send updates learned from a particular direction back in the direction from which they were learned. Split-horizon updates will not allow information to go out the same interface it was learned on.

A variation of split-horizon updates is “poison reverse.” Poison reverse updates implement holddown timers to ensure that the entire network has con-verged after making a change, and thus a router will not learn incorrect informa-tion from another router that has not been updated. Poison reverse causes the routers to advertise the failed route, and this causes all routers to flush the route.

The routing tables thus remain consistent throughout the network.

More complex protocols utilize triggered updates, which take a more proac-tive role in stopping routing loops.Triggered, or flash, updates allow immediate

www.syngress.com

updates when a topology change occurs in the network. Instead of waiting for the normal update to send out changes, the protocol sends the updates immedi-ately so that other routers can update their routing tables.

Variable-Length Subnet

Dans le document IP NETWORKS CISCOQoS (Page 35-42)