Hi ,
To add a static route to the table, you’ll type a command using the following syntax:
route add destination_network MASK subnet_mask gateway_ip metric_cost
So if you wanted to add a route specifying that all traffic bound for the 192.168.151.0 subnet went to a gateway at 192.168.8.1 and you just wanted to use the automatic metric cost, you would use the following command:
route add 192.168.151.0 MASK 255.255.255.0 192.168.8.1
Then you could use the route print command to look at the table , you’d see your new static route.
For more details, you could refer to the following article:
https://www.howtogeek.com/howto/windows/adding-a-tcpip-route-to-the-windows-routing-table/
Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
After adding a static route it will be active until the next restart of your Windows PC. To make the route persistent just add the -p option to the command.
For Example:
route -p add 192.168.151.0 MASK 255.255.255.0 192.168.8.1
Best regards,
Candy