Understanding the IP routing table

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

Understanding the IP routing table

To troubleshoot routing problems, you must understand the routing table. Every computer that runs TCP/IP makes routing decisions that are determined by the IP routing table.

For information about displaying the IP routing table, see View routing tables.

The following illustration shows an example of a routing table.

The IP routing table

The IP routing table contains information in the following columns:

  • Destination

    The destination is the destination host, subnet address, network address, or default route. The destination for a default route is

  • Network mask

    The network mask is used in conjunction with the destination to determine when a route is used. For example, a host route has a mask of, a default route has a mask of, and a subnet or network route has a mask between these two extremes.

    A mask of means that only an exact match of the destination uses this route. A mask of means that any destination can use this route. When a mask is written in binary, a 1 is significant (must match) and a 0 is insignificant (does not need to match).

    For example, a destination of has a network mask of This network mask means that the first two octets must match exactly, the first five bits of the third octet must match (248=11111000) and the last octet does not matter. The third octet of (that is, 8) equals 00001000 in binary. Without changing the first 5 bits (the masked-off portion shown in bold), you can go up to 15, or 00001111 in binary. So a route with a destination of and a mask of applies to all packets destined for through

  • Gateway

    The gateway is the IP address of the next router where a packet needs to be sent. On a LAN link (such as Ethernet or token ring), the gateway must be directly reachable by this router by using the interface indicated in the Interface column. On a LAN link, both the gateway and interface determine how the traffic is being forwarded by the router. For a demand-dial interface, the gateway address is not configurable. On a point-to-point link, the interface determines how the traffic is being forwarded by the router.

  • Interface

    The interface indicates the LAN or demand-dial interface that is to be used to reach the next router.

  • Metric

    The metric indicates the relative cost of using the route to reach the destination. A typical metric is hops, or the number of routers to cross to reach the destination. If there are multiple routes with the same destination, the route with the lowest metric is the best route.

  • Protocol

    The protocol shows how the route was learned. If the Protocol column lists RIP, OSPF, or anything other than Local, then the router is receiving routes. Open Shortest Path First (OSPF) is not available on Windows XP 64-bit Edition (Itanium) and the 64-bit versions of the Windows Server 2003 family.