WINDOWS 2000 PROFESSIONAL

MODIFY A LOCAL ROUTING TABLE


The ability to view and change the routing table can help you troubleshoot network issues and potentially overcome network configuration problems.

But the ROUTE command doesn't restrict you to only viewing the local computer's routing table. In addition to viewing this table, you can also modify it by adding or removing routes.

Below is the syntax to add a new route:

ROUTE ADD <destination> MASK <subnet mask> <gateway address> METRIC <metric> IF <interface number>

Here's an example:

ROUTE ADD 192.168.1.0 MASK 255.255.255.0 192.168.0.9 METRIC 2 IF 2

In this example, 192.168.0.9 is the gateway for all traffic to the destination 192.168.1.0/24. The metric is 2, and the interface number is 2.

When you add a route using this syntax, the route doesn't persist across restarts of the computer. To make a route persist, add the -p switch to the command, as shown below:

ROUTE -p ADD 192.168.1.0 MASK 255.255.255.0 192.168.0.9 METRIC 2 IF 2

To delete a route, use the DELETE keyword and the destination address. Here's an example:

ROUTE DELETE 192.168.1.0