Windows – The route addition failed: The system cannot find the file specified

routingwindowswindows 7

I am trying to add a route line in command prompt :

D:\Users\OM-11>route add -p 10.9.12.0 mask 255.255.255.0 192.168.6.2 metric 21 if 192.168.6.26

CP is opened in administrator mode, my Windows 7 is located in drive d:

and I received this error line :

The route addition failed: The system cannot find the file specified.

Best Answer

The route addition failed: The system cannot find the file specified.

route add -p 10.9.12.0 mask 255.255.255.0 192.168.6.2 metric 21 if 192.168.6.26

You are using an IP address 192.168.6.26 instead of the interface number


Syntax

Add a route:

ROUTE [-f] [-p] ADD [destination_host] [MASK subnet_mask_value] [gateway] 
                                       [METRIC metric] [IF interface_no.]

...

Key

...

interface_no The interface number (1,2,...) for the specified route.

Source route


Further Reading

  • An A-Z Index of the Windows CMD command line - An excellent reference for all things Windows cmd line related.
  • route - Manipulate network routing tables. Route packets of network traffic from one subnet to another by modifying the route table.
Related Question