Name

Route — \windows\system32\route.exe

Synopsis

Manipulate the TCP/IP routing table for the local computer.

To Open

Command Prompt route

Usage

route [-f] [-p] [command] [destination] [gateway]
      [mask 
                     netmask] [metric metric] [if interface]

Description

Routing tables provide information necessary to connect to other computers on a network or the Internet. Route accepts the following options:

command

Specifies one of four commands:

print

Prints a route (similar to netstat -r). The route print command is useful if you are having a problem (e.g., “Host Unreachable” or “Request timed out”) with the routes on your computer, since it will display all the different fields in the active route (see the example).

add

Adds a route to the routing table; used until the computer is shut down (unless the -p option is specified).

delete

Deletes a route from the routing table.

change

Modifies an existing route in the routing table.

destination

The remote computer that is reachable via gateway.

-f

Frees (clears) the routing tables of all gateway entries. If this is used in conjunction with one of the commands listed above, the tables are cleared prior to running the command.

-p

When used with the add command, -p makes a route persistent across boots of the system. If you don’t specify -p, any route you add will be valid only until the computer is restarted. The -p option has no effect on other commands, as they’re all persistent.

gateway

The gateway computer to be used for traffic going to ...

Get Windows XP in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.