Partilhar via


Routing tables

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

Routing tables

The routing decision is aided by knowing which network addresses (or network IDs) are available in the internetwork. This knowledge is obtained from a database called the routing table. The routing table is a series of entries called routes that contain information on where the network IDs of the internetwork are located. The routing table is not exclusive to a router. Hosts (non-routers) may also have a routing table that is used to determine the optimal route.

Types of routing table entries

Each entry in the routing table is considered a route and is one of the following types:

  • Network route

    A network route provides a route to a specific network ID in the internetwork.

  • Host route

    A host route provides a route to an internetwork address (network ID and node ID). Host routes are typically used to create custom routes to specific hosts to control or optimize network traffic.

  • Default route

    A default route is used when no other routes in the routing table are found. For example, if a router or host cannot find a network route or host route for the destination, the default route is used. The default route simplifies the configuration of hosts. Rather than configuring hosts with routes for all the network IDs in the internetwork, a single default route is used to forward all packets with a destination network or internetwork address that was not found in the routing table.

Routing table structure

The following illustration shows the structure of the routing table.

Routing table structure

Each entry in the routing table consists of the following information fields:

  • Network ID

    The network ID or an internetwork address for a host route. On IP routers, there is an additional subnet mask field that determines the IP network ID from a destination IP address.

  • Forwarding address

    The address to which the packet is forwarded. The forwarding address is a hardware address or an internetwork address. For networks to which the host or router is directly attached, the forwarding address field may be the address of the interface that is attached to the network.

  • Interface

    The network interface that is used when packets are forwarded to the network ID. This is a port number or other type of logical identifier.

  • Metric

    A measurement of the preference of a route. Typically, the lowest metric is the most preferred route. If multiple routes exist to a given destination network, the route with the lowest metric is used. Some routing algorithms only store a single route to any network ID in the routing table, even when multiple routes exist. In this case, the metric is used by the router to determine which route to store in the routing table.

Note

  • The preceding list is intended to be a representative list of fields in the routing tables used by routers. Actual fields in the routing tables for different routable protocols may vary.