TCP/IP Troubleshooting

Previous Topic Next Topic

Examining the Routing Table with Route

In order for two hosts to exchange IP datagrams, they must both have a route to each other, or use default gateways that know of a route. Normally, routers exchange information with each other using a routing protocol such as RIP.

Enabling IP Routing

By default, IP routing is disabled. To enable IP routing, you must allow the computer to forward IP packets it receives. This requires a change to the Windows 2000 system registry. When you enable the Routing and Remote Access service for IP routing, this registry entry is made automatically.

To enable IP routing

  1. From the Start menu, click Run.
  2. Type regedt32.exe or regedit.exe, and then click OK.
  3. In a registry editor, navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip \Parameters
  4. Select the IPEnableRouter entry.
  5. To enable IP routing for all network connections installed and used by this computer, assign a value of 1. To do this in regedit.exe, right-click the entry, and then click Modify. In regedt32.exe, click on the wanted entry, click on Edit, and then click on the appropriate menu choice.
  6. Close the registry editor.

caution-icon

Caution

Do not use a registry editor to edit the registry directly unless you have no alternative. The registry editors bypass the standard safeguards provided by administrative tools. These safeguards prevent you from entering conflicting settings or settings that are likely to degrade performance or damage your system. Editing the registry directly can have serious, unexpected consequences that can prevent the system from starting and require that you reinstall Windows 2000. To configure or customize Windows 2000, use the programs in Control Panel or Microsoft Management Console (MMC) whenever possible.

If the Windows 2000 router does not have an interface on a given subnet, it needs a route to get to that subnet. This can be handled using a default route or by adding static routes. For more information about dynamic routing environments, see "Unicast IP Routing" in the Windows 2000 Internetworking Guide.

To add a static route, use the Route utility as follows:

route add 172.16.41.0 mask 255.255.255.0 172.16.40.1 metric 2


In this example, the route add command states that to reach the 172.16.41.0 subnet with a mask of 255.255.255.0, use gateway 172.16.40.1. It also shows that the subnet is two hops away. You may need to add static routes on downstream routers telling packets there how to get back to the 172.16.40.0/24 subnet.

© 1985-2000 Microsoft Corporation. All rights reserved.