NT Syntax

ROUTE.exe

Manipulate network routing tables. Route packets of network traffic from one subnet to another.

syntax
   Add a route:
      ROUTE [-f] [-p] ADD [destination_host] [MASK subnet_mask_value] [gateway] 
         [METRIC metric] [IF interface_no.]

   Print a route:
      ROUTE [-f] PRINT [destination_host] [MASK subnet_mask_value] [gateway] 
         [METRIC metric] [IF interface_no.]

   Change a route:
      ROUTE [-f] CHANGE [destination_host] [MASK subnet_mask_value] [gateway] 
         [METRIC metric] [IF interface_no.]

   Delete a route:
      ROUTE [-f] DELETE [destination_host] [MASK subnet_mask_value] [gateway] 
         [METRIC metric] [IF interface_no.] 
key
-f Clear (flush) 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 Create a persistent route - survives system reboots. (not supported in Windows 95) subnet_mask_value The subnet mask value for this route entry. If not specified, it defaults to 255.255.255.255. gateway The gateway. interface The interface number (1,2,...) for the specified route. If the option `IF interface_no` is not given, ROUTE will try to find the best interface available. METRIC The metric, ie. cost for the destination.

Symbolic names used for Destination_Host are looked up in the network database file NETWORKS.

The symbolic names for gateway are looked up in the host name database file HOSTS.

If the command is PRINT or DELETE. Destination or gateway can be a wildcard ('*'), or the gateway argument may be omitted.

If Destination_Host contains a * or ?, it is treated as a shell pattern, and only matching destination routes are printed. The '*' matches any string, and '?' matches any one char.
Examples:
157.*.1
157.*
127.*
*224*

Get your kicks on ROUTE 66 - Jack Kerouac.


Related Commands:

Q140859 - Win NT TCP/IP Routing Basics
TRACERT - Trace route to a remote host

Equivalent Linux BASH commands:

ping - Test a network connection
trace - Find the IP address of a remote host.



Simon Sheppard
SS64.com