A host routing table includes only information about directly-connected networks. A host requires a default gateway to send packets to a remote destination. The routing table of a router contains similar information but can also identify specific remote networks.
The routing table of a router is similar to the routing table of a host. They both identify the:
- Destination network
- Metric associated with the destination network
- Gateway to get to the destination network
On a Cisco IOS router, the show ip route command can be used to display the routing table of a router. A router also provides additional route information, including how the route was learned, when it was last updated, and which specific interface to use to get to a predefined destination.
When a packet arrives at the router interface, the router examines the packet header to determine the destination network. If the destination network matches a route in the routing table, the router forwards the packet using the information specified in the routing table. If there are two or more possible routes to the same destination, the metric is used to decide which route appears on the routing table.
The figure shows the routing table of R1 in a simple network. Unlike the host routing table, there are no column headings identifying the information contained in a routing table entry. Therefore, it is important to learn the meaning of the different types of information included in each entry.