Windows : Adding a permanent static route

By | May 31, 2011

Follow these steps to add a permanent static route to Windows.

1. Open the command prompt (must be done as administrator).

2. Enter the following command and replace with your network information :

route -p add <NETWORK_IP> mask <NETMASK> <GATEWAY_IP>

Let’s explain in details with the following IP information… assume we want to add a static route for 192.168.10.0/24 ;

NETWORK_IP : 192.168.10.0
NETMASK : 255.255.255.0
GATEWAY : 192.168.10.1

route -p add 192.168.10.0 mask 255.255.255.0 192.168.10.1