How to Add Static Route in Windows

This guide shows you how to add static route in Windows, step by step.

Sometimes in the environment, we have multiple interfaces in windows or if we want to route the traffic from a specific interface we need to add routes in the IP route table of windows. Adding static IP routes in windows is easy and simple. Follow the below steps to add static routes in windows.

  1. Open Command Prompt with administrative access.
  2. Use “ipconfig” to identify the interface you want to use for routing.
  3. Use “route print” to check the routing in the windows routing table.
  4. Add Static route in windows.

1. Open Command prompt with administrative access.

To open command prompt with administrative access. Go to Windows and write cmd then right click on command prompt and choose option “Run as administrator”.

add static route in windows

2. Use IPCONFIG to identify the interface you want to use for routing.

Now, First, we need to identify the interface which will be used for static IP routing.
To view, all the interface present in the windows use the below command-

3. Use “route print” to check the routing in the windows routing table.

After identifying the interface use below command to check the current routing in the windows routing table.

route print windows command

4. Add a static route in Windows.

To add static route in windows we need to use below syntax where we need to provide network address and its mask and after mask we need to mention the gateway which will be used to forward the traffic.

below is the example to route 192.168.35.0/24 network via 192.168.0.2

how-to-add-static-route-in-windows

The subnet_mask and metric_cost components are optional to the command. once you add a static route in windows, you can use command route print to view the routing in windows.

To delete a static route from windows use below commands

To delete the route with the destination network 192.168.35.0, all we’d have to do is type this command and hit Enter:

Frequently Asked Questions

How do I make a static route permanent in Windows?

Add the -p option, for example route -p add 10.10.10.0 mask 255.255.255.0 192.168.1.1. Permanent routes are saved and stay after a reboot.

How do I see the routing table in Windows?

Run route print in Command Prompt. Permanent routes are listed under “Persistent Routes” at the bottom of the output.

How do I delete a static route in Windows?

Use route delete followed by the network, for example route delete 10.10.10.0. Run Command Prompt as administrator.

Why does route add say “The requested operation requires elevation”?

Command Prompt was opened as a normal user. Right-click Command Prompt, choose Run as administrator and run the command again.

How do I choose the interface for a static route?

Add IF and the interface number at the end of the command. You can find the number in the Interface List at the top of route print.

Related Guides

Leave a Comment