How to configure Static Routes on Windows PC or Laptop?
Routes are configure on Windows device to make the device aware of the path of a Subnet or network. In this post we will get to know how to configure static routes for a subnet on Windows PC. The network example we have taken is 10.0.0.0/8. To configure a route we need the network address & subnet mask of the network which will basically help the device to identify the subnetwork or network. We also need one Next-hop IP address which will be basically the IP address of the next router or gateway device for the PC. Next-hop address help the device to provide the direction towards the network to send traffic. In this post our next hop will be 192.168.1.1.
Follow the below steps to configure routes on Windows Device:
- Open the Command Prompt as an administrator.
- Type the following command and press Enter:route add [destination] mask [subnet mask] [gateway] metric [metric value]
Replace [destination], [subnet mask], [gateway], and [metric value] with the appropriate values for your network. For example, the following command adds a route to the 10.0.0.0 network with a subnet mask of 255.0.0.0 through the gateway 192.168.1.1 with a metric of 1:
3. Verify the new route by using the “route print” command.
To delete a route, use the following command:
route delete [destination]
Replace [destination] with the network address of the route you want to remove.