Name

route

Synopsis

Displays and modifies the routing table on the local machine.

Syntax

route [-f] [-p] [command [destination] [MASK netmask] [gateway] 
[METRIC metric] [IF interface]

Options

-f

Flushes all routes (gateway entries) from the routing table. (If combined with other options, this causes the table to be flushed prior to executing the other options.)

-p

When used with the add command, causes the added route to be persistent across reboots; when used with the print command, only lists persistent routes.

Commands

print

Displays the contents of the routing table.

add destination MASK netmask gateway METRIC metric IF interface

Adds a new route to the routing table using the following parameters:

destination

The IP address of the host or network, which can be reached by using the gateway.

netmask

The subnet mask used for packets going to the previously mentioned destination.

gateway

The IP address of the router interface used for routing packets to the previously mentioned destination.

metric

The cost metric, usually the number of hops between the local machine and destination, or any arbitrary number to represent the degree of preference of this route when many routes to destination are possible. (The default is 1, and maximum is 9,999.)

interface

The interface to add the route to on multihomed machines.

delete [ destination MASK netmask gateway METRIC metric IF interface ]

Removes an entry from the routing table. (Specify enough parameters to make the result unique.)

change [ ...

Get Windows 2000 Administration 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.