Windows: Add a static/persistent route

Hi,

to add a static route to a Windows machine use the route command.

Let us assume you have network 172.31.10.0/24 which you can reach over the gateway 10.10.10.200. Your IP is 10.10.10.20 (in same subnet as the gateway).

Use

D:\> route add  <destination> MASK <mask> <gateway>

To add the persistent route use

D:\> route -p add  172.31.10.0 MASK 255.255.255.0 10.10.10.200

Optionally you can also specify the interface and the metric (priority).

Michael

Leave a Reply