Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
      0.0.0.0          0.0.0.0      192.168.1.1      192.168.1.3     25

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

route add 0.0.0.0 mask 0.0.0.0 gateway 192.168.1.3 interface 192.168.1.1 metric 25

but I just get a message saying

route: bad argument 192.168.1.3.

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

share|improve this question

3 Answers 3

(edited)

ROUTE ADD 0.0.0.0  MASK 0.0.0.0  192.168.1.3  METRIC 25  

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 255.255.255.255.
  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
1  
@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 192.168.89.0 mask 255.255.255.0 0.0.0.0 IF 18 -p"

share|improve this answer

try this:

route add 0.0.0.0 mask 0.0.0.0 geteway interface metric 1 route add 192.168.1.3 mask 255.255.255.255 gateway 127.0.0.1 interface 127.0.0.1 metric 10

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.