Search The Site

How To Use The Route Command

Using the route command. The Route tool is especially useful for troubleshooting any incorrect static routes and also for adding a route to a route table to temporarily bypass a problematic gateway. Static routes may be used instead of implicit routes specified by a default gateway. Use the Route tool to add static routes for forwarding packets going to a gateway specified by default to improve traffic time, avoid loops etc. To display the parameters used for Route, open a command prompt with admin priviledges and type Route /?

Accepted parameters for the Route tool are as follows:

  • -add : Adds a route to a table, use in combination with –p to set the route as persistent for subsequent sessions.
  • -Delete : This deletes a route from the table.
  • -Print : This prints a route.
  • -change : Modifies an already existing route.
  • -destination : This parameter specifies the host address.
  • -gateway : This parameter specifies the address of gateway for Route.
  • IF interface : This parameter specifies the interface for the routing table to modify.
  • -mask Netmask : Uses the subnet mask as specified by Netmask, if mask isn’t used, it will default to 255.255.255.255.
  • -METRIC Metric :This parameter specifies the metric for the route using the value Metric.
  • -f : This parameter clears the routing table of all gateway entries.
  • -p : Use with the -add parameter to create a persistent route.