Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to flush and then add this default route back to the Windows routing table:

Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric     25

I can't quite do it. First I do route -f, then I try

route add mask gateway interface metric 25

but I just get a message saying

route: bad argument

Does anyone know the correct route add command to add back this route?

share|improve this question



according to

C:\>route /?

Manipulates network routing tables.

ROUTE [-f] [-p] [-4|-6] command [destination]
                  [MASK netmask]  [gateway] [METRIC metric]  [IF interface]

  command      One of these:
                 PRINT     Prints  a route
                 ADD       Adds    a route
                 DELETE    Deletes a route
                 CHANGE    Modifies an existing route
  destination  Specifies the host.
  MASK         Specifies that the next parameter is the 'netmask' value.
  netmask      Specifies a subnet mask value for this route entry.
               If not specified, it defaults to
  gateway      Specifies gateway.
  interface    the interface number for the specified route.
  METRIC       specifies the metric, ie. cost for the destination.

Note that "gateway" means an IP-address not literal text.

The above is from Vista, Your Mileage May Vary.

share|improve this answer
The route addition failed: The system cannot find the file specified. – starcaaa Dec 30 '11 at 17:01
@starcaaa: Sorry, the IF parameter is an interface number (not it's IP-address) – RedGrittyBrick Dec 30 '11 at 17:11

Please open the command prompt as a administrator then type "route add mask IF 18 -p"

share|improve this answer

try this:

route add mask geteway interface metric 1 route add mask gateway interface metric 10

the and are that you get them from dial-up line.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .