• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Route \windows\system32\route.exe

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

To Open

Command Prompt route


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


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


Specifies one of four commands:


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).


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


Deletes a route from the routing table.


Modifies an existing route in the routing table.


The remote computer that is reachable via gateway.


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.


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.


The gateway computer to be used for traffic going to destination. It is possible to use a hostname for the gateway, but it is safer to use an IP address, as a hostname may resolve to multiple IP addresses. For example, you might type the following:

route add

mask netmask

Specifies the subnet mask for a destination. If not specified, a mask of is used (i.e., a “host route” to a single host, not a network).

metric metric

Specifies the metric or “hop count” for this route. The metric indicates which route is preferred when multiple routes to a destination exist and signifies the number of hops or gateways between the local computer and the gateway. The route with the lowest metric is used unless it is unavailable, in which case the route with the next lowest metric takes over.

if interface

Specifies the interface number for the specified route.

If you type route print at the command prompt, you’ll get something that looks like this:

Active Routes:
 Network Address Netmask Gateway Address Interface Metric 1 1 1 1 1 1 1

The fields in this printout are as follows:

Gateway Address

The IP address of the gateway for the route. The gateway will know what to do with traffic for the specified network address.


The IP address of the network interface that the route will use when leaving the local computer.


The hop count or number of gateways between the local computer and the gateway.


The mask to be applied to the network address. If all ones (, the route is a host route and refers to a single machine, not a network.

Network Address

Any network matched by this address should use this route. The default route is all zeros and is used if no other route is found.


If the command is print or delete, wildcards may be used for the destination and gateway or the gateway argument may be omitted.

See Also


  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint