Adding a Route in Windows

Network routers and switches typically handle the routing needs of local area networks and wide area networks, but there are times when you need to add an otherwise unknown route to your Windows machine. Fortunately, Windows 7, Windows Vista and Windows XP all facilitate this process through networking commands issued via a DOS prompt. A few simple commands can have your new route added and available to your Windows machine.

Instructions

    • 1

      Click on the "Windows" button (or the "Start" button in XP) in the lower left part of your screen. In the search bar, key "cmd" and press "Enter." For Windows XP, click on "Run" and key "cmd" in the text box and press "Enter." This will bring up a DOS window with a command prompt.

    • 2

      Enter "netstat --rn" at the DOS command prompt and press "Enter." This will give you a list of the routes available to your machine. If you see the route you need, then you do not have to do anything further, since your machine should have connectivity to that network. If the route is present, and you do not have connectivity, then you should check the specifications for the given route, and verify the network address, the subnet mask, the gateway, the metric and the interface specifications to ensure correctness. If the route is incorrectly specified, you can use the "route delete" command as follows:

      route delete 138.210.21.0

      This should delete the incorrect route.

    • 3

      Enter "route" at the command prompt and press "Enter." This will give you a list of the route command options that you can use as a guide. To add your new route, at the command prompt enter the command as follows and press the "Enter" key:

      route add 138.210.21.0 mask 255.255.255.0 154.201.112.251 metric 3 IF 1

      This command adds a route to network 138.210.21.0, with a subnet mask of 255.255.255.0, via the gateway at 154.201.112.251, with a metric (hop count) of 3, on interface 1.

      If the "IF" (interface) parameter is not specified, Windows tries to find the best interface through which to get to the gateway.

      At this point you have added a new network route to Windows.

Tips & Warnings

  • If you want the route to remain between reboots, add "-p" before the "add" option of the route command.

Related Searches:

References

Resources

Comments

You May Also Like

Related Ads

Featured