Home
> Commands N-Z
> Commands R
ROUTE
Description
| Syntax
| Parameters
| Switches
| Related
| Notes
| Examples
| Errorlevels
| Availability
Manipulates network routing tables. This command is available
only if the TCP/IP protocol has been installed.
Syntax
ROUTE
/?
ROUTE
[-f]
[-p]
[-s]
[command
[destination]
[mask subnetmask]
[gateway]
[metric costmetric]
[if interface]]
Parameters
- command
(NT3.1)
- Specifies one of:
- add Adds a route
- change Modifies an existing route
- delete Deletes a route
- print Prints a route
- destination
(NT3.1)
- Specifies the computer to send command.
- gateway
(NT3.1)
- 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.
- if interface
(NTXP)
- Specifies the interface index for the interface
over which the destination is reachable. For a list
of interfaces and their corresponding interface
indexes, use the display of the route print command.
You can use either decimal or hexadecimal values for
the interface index. For hexadecimal values, precede
the hexadecimal number with 0x. When the if parameter
is omitted, the interface is determined from the
gateway address.
- mask subnetmask
(NT3.5)
- Specifies a subnet mask to be associated with this
route entry. If not specified, 255.255.255.255 is used.
- metric costmetric
(NT2000)
- Assigns an integer cost metric (ranging from 1 to 9999)
to be used in calculating the fastest, most reliable, and/or
least expensive routes.
Switches
- /?
(NTXP)
- Displays help.
- -f
(NT3.1)
- 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
(NT2000)
- 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.
- Only supported on the route command for Windows NT
4.0, Windows 2000, Windows Millennium Edition, and
Windows XP. Not supported by the route command for
Windows 95 or Windows 98.
- -s
(NT3.1 ONLY)
- The operation refers to the smart gateway. One smart
gateway may be specified; packets for which no destination
is found in the gateway table are routed to the smart
gateway. The destination
field is not specified when this option is in use.
Related
none.
Notes
none.
Examples
none.
Errorlevels
none.
Availability
- External
-
- DOS
-
none
- Windows
-
none
- Windows NT
-
NT3.1
NT3.5
NT3.51
NT4
NT2000
NTXP
NT2003
Last Updated: 2006/12/01
Direct corrections or suggestions to:
Rick Lively