Полезная информация

TCP/IP Network Administration

TCP/IP Network AdministrationSearch this book
Previous: 6.5 Summary Chapter 7Next: 7.2 The Minimal Routing Table

7. Configuring Routing

Common Routing Configurations
The Minimal Routing Table
Building a Static Routing Table
Interior Routing Protocols
Exterior Routing Protocols
Gateway Routing Daemon
Configuring gated

Routing is the glue that binds the Internet together. Without it, TCP/IP traffic is limited to a single physical network. Routing allows traffic from your local network to reach its destination somewhere else in the world - perhaps after passing through many intermediate networks.

The important role of routing and the complex interconnection of Internet networks make the design of routing protocols a major challenge to network software developers. Consequently, most discussions of routing concern protocol design. Very little is written about the important task of properly configuring routing protocols. However, more day-to-day problems are caused by improperly configured routers than are caused by improperly designed routing algorithms. As system administrators, we need to ensure that the routing on our systems is properly configured. This is the task we tackle in this chapter.

7.1 Common Routing Configurations

First, we must make a distinction between routing and routing protocols. All systems route data, but not all systems run routing protocols. Routing is the act of forwarding datagrams based on the information contained in the routing table. Routing protocols are programs that exchange the information used to build routing tables.

A network's routing configuration does not always require a routing protocol. In situations where the routing information does not change - for example, when there is only one possible route, the system administrator usually builds the routing table manually. Some networks have no access to any other TCP/IP networks, and therefore do not require that the system administrator build the routing table at all. The three most common routing configurations are: [1]

[1] Chapter 4, Getting Started , presents guidelines for choosing the correct routing configuration for your network.

Minimal routing

A network completely isolated from all other TCP/IP networks requires only minimal routing. A minimal routing table usually is built by ifconfig when the network interface is configured. [2] If your network doesn't have direct access to other TCP/IP networks, and if you are not using subnetting, this may be the only routing table you'll require.

[2] Linux is an exception. ifconfig does not create routing table entries on a Linux system.

Static routing

A network with a limited number of gateways to other TCP/IP networks can be configured with static routing. When a network has only one gateway, a static route is the best choice. A static routing table is constructed manually by the system administrator using the route command. Static routing tables do not adjust to network changes, so they work best where routes do not change.

Dynamic routing

A network with more than one possible route to the same destination should use dynamic routing. A dynamic routing table is built from the information exchanged by routing protocols. The protocols are designed to distribute information that dynamically adjusts routes to reflect changing network conditions. Routing protocols handle complex routing situations more quickly and accurately than the system administrator can. Routing protocols are designed not only to switch to a backup route when the primary route becomes inoperable; they are also designed to decide which is the "best" route to a destination. On any network where there are multiple paths to the same destination, a routing protocol should be used.

Routes are built automatically by ifconfig, manually by the system administrator, or dynamically by routing protocols. But no matter how routes are entered, they all end up in the routing table.

Previous: 6.5 Summary TCP/IP Network AdministrationNext: 7.2 The Minimal Routing Table
6.5 Summary Book Index7.2 The Minimal Routing Table