Quincy Center for Technical Education
Computer Technology Department

Route

Manipulates network routing tables. This command is available only if the TCP/IP protocol has been installed.

route [-f] [-p] [command [destination] [mask subnetmask] [gateway] [metric costmetric]]

Parameters

-f

Clears the routing tables of all gateway entries. If this is used in conjunction with one of the commands, the tables are cleared prior to running the command.

-p

When used with the add command, makes a route persistent across boots of the system. By default, routes are not preserved when the system is restarted. When used with the print command, displays the list of registered persistent routes. Ignored for all other commands, which always affect the appropriate persistent routes.

command

Specifies one of the following commands.

Command

Purpose

print

Prints a route

add

Adds a route

delete

Deletes a route

change

Modifies an existing route

destination

Specifies the computer to send command.

mask subnetmask

Specifies a subnet mask to be associated with this route entry. If not specified, 255.255.255.255 is used.

gateway

Specifies gateway.

All symbolic names used for destination or gateway are referenced in both the network database file called Networks, and the computer name database file called Hosts. If the command is print or delete, wildcards may be used for the destination and gateway, or the gateway argument may be omitted.

metric costmetric

Assigns an integer cost metric (ranging from 1 to 9999) to be used in calculating the fastest, most reliable, and/or least expensive routes.