• Tidak ada hasil yang ditemukan

Types of IP routing and IP routing algorithms

Dalam dokumen TCP/IP Tutorial and Technical Overview (Halaman 164-169)

TCP/IP

Chapter 4. Routing protocols

4.2 Types of IP routing and IP routing algorithms

Routing algorithms are used to build and maintain the IP routing table on a device. There are two primary methods used to build the routing table:

• Static routing: Static routing use preprogrammed definitions representing paths through the network.

• Dynamic routing: Dynamic routing algorithms allow routers to

automatically discover and maintain awareness of the paths through the network. This automatic discovery can use a number of currently available dynamic routing protocols. The difference between these protocols is the way they discover and calculate new routes to destination networks. They can be classified into three broad categories:

- Distance vector protocols - Link state protocols - Hybrid protocols

The remainder of this section details the operation of each algorithm.

There are several reasons for the multiplicity of protocols:

• Routing within a network and routing between networks typically have different requirements for security, stability, and scalability. Different routing protocols have been developed to address these requirements.

• New protocols have been developed to address the observed deficiencies in established protocols.

• Different-sized networks can use different routing algorithms. Small to medium-sized networks often use routing protocols that reflect the simplicity of the environment. However, these protocols do not scale to support large, interconnected networks. More complex routing algorithms are required to support these environments.

4.2.1 Static routing

Static routing is manually performed by the network administrator. The administrator is responsible for discovering and propagating routes through the network. These definitions are manually programmed in every routing device in the environment.

Chapter 4. Routing protocols 141 Once a device has been configured, it simply forwards packets out the predetermined ports. There is no communication between routers regarding the current topology of the network.

In small networks with minimal redundancy, this process is relatively simple to administer. However, there are several disadvantages to this approach for maintaining IP routing tables:

• Static routes require a considerable amount of coordination and maintenance in non-trivial network environments.

• Static routes cannot dynamically adapt to the current operational state of the network. If a destination subnetwork becomes unreachable, the static routes pointing to that network remain in the routing table. Traffic

continues to be forwarded toward that destination. Unless the network administrator updates the static routes to reflect the new topology, traffic is unable to use any alternate paths that may exist.

Normally, static routes are used only in simple network topologies. However, there are additional circumstances when static routing can be attractive. For example, static routes can be used:

• To manually define a default route. This route is used to forward traffic when the routing table does not contain a more specific route to the destination.

• To define a route that is not automatically advertised within a network.

• When utilization or line tariffs make it undesirable to send routing advertisement traffic through lower-capacity WAN connections.

• When complex routing policies are required. For example, static routes can be used to guarantee that traffic destined for a specific host traverses a designated network path.

• To provide a more secure network environment. The administrator is aware of all subnetworks defined in the environment. The administrator specifically authorizes all communication permitted between these subnetworks.

• To provide more efficient resource utilization. This method of routing table management requires no network bandwidth to advertise routes between neighboring devices. It also uses less processor memory and CPU cycles to calculate network paths.

4.2.2 Distance vector routing

Distance vector algorithms are examples of dynamic routing protocols. These algorithms allow each device in the network to automatically build and maintain a local IP routing table.

The principle behind distance vector routing is simple. Each router in the internetwork maintains the distance or cost from itself to every known destination. This value represents the overall desirability of the path. Paths associated with a smaller cost value are more attractive to use than paths associated with a larger value. The path represented by the smallest cost becomes the preferred path to reach the destination.

This information is maintained in a distance vector table. The table is periodically advertised to each neighboring router. Each router processes these advertisements to determine the best paths through the network.

The main advantage of distance vector algorithms is that they are typically easy to implement and debug. They are very useful in small networks with limited redundancy. However, there are several disadvantages with this type of protocol:

• During an adverse condition, the length of time for every device in the network to produce an accurate routing table is called the convergence time. In large, complex internetworks using distance vector algorithms, this time can be excessive. While the routing tables are converging, networks are susceptible to inconsistent routing behavior. This can cause routing loops or other types of unstable packet forwarding.

• To reduce convergence time, a limit is often placed on the maximum number of hops contained in a single route. Valid paths exceeding this limit are not usable in distance vector networks.

• Distance vector routing tables are periodically transmitted to neighboring devices. They are sent even if no changes have been made to the contents of the table. This may cause noticeable periods of increased utilization in reduced capacity environments.

Enhancements to the basic distance vector algorithm have been developed to reduce the convergence and instability exposures. These enhancements are described in 4.3.5, “Convergence and counting to infinity” on page 148.

RIP and BGP are two popular examples of distance vector routing protocols.

Chapter 4. Routing protocols 143 4.2.3 Link state routing

The growth in the size and complexity of networks in recent years has necessitated the development of more robust routing algorithms. These algorithms address the shortcoming observed in distance vector protocols.

These algorithms use the principle of a link state to determine network topology. A link state is the description of an interface on a router (for example, IP address, subnet mask, type of network) and its relationship to neighboring routers. The collection of these link states forms a link state database.

The process used by link state algorithms to determine network topology is straightforward:

• Each router identifies all other routing devices on the directly connected networks.

• Each router advertises a list of all directly connected network links and the associated cost of each link. This is performed through the exchange of link state advertisements (LSAs) with other routers in the network.

• Using these advertisements, each router creates a database detailing the current network topology. The topology database in each router is

identical.

• Each router uses the information in the topology database to compute the most desirable routes to each destination network. This information is used to update the IP routing table.

4.2.3.1 Shortest-Path First (SPF) algorithm

The SPF algorithm is used to process the information in the topology database. It provides a tree-representation of the network. The device running the SPF algorithm is the root of the tree. The output of the algorithm is the list of shortest-paths to each destination network. Figure 60 provides an example of the shortest-path algorithm executed on router A.

A B-2 C-1

B A-2 D-4

C A-1 D-1 E-3

D C-1 B-4 E-3

E C-3 D-3

D B

C A

E

E C

A

D B

1

2

4 3

3 1

Link State Database

Figure 60. Shortest-Path First (SPF) example

Because each router is processing the same set of LSAs, each router creates an identical link state database. However, because each device occupies a different place in the network topology, application of the SPF algorithm produces a different tree for each router.

The OSPF protocol is a popular example of a link state routing protocol.

4.2.4 Hybrid routing

The last category of routing protocols is hybrid protocols. These protocols attempt to combine the positive attributes of both distance vector and link state protocols. Like distance vector, hybrid protocols use metrics to assign a preference to a route. However, the metrics are more accurate than

conventional distance vector protocols. Like link state algorithms, routing updates in hybrid protocols are event driven rather than periodic. Networks using hybrid protocols tend to converge more quickly than networks using distance vector protocols. Finally, these protocols potentially reduce the overhead of link state updates and distance vector advertisements.

Chapter 4. Routing protocols 145 Although open hybrid protocols exist, this category is almost exclusively associated with the proprietary EIGRP algorithm. EIGRP was developed by Cisco Systems, Inc.

Dalam dokumen TCP/IP Tutorial and Technical Overview (Halaman 164-169)