« 深圳随拍 | Home | 优化debian的安装源 »

April 17, 2007

Principles of dynamic routing

Dynamic routing allows the network to adjust to changes in the topology automatically, without administrator involvement. This topic describes standard dynamic routing principles. The network statement is a necessary part of configuring most IP routing protocols but its function is often misunderstood. This topic also examines the effect of the network statement on various protocols.

A static route connot respond dynamically to changes in the network. If a link fails, the static route is no longer valid if it goes throught that failed link. A new static route must be configured. If a new router or new link is added, that information must also be configured on every router in the network. In a very large or unstable network, these changes can lead to considerable work for network administrators. It can also take a long time for every routerin the network to receive the correct information. In situations like these, it may be better to have the routers receive information about networks and links from each other using a dynamic routing protocol.

When using a dynamic routing protocol, the administrator configures the routing protocol on each router. The routers then exchange information about the reachable networks and the state of each network. Routers exchange information only with other routers running the same routing protocol. When the network topology changes, the new information is dynamically propagated throughout the network, and each router updates its routing table to reflect the changes. Some examples of dynamic routing protocols are as follows:

  • Routing Information Protocol

  • Enhanced Interior Gateway Routing Protocol

  • Intermediate System-to-Intermediate System

  • Open Shortest Path First

  • Border Gateway Protocol
  • The distance to the network, which is called metric or cost, is included in the information exchanged by routers. Different routing protocols base their metric on different measurements: hop count, interface speed, or more complex metrics. Most routing protocols maintain databases containing all the networks that each routing protocol recognizes, and all the paths to each network. If a router recognizes more than one way to reach a network, it will compare the metric for each different path and choose the path with the lowest metric. If there are multiple paths with the same metric, a maximum of six can be installed in the routing table, and the router can perform load balancing between them. Interior Gateway Routing Protocol(IGRP) and EIGRP can also perform load balancing between unequal-cost paths.

    To configure an IP dynamic routing protocol, use the router protocol command. Protocols ofter than RIP also require specification of either an autonomous system of a process number. For every protocol except IS-IS and BGP, you will also need the network command under the router configuration mode.

    For RIP, IGRP, EIGRP, and OSPF, the network command tells the router which interfaces are participating in that routing protocol. Any interface that has an IP address that falls within the range specified in the network statement is considered active for that protocol. In orhter words, the router sends updates from the specified interfaces and expects to receive updates from the same interfaces. Some protocols will look forneighbors by sending hello packets out those interfaces. Thus, because a network statement identifies interfaces on the local router, it is configured only for directly connected networks. A router also originates advertisements for the networks connected to the specified interfaces.

    RIP and IGRP use only major classful networks to determine the interfaces participating in the protocol. EIGRP and OSPF permit exact specification of interfaces with a combination of a subnet or interface address and a wildcard mask.

    The network statement functions differently in BGP. BGP requires its neighbors to be statically configured. The network statement in BGP notifies the router to originate an advertisement for that network. Without a network statement, BGP passes along advertisements it receives from other routers, but does not originate any network advertisement itself. In BGP, the network listed in the network statement does not have to be directly connected network because it is not identifying interfaces on the router as it would in other protocols.

    Intergrated IS-IS does not use the network statement. Instead, interfaces participating in the IS-IS routing process are identified under the interface configuration mode.

    Example

    As an example, the previous figure shows the commands necessary to configure RIP to run on routers A and B. Router A has two directlyattached networks and needs RIP to search for neighbors on both of those interfaces. Therefor, network statements are configured for both the 172.16.1.0 network and the 10.1.1.0 network. Router A sends RIP packets out interfaces E0 and S0. The neighbors also receive an advertisement for the networks that are attached to those interfaces.

    Router B also has two directly attached networks. However, router B wants only the network it shares with router A to participate in RIP. Therefor, a network statement is configured only for the 10.1.1.0 network. Router B has a static default route pointing toward its ISP to reach other networks. Router B sends RIP packets out its interface S0, but not out interface S1. It does not advertise the 192.168.1.0 network attached to S1 or the static default route unless specifically configured to do so.

    * This article was directly quoted from "Building Scalable Cisco Internetworks Volume1 version2.0"

    Posted by Lifeng Shen on April 17, 2007 1:07 PM |

    评论

    添加评论







    固定链接与引用