Routing Tables

To determine the best path on which to send a packet, a router must know where the packet's destination network is.

KEY POINT

Routers learn about networks by being physically connected to them or by learning about them either from other routers or from a network administrator. Routes configured by network administrators are known as static routes because they are hard-coded in the router and remain there—static—until the administrator removes them. Routes to which a router is physically connected are known as directly connected routes. Routers learn routes from other routers by using a routing protocol.

However routes are learned, routers keep the best path (or multiple best paths) to each destination in a routing table. A routing table contains a list of all the networks that a router knows how to reach. For each network, the routing table typically contains the following items:

■ How the route to the network was learned (for example, statically or by using a routing protocol).

■ The network address of the router from which the route to the network was learned (if applicable).

■ The interface (port) on the router through which the network can be reached.

■ The metric of the route. The metric is a measurement, such as the number of other routers that the path goes through, that routing protocols use when determining the best path.

NOTE The path that the router determines is the best depends on the routing protocol in use. For example, some routing protocols define best as the path that goes through the fewest other routers (the fewest hops), whereas others define best as the path with the highest bandwidth.

For example, in the network shown in Figure 1-13, the metric used is hops—the number of other routers between this router and the destination network. Both routers know about all three networks. Router X, on the left, knows about networks A and B because it is connected to them (hence the metric of 0) and knows about network C from Router Y (hence the metric of 1). Router Y, on the right, knows about networks B and C because it is connected to them (hence the metric of 0) and knows about network A from Router X (hence the metric of 1).

Figure 1-13 Routers Keep Routing Information in Routing Tables

Network

Interface

Metric

A

1

1

B

1

0

C

2

Network C

Network

Interface

Metric

A

1

0

B

2

0

C

2

1

Was this article helpful?

0 0

Post a comment